Diffstat (limited to 'noncore/settings/networksettings/ppp/edit.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/edit.cpp | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp index 961047b..6132b80 100644 --- a/noncore/settings/networksettings/ppp/edit.cpp +++ b/noncore/settings/networksettings/ppp/edit.cpp | |||
@@ -43,3 +43,3 @@ | |||
43 | #include "pppdata.h" | 43 | #include "pppdata.h" |
44 | #include "newwidget.h" | 44 | //#include "newwidget.h" |
45 | #include "iplined.h" | 45 | #include "iplined.h" |
@@ -52,9 +52,9 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
52 | 52 | ||
53 | QGridLayout *tl = new QGridLayout(parent, GRIDROWS, 2, 0 );//, KDialog::spacingHint()); | 53 | QGridLayout *tl = new QGridLayout(this, GRIDROWS, 2, 0 );//, KDialog::spacingHint()); |
54 | 54 | ||
55 | connect_label = new QLabel(i18n("Connection name:"), parent); | 55 | connect_label = new QLabel(i18n("Connection name:"), this); |
56 | tl->addWidget(connect_label, 0, 0); | 56 | tl->addWidget(connect_label, 0, 0); |
57 | 57 | ||
58 | connectname_l = new QLineEdit(parent); | 58 | connectname_l = new QLineEdit(this); |
59 | connectname_l->setMaxLength(ACCNAME_SIZE); | 59 | // connectname_l->setMaxLength(ACCNAME_SIZE); |
60 | tl->addWidget(connectname_l, 0, 1); | 60 | tl->addWidget(connectname_l, 0, 1); |
@@ -66,3 +66,3 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
66 | 66 | ||
67 | number_label = new QLabel(i18n("Phone number:"), parent); | 67 | number_label = new QLabel(i18n("Phone number:"), this); |
68 | number_label->setAlignment(AlignTop|AlignLeft); | 68 | number_label->setAlignment(AlignTop|AlignLeft); |
@@ -72,3 +72,3 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
72 | tl->addLayout(lpn, 1, 1); | 72 | tl->addLayout(lpn, 1, 1); |
73 | numbers = new QListBox(parent); | 73 | numbers = new QListBox(this); |
74 | numbers->setMinimumSize(120, 70); | 74 | numbers->setMinimumSize(120, 70); |
@@ -77,9 +77,9 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
77 | lpn->addLayout(lpn1); | 77 | lpn->addLayout(lpn1); |
78 | add = new QPushButton(i18n("&Add..."), parent); | 78 | add = new QPushButton(i18n("&Add..."), this); |
79 | del = new QPushButton(i18n("&Remove"), parent); | 79 | del = new QPushButton(i18n("&Remove"), this); |
80 | 80 | ||
81 | up = new QPushButton(parent); | 81 | up = new QPushButton(this); |
82 | //FIXME: QPixmap pm = BarIcon("up"); | 82 | //FIXME: QPixmap pm = BarIcon("up"); |
83 | // up->setPixmap(pm); | 83 | // up->setPixmap(pm); |
84 | down = new QPushButton(parent); | 84 | down = new QPushButton(this); |
85 | //FIXME: pm = BarIcon("down"); | 85 | //FIXME: pm = BarIcon("down"); |
@@ -114,6 +114,6 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
114 | 114 | ||
115 | auth_l = new QLabel(i18n("Authentication:"), parent); | 115 | auth_l = new QLabel(i18n("Authentication:"), this); |
116 | tl->addWidget(auth_l, 3, 0); | 116 | tl->addWidget(auth_l, 3, 0); |
117 | 117 | ||
118 | auth = new QComboBox(parent); | 118 | auth = new QComboBox(this); |
119 | auth->insertItem(i18n("Script-based")); | 119 | auth->insertItem(i18n("Script-based")); |
@@ -137,3 +137,3 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
137 | 137 | ||
138 | store_password = new QCheckBox(i18n("Store password"), parent); | 138 | store_password = new QCheckBox(i18n("Store password"), this); |
139 | store_password->setChecked(true); | 139 | store_password->setChecked(true); |
@@ -150,3 +150,3 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
150 | 150 | ||
151 | pppdargs = new QPushButton(i18n("Customize pppd Arguments..."), parent); | 151 | pppdargs = new QPushButton(i18n("Customize pppd Arguments..."), this); |
152 | connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton())); | 152 | connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton())); |
@@ -156,6 +156,6 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
156 | if(!isnewaccount) { | 156 | if(!isnewaccount) { |
157 | connectname_l->setText(gpppdata.accname()); | 157 | connectname_l->setText(PPPData::data()->accname()); |
158 | 158 | ||
159 | // insert the phone numbers into the listbox | 159 | // insert the phone numbers into the listbox |
160 | QString n = gpppdata.phonenumber(); | 160 | QString n = PPPData::data()->phonenumber(); |
161 | QString tmp = ""; | 161 | QString tmp = ""; |
@@ -174,4 +174,4 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
174 | 174 | ||
175 | auth->setCurrentItem(gpppdata.authMethod()); | 175 | auth->setCurrentItem(PPPData::data()->authMethod()); |
176 | store_password->setChecked(gpppdata.storePassword()); | 176 | store_password->setChecked(PPPData::data()->storePassword()); |
177 | } else { | 177 | } else { |
@@ -189,6 +189,6 @@ bool DialWidget::save() { | |||
189 | if(connectname_l->text().isEmpty() || | 189 | if(connectname_l->text().isEmpty() || |
190 | !gpppdata.isUniqueAccname(connectname_l->text())) { | 190 | !PPPData::data()->isUniqueAccname(connectname_l->text())) { |
191 | return false; | 191 | return false; |
192 | } else { | 192 | } else { |
193 | gpppdata.setAccname(connectname_l->text()); | 193 | PPPData::data()->setAccname(connectname_l->text()); |
194 | 194 | ||
@@ -201,5 +201,5 @@ bool DialWidget::save() { | |||
201 | 201 | ||
202 | gpppdata.setPhonenumber(number); | 202 | PPPData::data()->setPhonenumber(number); |
203 | gpppdata.setAuthMethod(auth->currentItem()); | 203 | PPPData::data()->setAuthMethod(auth->currentItem()); |
204 | gpppdata.setStorePassword(store_password->isChecked()); | 204 | PPPData::data()->setStorePassword(store_password->isChecked()); |
205 | return true; | 205 | return true; |
@@ -277,3 +277,3 @@ ExecWidget::ExecWidget(QWidget *parent, bool isnewaccount, const char *name) : | |||
277 | { | 277 | { |
278 | QVBoxLayout *tl = new QVBoxLayout(parent, 0 );//, KDialog::spacingHint()); | 278 | QVBoxLayout *tl = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); |
279 | 279 | ||
@@ -285,4 +285,4 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
285 | "Be sure to supply the whole path to the program otherwise\n" | 285 | "Be sure to supply the whole path to the program otherwise\n" |
286 | "kppp might be unable to find it."), parent); | 286 | "kppp might be unable to find it."), this); |
287 | l->setMinimumHeight(l->sizeHint().height()); | 287 | // l->setMinimumHeight(l->sizeHint().height()); |
288 | tl->addWidget(l); | 288 | tl->addWidget(l); |
@@ -295,7 +295,7 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
295 | 295 | ||
296 | before_connect_l = new QLabel(i18n("Before connect:"), parent); | 296 | before_connect_l = new QLabel(i18n("Before connect:"), this); |
297 | before_connect_l->setAlignment(AlignVCenter); | 297 | before_connect_l->setAlignment(AlignVCenter); |
298 | l1->addWidget(before_connect_l, 0, 0); | 298 | l1->addWidget(before_connect_l, 0, 0); |
299 | before_connect = new QLineEdit(parent); | 299 | before_connect = new QLineEdit(this); |
300 | before_connect->setMaxLength(COMMAND_SIZE); | 300 | // before_connect->setMaxLength(COMMAND_SIZE); |
301 | l1->addWidget(before_connect, 0, 1); | 301 | l1->addWidget(before_connect, 0, 1); |
@@ -310,7 +310,7 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
310 | 310 | ||
311 | command_label = new QLabel(i18n("Upon connect:"), parent); | 311 | command_label = new QLabel(i18n("Upon connect:"), this); |
312 | command_label->setAlignment(AlignVCenter); | 312 | command_label->setAlignment(AlignVCenter); |
313 | l1->addWidget(command_label, 1, 0); | 313 | l1->addWidget(command_label, 1, 0); |
314 | command = new QLineEdit(parent); | 314 | command = new QLineEdit(this); |
315 | command->setMaxLength(COMMAND_SIZE); | 315 | // command->setMaxLength(COMMAND_SIZE); |
316 | l1->addWidget(command, 1, 1); | 316 | l1->addWidget(command, 1, 1); |
@@ -326,7 +326,7 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
326 | predisconnect_label = new QLabel(i18n("Before disconnect:"), | 326 | predisconnect_label = new QLabel(i18n("Before disconnect:"), |
327 | parent); | 327 | this); |
328 | predisconnect_label->setAlignment(AlignVCenter); | 328 | predisconnect_label->setAlignment(AlignVCenter); |
329 | l1->addWidget(predisconnect_label, 2, 0); | 329 | l1->addWidget(predisconnect_label, 2, 0); |
330 | predisconnect = new QLineEdit(parent); | 330 | predisconnect = new QLineEdit(this); |
331 | predisconnect->setMaxLength(COMMAND_SIZE); | 331 | // predisconnect->setMaxLength(COMMAND_SIZE); |
332 | l1->addWidget(predisconnect, 2, 1); | 332 | l1->addWidget(predisconnect, 2, 1); |
@@ -340,3 +340,3 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
340 | discommand_label = new QLabel(i18n("Upon disconnect:"), | 340 | discommand_label = new QLabel(i18n("Upon disconnect:"), |
341 | parent); | 341 | this); |
342 | discommand_label->setAlignment(AlignVCenter); | 342 | discommand_label->setAlignment(AlignVCenter); |
@@ -344,4 +344,4 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
344 | 344 | ||
345 | discommand = new QLineEdit(parent); | 345 | discommand = new QLineEdit(this); |
346 | discommand->setMaxLength(COMMAND_SIZE); | 346 | // discommand->setMaxLength(COMMAND_SIZE); |
347 | l1->addWidget(discommand, 3, 1); | 347 | l1->addWidget(discommand, 3, 1); |
@@ -362,6 +362,6 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
362 | if(!isnewaccount) { | 362 | if(!isnewaccount) { |
363 | before_connect->setText(gpppdata.command_before_connect()); | 363 | before_connect->setText(PPPData::data()->command_before_connect()); |
364 | command->setText(gpppdata.command_on_connect()); | 364 | command->setText(PPPData::data()->command_on_connect()); |
365 | discommand->setText(gpppdata.command_on_disconnect()); | 365 | discommand->setText(PPPData::data()->command_on_disconnect()); |
366 | predisconnect->setText(gpppdata.command_before_disconnect()); | 366 | predisconnect->setText(PPPData::data()->command_before_disconnect()); |
367 | } | 367 | } |
@@ -371,6 +371,6 @@ i18n("Here you can select commands to run at certain stages of the\n" | |||
371 | bool ExecWidget::save() { | 371 | bool ExecWidget::save() { |
372 | gpppdata.setCommand_before_connect(before_connect->text()); | 372 | PPPData::data()->setCommand_before_connect(before_connect->text()); |
373 | gpppdata.setCommand_on_connect(command->text()); | 373 | PPPData::data()->setCommand_on_connect(command->text()); |
374 | gpppdata.setCommand_before_disconnect(predisconnect->text()); | 374 | PPPData::data()->setCommand_before_disconnect(predisconnect->text()); |
375 | gpppdata.setCommand_on_disconnect(discommand->text()); | 375 | PPPData::data()->setCommand_on_disconnect(discommand->text()); |
376 | return true; | 376 | return true; |
@@ -388,9 +388,9 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
388 | { | 388 | { |
389 | QVBoxLayout *topLayout = new QVBoxLayout(parent); | 389 | QVBoxLayout *topLayout = new QVBoxLayout(this); |
390 | topLayout->setSpacing( 3 );//KDialog::spacingHint()); | 390 | topLayout->setSpacing( 3 );//KDialog::spacingHint()); |
391 | 391 | ||
392 | box = new QVGroupBox(i18n("Configuration"), parent); | 392 | box = new QVGroupBox(i18n("Configuration"), this); |
393 | // box->setInsideSpacing( 1 );//KDialog::spacingHint()); | 393 | // box->setInsideSpacing( 1 );//KDialog::spacingHint()); |
394 | 394 | ||
395 | rb = new QButtonGroup(parent); | 395 | rb = new QButtonGroup(this); |
396 | rb->hide(); | 396 | rb->hide(); |
@@ -450,4 +450,4 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
450 | 450 | ||
451 | autoname = new QCheckBox(i18n("Auto-configure hostname from this IP"), parent); | 451 | autoname = new QCheckBox(i18n("Auto-configure hostname from this IP"), this); |
452 | autoname->setChecked(gpppdata.autoname()); | 452 | autoname->setChecked(PPPData::data()->autoname()); |
453 | connect(autoname,SIGNAL(toggled(bool)), | 453 | connect(autoname,SIGNAL(toggled(bool)), |
@@ -471,11 +471,11 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
471 | if(!isnewaccount) { | 471 | if(!isnewaccount) { |
472 | if(gpppdata.ipaddr() == "0.0.0.0" && | 472 | if(PPPData::data()->ipaddr() == "0.0.0.0" && |
473 | gpppdata.subnetmask() == "0.0.0.0") { | 473 | PPPData::data()->subnetmask() == "0.0.0.0") { |
474 | dynamicadd_rb->setChecked(true); | 474 | dynamicadd_rb->setChecked(true); |
475 | hitIPSelect(0); | 475 | hitIPSelect(0); |
476 | autoname->setChecked(gpppdata.autoname()); | 476 | autoname->setChecked(PPPData::data()->autoname()); |
477 | } | 477 | } |
478 | else { | 478 | else { |
479 | ipaddress_l->setText(gpppdata.ipaddr()); | 479 | ipaddress_l->setText(PPPData::data()->ipaddr()); |
480 | subnetmask_l->setText(gpppdata.subnetmask()); | 480 | subnetmask_l->setText(PPPData::data()->subnetmask()); |
481 | staticadd_rb->setChecked(true); | 481 | staticadd_rb->setChecked(true); |
@@ -512,9 +512,9 @@ void IPWidget::save() { | |||
512 | if(dynamicadd_rb->isChecked()) { | 512 | if(dynamicadd_rb->isChecked()) { |
513 | gpppdata.setIpaddr("0.0.0.0"); | 513 | PPPData::data()->setIpaddr("0.0.0.0"); |
514 | gpppdata.setSubnetmask("0.0.0.0"); | 514 | PPPData::data()->setSubnetmask("0.0.0.0"); |
515 | } else { | 515 | } else { |
516 | gpppdata.setIpaddr(ipaddress_l->text()); | 516 | PPPData::data()->setIpaddr(ipaddress_l->text()); |
517 | gpppdata.setSubnetmask(subnetmask_l->text()); | 517 | PPPData::data()->setSubnetmask(subnetmask_l->text()); |
518 | } | 518 | } |
519 | gpppdata.setAutoname(autoname->isChecked()); | 519 | PPPData::data()->setAutoname(autoname->isChecked()); |
520 | } | 520 | } |
@@ -542,10 +542,10 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
542 | { | 542 | { |
543 | // box = new QGroupBox(parent); | 543 | // box = new QGroupBox(this); |
544 | QGridLayout *tl = new QGridLayout(parent, 7, 2, 0 );//, KDialog::spacingHint()); | 544 | QGridLayout *tl = new QGridLayout(this, 7, 2, 0 );//, KDialog::spacingHint()); |
545 | 545 | ||
546 | dnsdomain_label = new QLabel(i18n("Domain name:"), parent); | 546 | dnsdomain_label = new QLabel(i18n("Domain name:"), this); |
547 | tl->addWidget(dnsdomain_label, 0, 0); | 547 | tl->addWidget(dnsdomain_label, 0, 0); |
548 | 548 | ||
549 | dnsdomain = new QLineEdit(parent); | 549 | dnsdomain = new QLineEdit(this); |
550 | dnsdomain->setMaxLength(DOMAIN_SIZE); | 550 | // dnsdomain->setMaxLength(DOMAIN_SIZE); |
551 | tl->addWidget(dnsdomain, 0, 1); | 551 | tl->addWidget(dnsdomain, 0, 1); |
@@ -563,3 +563,3 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
563 | 563 | ||
564 | conf_label = new QLabel(i18n("Configuration:"), parent); | 564 | conf_label = new QLabel(i18n("Configuration:"), this); |
565 | tl->addWidget(conf_label, 1, 0); | 565 | tl->addWidget(conf_label, 1, 0); |
@@ -570,3 +570,3 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
570 | 570 | ||
571 | autodns = new QRadioButton(i18n("Automatic"), parent); | 571 | autodns = new QRadioButton(i18n("Automatic"), this); |
572 | bg->insert(autodns, 0); | 572 | bg->insert(autodns, 0); |
@@ -574,6 +574,6 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
574 | // no automatic DNS detection for pppd < 2.3.7 | 574 | // no automatic DNS detection for pppd < 2.3.7 |
575 | if(!gpppdata.pppdVersionMin(2, 3, 7)) | 575 | if(!PPPData::data()->pppdVersionMin(2, 3, 7)) |
576 | autodns->setEnabled(false); | 576 | autodns->setEnabled(false); |
577 | 577 | ||
578 | mandns = new QRadioButton(i18n("Manual"), parent); | 578 | mandns = new QRadioButton(i18n("Manual"), this); |
579 | bg->insert(mandns, 1); | 579 | bg->insert(mandns, 1); |
@@ -581,3 +581,3 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
581 | 581 | ||
582 | dns_label = new QLabel(i18n("DNS IP address:"), parent); | 582 | dns_label = new QLabel(i18n("DNS IP address:"), this); |
583 | tl->addWidget(dns_label, 3, 0); | 583 | tl->addWidget(dns_label, 3, 0); |
@@ -586,3 +586,3 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
586 | tl->addLayout(l2, 3, 1); | 586 | tl->addLayout(l2, 3, 1); |
587 | dnsipaddr = new IPLineEdit(parent); | 587 | dnsipaddr = new IPLineEdit(this); |
588 | connect(dnsipaddr, SIGNAL(returnPressed()), | 588 | connect(dnsipaddr, SIGNAL(returnPressed()), |
@@ -606,7 +606,7 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
606 | tl->addLayout(l1, 4, 1); | 606 | tl->addLayout(l1, 4, 1); |
607 | add = new QPushButton(i18n("Add"), parent); | 607 | add = new QPushButton(i18n("Add"), this); |
608 | connect(add, SIGNAL(clicked()), SLOT(adddns())); | 608 | connect(add, SIGNAL(clicked()), SLOT(adddns())); |
609 | int width = add->sizeHint().width(); | 609 | // int width = add->sizeHint().width(); |
610 | width = QMAX(width,60); | 610 | // width = QMAX(width,60); |
611 | add->setMinimumWidth(width); | 611 | // add->setMinimumWidth(width); |
612 | l1->addWidget(add); | 612 | l1->addWidget(add); |
@@ -618,7 +618,7 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
618 | 618 | ||
619 | remove = new QPushButton(i18n("Remove"), parent); | 619 | remove = new QPushButton(i18n("Remove"), this); |
620 | connect(remove, SIGNAL(clicked()), SLOT(removedns())); | 620 | connect(remove, SIGNAL(clicked()), SLOT(removedns())); |
621 | width = remove->sizeHint().width(); | 621 | // width = remove->sizeHint().width(); |
622 | width = QMAX(width,60); | 622 | // width = QMAX(width,60); |
623 | remove->setMinimumWidth(width); | 623 | // remove->setMinimumWidth(width); |
624 | l1->addWidget(remove); | 624 | l1->addWidget(remove); |
@@ -628,3 +628,3 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
628 | 628 | ||
629 | servers_label = new QLabel(i18n("DNS address list:"), parent); | 629 | servers_label = new QLabel(i18n("DNS address list:"), this); |
630 | servers_label->setAlignment(AlignTop|AlignLeft); | 630 | servers_label->setAlignment(AlignTop|AlignLeft); |
@@ -632,3 +632,3 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
632 | 632 | ||
633 | dnsservers = new QListBox(parent); | 633 | dnsservers = new QListBox(this); |
634 | dnsservers->setMinimumSize(150, 80); | 634 | dnsservers->setMinimumSize(150, 80); |
@@ -646,4 +646,4 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
646 | "Disable existing DNS servers during connection"), | 646 | "Disable existing DNS servers during connection"), |
647 | parent); | 647 | this); |
648 | exdnsdisabled_toggle->setChecked(gpppdata.exDNSDisabled()); | 648 | exdnsdisabled_toggle->setChecked(PPPData::data()->exDNSDisabled()); |
649 | tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter); | 649 | tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter); |
@@ -663,7 +663,7 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) | |||
663 | if(!isnewaccount) { | 663 | if(!isnewaccount) { |
664 | dnsservers->insertStringList(gpppdata.dns()); | 664 | dnsservers->insertStringList(PPPData::data()->dns()); |
665 | dnsdomain->setText(gpppdata.domain()); | 665 | dnsdomain->setText(PPPData::data()->domain()); |
666 | } | 666 | } |
667 | 667 | ||
668 | int mode = gpppdata.autoDNS() ? 0 : 1; | 668 | int mode = PPPData::data()->autoDNS() ? 0 : 1; |
669 | bg->setButton(mode); | 669 | bg->setButton(mode); |
@@ -697,3 +697,3 @@ void DNSWidget::DNS_Mode_Selected(int mode) { | |||
697 | void DNSWidget::save() { | 697 | void DNSWidget::save() { |
698 | gpppdata.setAutoDNS(bg->id(bg->selected()) == 0); | 698 | PPPData::data()->setAutoDNS(bg->id(bg->selected()) == 0); |
699 | QStringList serverlist; | 699 | QStringList serverlist; |
@@ -701,3 +701,3 @@ void DNSWidget::save() { | |||
701 | serverlist.append(dnsservers->text(i)); | 701 | serverlist.append(dnsservers->text(i)); |
702 | gpppdata.setDns(serverlist); | 702 | PPPData::data()->setDns(serverlist); |
703 | 703 | ||
@@ -706,7 +706,7 @@ void DNSWidget::save() { | |||
706 | if(s.left(1) == ".") | 706 | if(s.left(1) == ".") |
707 | gpppdata.setDomain(s.mid(1)); | 707 | PPPData::data()->setDomain(s.mid(1)); |
708 | else | 708 | else |
709 | gpppdata.setDomain(dnsdomain->text()); | 709 | PPPData::data()->setDomain(dnsdomain->text()); |
710 | 710 | ||
711 | gpppdata.setExDNSDisabled(exdnsdisabled_toggle->isChecked()); | 711 | PPPData::data()->setExDNSDisabled(exdnsdisabled_toggle->isChecked()); |
712 | } | 712 | } |
@@ -737,9 +737,9 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na | |||
737 | { | 737 | { |
738 | QVBoxLayout *topLayout = new QVBoxLayout(parent); | 738 | QVBoxLayout *topLayout = new QVBoxLayout(this); |
739 | topLayout->setSpacing( 2 );//KDialog::spacingHint()); | 739 | topLayout->setSpacing( 2 );//KDialog::spacingHint()); |
740 | 740 | ||
741 | box = new QVGroupBox(i18n("Configuration"), parent); | 741 | box = new QVGroupBox(i18n("Configuration"), this); |
742 | // box->setInsideSpacing( 2 );//KDialog::spacingHint()); | 742 | // box->setInsideSpacing( 2 );//KDialog::spacingHint()); |
743 | 743 | ||
744 | rb = new QButtonGroup(parent); | 744 | rb = new QButtonGroup(this); |
745 | rb->hide(); | 745 | rb->hide(); |
@@ -773,3 +773,3 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na | |||
773 | defaultroute = new QCheckBox(i18n("Assign the default route to this gateway"), | 773 | defaultroute = new QCheckBox(i18n("Assign the default route to this gateway"), |
774 | parent); | 774 | this); |
775 | QWhatsThis::add(defaultroute, | 775 | QWhatsThis::add(defaultroute, |
@@ -787,3 +787,3 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na | |||
787 | if(!isnewaccount) { | 787 | if(!isnewaccount) { |
788 | if(gpppdata.gateway() == "0.0.0.0") { | 788 | if(PPPData::data()->gateway() == "0.0.0.0") { |
789 | defaultgateway->setChecked(true); | 789 | defaultgateway->setChecked(true); |
@@ -792,6 +792,6 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na | |||
792 | else { | 792 | else { |
793 | gatewayaddr->setText(gpppdata.gateway()); | 793 | gatewayaddr->setText(PPPData::data()->gateway()); |
794 | staticgateway->setChecked(true); | 794 | staticgateway->setChecked(true); |
795 | } | 795 | } |
796 | defaultroute->setChecked(gpppdata.defaultroute()); | 796 | defaultroute->setChecked(PPPData::data()->defaultroute()); |
797 | } | 797 | } |
@@ -805,4 +805,4 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na | |||
805 | void GatewayWidget::save() { | 805 | void GatewayWidget::save() { |
806 | gpppdata.setGateway(gatewayaddr->text()); | 806 | PPPData::data()->setGateway(gatewayaddr->text()); |
807 | gpppdata.setDefaultroute(defaultroute->isChecked()); | 807 | PPPData::data()->setDefaultroute(defaultroute->isChecked()); |
808 | } | 808 | } |
@@ -828,4 +828,4 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name | |||
828 | { | 828 | { |
829 | QVBoxLayout *tl = new QVBoxLayout(parent, 0 );//, KDialog::spacingHint()); | 829 | QVBoxLayout *tl = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); |
830 | se = new ScriptEdit(parent); | 830 | se = new ScriptEdit(this); |
831 | connect(se, SIGNAL(returnPressed()), SLOT(addButton())); | 831 | connect(se, SIGNAL(returnPressed()), SLOT(addButton())); |
@@ -834,3 +834,3 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name | |||
834 | // insert equal-sized buttons | 834 | // insert equal-sized buttons |
835 | QButtonGroup *bbox = new QButtonGroup(parent); | 835 | QButtonGroup *bbox = new QButtonGroup(this); |
836 | add = new QPushButton( bbox, i18n("Add") ); | 836 | add = new QPushButton( bbox, i18n("Add") ); |
@@ -851,3 +851,3 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name | |||
851 | tl->addLayout(l12); | 851 | tl->addLayout(l12); |
852 | stl = new QListBox(parent); | 852 | stl = new QListBox(this); |
853 | stl->setVScrollBarMode( QScrollView::AlwaysOff ); | 853 | stl->setVScrollBarMode( QScrollView::AlwaysOff ); |
@@ -856,3 +856,3 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name | |||
856 | 856 | ||
857 | sl = new QListBox(parent); | 857 | sl = new QListBox(this); |
858 | sl->setVScrollBarMode( QScrollView::AlwaysOff ); | 858 | sl->setVScrollBarMode( QScrollView::AlwaysOff ); |
@@ -861,4 +861,4 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name | |||
861 | 861 | ||
862 | slb = new QScrollBar(parent); | 862 | slb = new QScrollBar(this); |
863 | slb->setFixedWidth(slb->sizeHint().width()); | 863 | // slb->setFixedWidth(slb->sizeHint().width()); |
864 | connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int))); | 864 | connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int))); |
@@ -871,4 +871,4 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name | |||
871 | if(!isnewaccount) { | 871 | if(!isnewaccount) { |
872 | QStringList &comlist = gpppdata.scriptType(); | 872 | QStringList &comlist = PPPData::data()->scriptType(); |
873 | QStringList &arglist = gpppdata.script(); | 873 | QStringList &arglist = PPPData::data()->script(); |
874 | QStringList::Iterator itcom = comlist.begin(); | 874 | QStringList::Iterator itcom = comlist.begin(); |
@@ -918,4 +918,4 @@ void ScriptWidget::save() { | |||
918 | } | 918 | } |
919 | gpppdata.setScriptType(typelist); | 919 | PPPData::data()->setScriptType(typelist); |
920 | gpppdata.setScript(arglist); | 920 | PPPData::data()->setScript(arglist); |
921 | } | 921 | } |
@@ -1156,3 +1156,3 @@ void ScriptWidget::removeButton() { | |||
1156 | PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) | 1156 | PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) |
1157 | : QDialog(parent, 0, true ) { | 1157 | : QDialog(parent,"PhoneNumberDialog",true) { |
1158 | setCaption( i18n("Add Phone Number") ); | 1158 | setCaption( i18n("Add Phone Number") ); |
@@ -1167,4 +1167,4 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) | |||
1167 | 1167 | ||
1168 | le = newLineEdit(14, hbox); | 1168 | le = new QLineEdit(hbox); |
1169 | le->setMinimumWidth(125); | 1169 | // le->setMinimumWidth(125); |
1170 | 1170 | ||