Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index f803628..a02ee35 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp | |||
@@ -163,18 +163,18 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
163 | QWhatsThis::add(baud_label,tmp); | 163 | QWhatsThis::add(baud_label,tmp); |
164 | QWhatsThis::add(baud_c,tmp); | 164 | QWhatsThis::add(baud_c,tmp); |
165 | 165 | ||
166 | for(int i=0; i <= enter->count()-1; i++) { | 166 | for(int i=0; i <= enter->count()-1; i++) { |
167 | if(gpppdata.enter() == enter->text(i)) | 167 | if(PPPData::data()->enter() == enter->text(i)) |
168 | enter->setCurrentItem(i); | 168 | enter->setCurrentItem(i); |
169 | } | 169 | } |
170 | 170 | ||
171 | tl->addRowSpacing(4, 10); | 171 | tl->addRowSpacing(4, 10); |
172 | 172 | ||
173 | //Modem Lock File | 173 | //Modem Lock File |
174 | modemlockfile = new QCheckBox(i18n("&Use lock file"), this); | 174 | modemlockfile = new QCheckBox(i18n("&Use lock file"), this); |
175 | 175 | ||
176 | modemlockfile->setChecked(gpppdata.modemLockFile()); | 176 | modemlockfile->setChecked(PPPData::data()->modemLockFile()); |
177 | connect(modemlockfile, SIGNAL(toggled(bool)), | 177 | connect(modemlockfile, SIGNAL(toggled(bool)), |
178 | SLOT(modemlockfilechanged(bool))); | 178 | SLOT(modemlockfilechanged(bool))); |
179 | tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1); | 179 | tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1); |
180 | // l12->addStretch(1); | 180 | // l12->addStretch(1); |
@@ -190,9 +190,9 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
190 | "<b>Default</b>: On")); | 190 | "<b>Default</b>: On")); |
191 | 191 | ||
192 | // Modem Timeout Line Edit Box | 192 | // Modem Timeout Line Edit Box |
193 | 193 | ||
194 | modemtimeout = new KIntNumInput(gpppdata.modemTimeout(), this); | 194 | modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); |
195 | modemtimeout->setLabel(i18n("Modem &timeout:")); | 195 | modemtimeout->setLabel(i18n("Modem &timeout:")); |
196 | modemtimeout->setRange(1, 120, 1); | 196 | modemtimeout->setRange(1, 120, 1); |
197 | modemtimeout->setSuffix(i18n(" sec")); | 197 | modemtimeout->setSuffix(i18n(" sec")); |
198 | connect(modemtimeout, SIGNAL(valueChanged(int)), | 198 | connect(modemtimeout, SIGNAL(valueChanged(int)), |
@@ -205,58 +205,58 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
205 | "recommended value is 30 seconds.")); | 205 | "recommended value is 30 seconds.")); |
206 | 206 | ||
207 | //set stuff from gpppdata | 207 | //set stuff from gpppdata |
208 | for(int i=0; i <= enter->count()-1; i++) { | 208 | for(int i=0; i <= enter->count()-1; i++) { |
209 | if(gpppdata.enter() == enter->text(i)) | 209 | if(PPPData::data()->enter() == enter->text(i)) |
210 | enter->setCurrentItem(i); | 210 | enter->setCurrentItem(i); |
211 | } | 211 | } |
212 | 212 | ||
213 | for(int i=0; i <= modemdevice->count()-1; i++) { | 213 | for(int i=0; i <= modemdevice->count()-1; i++) { |
214 | if(gpppdata.modemDevice() == modemdevice->text(i)) | 214 | if(PPPData::data()->modemDevice() == modemdevice->text(i)) |
215 | modemdevice->setCurrentItem(i); | 215 | modemdevice->setCurrentItem(i); |
216 | } | 216 | } |
217 | 217 | ||
218 | for(int i=0; i <= flowcontrol->count()-1; i++) { | 218 | for(int i=0; i <= flowcontrol->count()-1; i++) { |
219 | if(gpppdata.flowcontrol() == flowcontrol->text(i)) | 219 | if(PPPData::data()->flowcontrol() == flowcontrol->text(i)) |
220 | flowcontrol->setCurrentItem(i); | 220 | flowcontrol->setCurrentItem(i); |
221 | } | 221 | } |
222 | 222 | ||
223 | //set the modem speed | 223 | //set the modem speed |
224 | for(int i=0; i < baud_c->count(); i++) | 224 | for(int i=0; i < baud_c->count(); i++) |
225 | if(baud_c->text(i) == gpppdata.speed()) | 225 | if(baud_c->text(i) == PPPData::data()->speed()) |
226 | baud_c->setCurrentItem(i); | 226 | baud_c->setCurrentItem(i); |
227 | 227 | ||
228 | tl->setRowStretch(7, 1); | 228 | tl->setRowStretch(7, 1); |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | void ModemWidget::speed_selection(int) { | 232 | void ModemWidget::speed_selection(int) { |
233 | gpppdata.setSpeed(baud_c->text(baud_c->currentItem())); | 233 | PPPData::data()->setSpeed(baud_c->text(baud_c->currentItem())); |
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | void ModemWidget::setenter(int ) { | 237 | void ModemWidget::setenter(int ) { |
238 | gpppdata.setEnter(enter->text(enter->currentItem())); | 238 | PPPData::data()->setEnter(enter->text(enter->currentItem())); |
239 | } | 239 | } |
240 | 240 | ||
241 | 241 | ||
242 | void ModemWidget::setmodemdc(int i) { | 242 | void ModemWidget::setmodemdc(int i) { |
243 | gpppdata.setModemDevice(modemdevice->text(i)); | 243 | PPPData::data()->setModemDevice(modemdevice->text(i)); |
244 | } | 244 | } |
245 | 245 | ||
246 | 246 | ||
247 | void ModemWidget::setflowcontrol(int i) { | 247 | void ModemWidget::setflowcontrol(int i) { |
248 | gpppdata.setFlowcontrol(flowcontrol->text(i)); | 248 | PPPData::data()->setFlowcontrol(flowcontrol->text(i)); |
249 | } | 249 | } |
250 | 250 | ||
251 | 251 | ||
252 | void ModemWidget::modemlockfilechanged(bool set) { | 252 | void ModemWidget::modemlockfilechanged(bool set) { |
253 | gpppdata.setModemLockFile(set); | 253 | PPPData::data()->setModemLockFile(set); |
254 | } | 254 | } |
255 | 255 | ||
256 | 256 | ||
257 | void ModemWidget::modemtimeoutchanged(int n) { | 257 | void ModemWidget::modemtimeoutchanged(int n) { |
258 | gpppdata.setModemTimeout(n); | 258 | PPPData::data()->setModemTimeout(n); |
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | 262 | ModemWidget2::ModemWidget2( QWidget *parent, const char *name) |
@@ -265,9 +265,9 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
265 | QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); | 265 | QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); |
266 | 266 | ||
267 | 267 | ||
268 | waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); | 268 | waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); |
269 | waitfordt->setChecked(gpppdata.waitForDialTone()); | 269 | waitfordt->setChecked(PPPData::data()->waitForDialTone()); |
270 | connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); | 270 | connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); |
271 | l1->addWidget(waitfordt); | 271 | l1->addWidget(waitfordt); |
272 | QWhatsThis::add(waitfordt, | 272 | QWhatsThis::add(waitfordt, |
273 | i18n("<p>Normally the modem waits for a dial tone\n" | 273 | i18n("<p>Normally the modem waits for a dial tone\n" |
@@ -277,9 +277,9 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
277 | "does not emit such a tone, uncheck this option\n" | 277 | "does not emit such a tone, uncheck this option\n" |
278 | "\n" | 278 | "\n" |
279 | "<b>Default:</b>: On")); | 279 | "<b>Default:</b>: On")); |
280 | 280 | ||
281 | busywait = new KIntNumInput(gpppdata.busyWait(), this); | 281 | busywait = new KIntNumInput(PPPData::data()->busyWait(), this); |
282 | busywait->setLabel(i18n("B&usy wait:")); | 282 | busywait->setLabel(i18n("B&usy wait:")); |
283 | busywait->setRange(0, 300, 5, true); | 283 | busywait->setRange(0, 300, 5, true); |
284 | busywait->setSuffix(i18n(" sec")); | 284 | busywait->setSuffix(i18n(" sec")); |
285 | connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); | 285 | connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); |
@@ -300,9 +300,9 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
300 | hbl->setSpacing(2);//KDialog::spacingHint()); | 300 | hbl->setSpacing(2);//KDialog::spacingHint()); |
301 | 301 | ||
302 | QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), this); | 302 | QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), this); |
303 | hbl->addWidget(volumeLabel); | 303 | hbl->addWidget(volumeLabel); |
304 | volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, this); | 304 | volume = new QSlider(0, 2, 1, PPPData::data()->volume(), QSlider::Horizontal, this); |
305 | volumeLabel->setBuddy(volume); | 305 | volumeLabel->setBuddy(volume); |
306 | volume->setTickmarks(QSlider::Below); | 306 | volume->setTickmarks(QSlider::Below); |
307 | hbl->addWidget(volume); | 307 | hbl->addWidget(volume); |
308 | 308 | ||
@@ -324,9 +324,9 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
324 | l1->addSpacing(20); | 324 | l1->addSpacing(20); |
325 | 325 | ||
326 | #if 0 | 326 | #if 0 |
327 | chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); | 327 | chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); |
328 | chkbox1->setChecked(gpppdata.UseCDLine()); | 328 | chkbox1->setChecked(PPPData::data()->UseCDLine()); |
329 | connect(chkbox1,SIGNAL(toggled(bool)), | 329 | connect(chkbox1,SIGNAL(toggled(bool)), |
330 | this,SLOT(use_cdline_toggled(bool))); | 330 | this,SLOT(use_cdline_toggled(bool))); |
331 | l12->addWidget(chkbox1); | 331 | l12->addWidget(chkbox1); |
332 | l12->addStretch(1); | 332 | l12->addStretch(1); |
@@ -401,21 +401,21 @@ void ModemWidget2::query_modem() { | |||
401 | 401 | ||
402 | 402 | ||
403 | #if 0 | 403 | #if 0 |
404 | void ModemWidget2::use_cdline_toggled(bool on) { | 404 | void ModemWidget2::use_cdline_toggled(bool on) { |
405 | gpppdata.setUseCDLine(on); | 405 | PPPData::data()->setUseCDLine(on); |
406 | } | 406 | } |
407 | #endif | 407 | #endif |
408 | 408 | ||
409 | void ModemWidget2::waitfordtchanged(bool b) { | 409 | void ModemWidget2::waitfordtchanged(bool b) { |
410 | gpppdata.setWaitForDialTone((int)b); | 410 | PPPData::data()->setWaitForDialTone((int)b); |
411 | } | 411 | } |
412 | 412 | ||
413 | void ModemWidget2::busywaitchanged(int n) { | 413 | void ModemWidget2::busywaitchanged(int n) { |
414 | gpppdata.setbusyWait(n); | 414 | PPPData::data()->setbusyWait(n); |
415 | } | 415 | } |
416 | 416 | ||
417 | 417 | ||
418 | void ModemWidget2::volumeChanged(int v) { | 418 | void ModemWidget2::volumeChanged(int v) { |
419 | gpppdata.setVolume(v); | 419 | PPPData::data()->setVolume(v); |
420 | } | 420 | } |
421 | 421 | ||