Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index 98e035b..f735e49 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp | |||
@@ -41,3 +41,3 @@ | |||
41 | #include "general.h" | 41 | #include "general.h" |
42 | //#include "version.h" | 42 | #include "interfaceppp.h" |
43 | //#include "miniterm.h" | 43 | //#include "miniterm.h" |
@@ -52,4 +52,4 @@ | |||
52 | 52 | ||
53 | ModemWidget::ModemWidget( QWidget *parent, const char *name) | 53 | ModemWidget::ModemWidget( InterfacePPP *ifppp, QWidget *parent, const char *name ) |
54 | : QWidget(parent, name) | 54 | : QWidget(parent, name), _ifaceppp(ifppp) |
55 | { | 55 | { |
@@ -174,3 +174,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
174 | for(int i=0; i <= enter->count()-1; i++) { | 174 | for(int i=0; i <= enter->count()-1; i++) { |
175 | if(PPPData::data()->enter() == enter->text(i)) | 175 | if(_ifaceppp->data()->enter() == enter->text(i)) |
176 | enter->setCurrentItem(i); | 176 | enter->setCurrentItem(i); |
@@ -183,3 +183,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
183 | 183 | ||
184 | modemlockfile->setChecked(PPPData::data()->modemLockFile()); | 184 | modemlockfile->setChecked(_ifaceppp->data()->modemLockFile()); |
185 | connect(modemlockfile, SIGNAL(toggled(bool)), | 185 | connect(modemlockfile, SIGNAL(toggled(bool)), |
@@ -203,3 +203,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
203 | modemtimeout = new QSpinBox( 1, 120, 1, this, "modemTimeout" ); | 203 | modemtimeout = new QSpinBox( 1, 120, 1, this, "modemTimeout" ); |
204 | // modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this); | 204 | // modemtimeout = new KIntNumInput(_pppdata->modemTimeout(), this); |
205 | // modemtimeout->setLabel(i18n("Modem &timeout:")); | 205 | // modemtimeout->setLabel(i18n("Modem &timeout:")); |
@@ -207,2 +207,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
207 | modemtimeout->setSuffix(i18n(" sec")); | 207 | modemtimeout->setSuffix(i18n(" sec")); |
208 | modemtimeout->setValue( _ifaceppp->data()->modemTimeout() ); | ||
208 | connect(modemtimeout, SIGNAL(valueChanged(int)), | 209 | connect(modemtimeout, SIGNAL(valueChanged(int)), |
@@ -220,3 +221,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
220 | for(int i=0; i <= enter->count()-1; i++) { | 221 | for(int i=0; i <= enter->count()-1; i++) { |
221 | if(PPPData::data()->enter() == enter->text(i)) | 222 | if(_ifaceppp->data()->enter() == enter->text(i)) |
222 | enter->setCurrentItem(i); | 223 | enter->setCurrentItem(i); |
@@ -225,3 +226,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
225 | for(int i=0; i <= modemdevice->count()-1; i++) { | 226 | for(int i=0; i <= modemdevice->count()-1; i++) { |
226 | if(PPPData::data()->modemDevice() == modemdevice->text(i)) | 227 | if(_ifaceppp->data()->modemDevice() == modemdevice->text(i)) |
227 | modemdevice->setCurrentItem(i); | 228 | modemdevice->setCurrentItem(i); |
@@ -230,3 +231,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
230 | for(int i=0; i <= flowcontrol->count()-1; i++) { | 231 | for(int i=0; i <= flowcontrol->count()-1; i++) { |
231 | if(PPPData::data()->flowcontrol() == flowcontrol->text(i)) | 232 | if(_ifaceppp->data()->flowcontrol() == flowcontrol->text(i)) |
232 | flowcontrol->setCurrentItem(i); | 233 | flowcontrol->setCurrentItem(i); |
@@ -236,3 +237,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
236 | for(int i=0; i < baud_c->count(); i++) | 237 | for(int i=0; i < baud_c->count(); i++) |
237 | if(baud_c->text(i) == PPPData::data()->speed()) | 238 | if(baud_c->text(i) == _ifaceppp->data()->speed()) |
238 | baud_c->setCurrentItem(i); | 239 | baud_c->setCurrentItem(i); |
@@ -244,3 +245,3 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name) | |||
244 | void ModemWidget::speed_selection(int) { | 245 | void ModemWidget::speed_selection(int) { |
245 | PPPData::data()->setSpeed(baud_c->text(baud_c->currentItem())); | 246 | _ifaceppp->data()->setSpeed(baud_c->text(baud_c->currentItem())); |
246 | } | 247 | } |
@@ -249,3 +250,3 @@ void ModemWidget::speed_selection(int) { | |||
249 | void ModemWidget::setenter(int ) { | 250 | void ModemWidget::setenter(int ) { |
250 | PPPData::data()->setEnter(enter->text(enter->currentItem())); | 251 | _ifaceppp->data()->setEnter(enter->text(enter->currentItem())); |
251 | } | 252 | } |
@@ -254,3 +255,3 @@ void ModemWidget::setenter(int ) { | |||
254 | void ModemWidget::setmodemdc(int i) { | 255 | void ModemWidget::setmodemdc(int i) { |
255 | PPPData::data()->setModemDevice(modemdevice->text(i)); | 256 | _ifaceppp->data()->setModemDevice(modemdevice->text(i)); |
256 | } | 257 | } |
@@ -259,3 +260,3 @@ void ModemWidget::setmodemdc(int i) { | |||
259 | void ModemWidget::setflowcontrol(int i) { | 260 | void ModemWidget::setflowcontrol(int i) { |
260 | PPPData::data()->setFlowcontrol(flowcontrol->text(i)); | 261 | _ifaceppp->data()->setFlowcontrol(flowcontrol->text(i)); |
261 | } | 262 | } |
@@ -264,3 +265,3 @@ void ModemWidget::setflowcontrol(int i) { | |||
264 | void ModemWidget::modemlockfilechanged(bool set) { | 265 | void ModemWidget::modemlockfilechanged(bool set) { |
265 | PPPData::data()->setModemLockFile(set); | 266 | _ifaceppp->data()->setModemLockFile(set); |
266 | } | 267 | } |
@@ -269,3 +270,3 @@ void ModemWidget::modemlockfilechanged(bool set) { | |||
269 | void ModemWidget::modemtimeoutchanged(int n) { | 270 | void ModemWidget::modemtimeoutchanged(int n) { |
270 | PPPData::data()->setModemTimeout(n); | 271 | _ifaceppp->data()->setModemTimeout(n); |
271 | } | 272 | } |
@@ -273,4 +274,5 @@ void ModemWidget::modemtimeoutchanged(int n) { | |||
273 | 274 | ||
274 | ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | 275 | ModemWidget2::ModemWidget2( InterfacePPP* ifp, QWidget *parent, |
275 | : QWidget(parent, name) | 276 | const char *name) |
277 | : QWidget(parent, name), _ifaceppp(ifp) | ||
276 | { | 278 | { |
@@ -280,3 +282,3 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
280 | waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); | 282 | waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); |
281 | waitfordt->setChecked(PPPData::data()->waitForDialTone()); | 283 | waitfordt->setChecked(_ifaceppp->data()->waitForDialTone()); |
282 | connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); | 284 | connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); |
@@ -295,3 +297,3 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
295 | busywait = new QSpinBox( 0, 300, 5, this, "busyWait" ); | 297 | busywait = new QSpinBox( 0, 300, 5, this, "busyWait" ); |
296 | // busywait = new KIntNumInput(PPPData::data()->busyWait(), this); | 298 | // busywait = new KIntNumInput(_pppdata->busyWait(), this); |
297 | // busywait->setLabel(i18n("B&usy wait:")); | 299 | // busywait->setLabel(i18n("B&usy wait:")); |
@@ -320,3 +322,4 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
320 | hbl->addWidget(volumeLabel); | 322 | hbl->addWidget(volumeLabel); |
321 | volume = new QSlider(0, 2, 1, PPPData::data()->volume(), QSlider::Horizontal, this); | 323 | volume = new QSlider(0, 2, 1, _ifaceppp->data()->volume(), |
324 | QSlider::Horizontal, this); | ||
322 | volumeLabel->setBuddy(volume); | 325 | volumeLabel->setBuddy(volume); |
@@ -344,3 +347,3 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
344 | chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); | 347 | chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); |
345 | chkbox1->setChecked(PPPData::data()->UseCDLine()); | 348 | chkbox1->setChecked(_ifaceppp->data()->UseCDLine()); |
346 | connect(chkbox1,SIGNAL(toggled(bool)), | 349 | connect(chkbox1,SIGNAL(toggled(bool)), |
@@ -401,3 +404,3 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name) | |||
401 | void ModemWidget2::modemcmdsbutton() { | 404 | void ModemWidget2::modemcmdsbutton() { |
402 | ModemCommands mc(this); | 405 | ModemCommands mc(_ifaceppp->data(), this); |
403 | mc.showMaximized(); | 406 | mc.showMaximized(); |
@@ -408,3 +411,3 @@ void ModemWidget2::modemcmdsbutton() { | |||
408 | void ModemWidget2::query_modem() { | 411 | void ModemWidget2::query_modem() { |
409 | ModemTransfer mt(this); | 412 | ModemTransfer mt(_ifaceppp->modem(), this); |
410 | mt.exec(); | 413 | mt.exec(); |
@@ -421,3 +424,3 @@ void ModemWidget2::query_modem() { | |||
421 | void ModemWidget2::use_cdline_toggled(bool on) { | 424 | void ModemWidget2::use_cdline_toggled(bool on) { |
422 | PPPData::data()->setUseCDLine(on); | 425 | _ifaceppp->data()->setUseCDLine(on); |
423 | } | 426 | } |
@@ -426,3 +429,3 @@ void ModemWidget2::use_cdline_toggled(bool on) { | |||
426 | void ModemWidget2::waitfordtchanged(bool b) { | 429 | void ModemWidget2::waitfordtchanged(bool b) { |
427 | PPPData::data()->setWaitForDialTone((int)b); | 430 | _ifaceppp->data()->setWaitForDialTone((int)b); |
428 | } | 431 | } |
@@ -430,3 +433,3 @@ void ModemWidget2::waitfordtchanged(bool b) { | |||
430 | void ModemWidget2::busywaitchanged(int n) { | 433 | void ModemWidget2::busywaitchanged(int n) { |
431 | PPPData::data()->setbusyWait(n); | 434 | _ifaceppp->data()->setbusyWait(n); |
432 | } | 435 | } |
@@ -435,3 +438,3 @@ void ModemWidget2::busywaitchanged(int n) { | |||
435 | void ModemWidget2::volumeChanged(int v) { | 438 | void ModemWidget2::volumeChanged(int v) { |
436 | PPPData::data()->setVolume(v); | 439 | _ifaceppp->data()->setVolume(v); |
437 | } | 440 | } |