author | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
commit | a7e015198a8c5ad3b6e144a9032b059086253e00 (patch) (unidiff) | |
tree | b712b6f11310d88744fe393a92b3160b741a7efe /noncore/settings/networksettings/ppp/pppconfig.cpp | |
parent | beba0e73306815337bf04dee39502233595e9739 (diff) | |
download | opie-a7e015198a8c5ad3b6e144a9032b059086253e00.zip opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.gz opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppconfig.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index 5fa7d3f..97baf31 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp | |||
@@ -1,70 +1,75 @@ | |||
1 | 1 | ||
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qmessagebox.h> | 3 | #include <qmessagebox.h> |
4 | #include <qtabwidget.h> | 4 | #include <qtabwidget.h> |
5 | 5 | ||
6 | #include "accounts.h" | 6 | #include "accounts.h" |
7 | #include "devices.h" | ||
7 | #include "general.h" | 8 | #include "general.h" |
8 | #include "interfaceppp.h" | 9 | #include "interfaceppp.h" |
9 | #include "modem.h" | 10 | #include "modem.h" |
10 | #include "pppconfig.h" | 11 | #include "pppconfig.h" |
11 | #include "pppdata.h" | 12 | #include "pppdata.h" |
12 | #include "runtests.h" | 13 | #include "runtests.h" |
13 | 14 | ||
14 | PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent, | 15 | PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent, |
15 | const char *name, | 16 | const char *name, |
16 | bool modal, WFlags fl ) | 17 | bool modal, WFlags fl ) |
17 | : QDialog(parent, name, modal, fl) | 18 | : QDialog(parent, name, modal, fl) |
18 | { | 19 | { |
19 | setCaption(tr("Configure Modem")); | 20 | setCaption(tr("Configure Modem")); |
20 | int result = runTests(); | 21 | int result = runTests(); |
21 | if(result == TEST_CRITICAL){ | 22 | if(result == TEST_CRITICAL){ |
22 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); | 23 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); |
23 | return; | 24 | return; |
24 | } | 25 | } |
25 | 26 | ||
26 | interface = iface; | 27 | interface = iface; |
27 | qDebug("PPPConfigWidget::PPPConfigWidget"); | 28 | qDebug("PPPConfigWidget::PPPConfigWidget"); |
28 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | 29 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); |
29 | 30 | ||
30 | qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); | 31 | qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); |
31 | qDebug(" _pppdata->currentAccountID() >%i<",interface->data()->currentAccountID()); | 32 | |
32 | 33 | ||
33 | QVBoxLayout *layout = new QVBoxLayout( this ); | 34 | QVBoxLayout *layout = new QVBoxLayout( this ); |
34 | layout->setSpacing( 0 ); | 35 | layout->setSpacing( 0 ); |
35 | layout->setMargin( 1 ); | 36 | layout->setMargin( 1 ); |
36 | tabWindow = new QTabWidget( this, "tabWidget" ); | 37 | tabWindow = new QTabWidget( this, "tabWidget" ); |
37 | layout->addWidget( tabWindow ); | 38 | layout->addWidget( tabWindow ); |
38 | 39 | ||
39 | accounts = new AccountWidget( interface->data(), tabWindow, "accounts" ); | 40 | accounts = new AccountWidget( interface->data(), tabWindow, "accounts", Qt::WStyle_ContextHelp ); |
40 | tabWindow->addTab( accounts, tr("&Accounts") ); | 41 | tabWindow->addTab( accounts, tr("&Accounts") ); |
41 | modem1 = new ModemWidget( interface, tabWindow, "modem1" ); | 42 | devices = new DevicesWidget( interface, tabWindow, "devices", Qt::WStyle_ContextHelp ); |
42 | tabWindow->addTab( modem1, tr("&Device") ); | 43 | tabWindow->addTab( devices, tr("&Devices") ); |
43 | modem2 = new ModemWidget2( interface, tabWindow, "modem2" ); | 44 | |
44 | tabWindow->addTab( modem2, tr("&Modem") ); | 45 | //OLD: |
46 | // modem1 = new ModemWidget( interface, tabWindow, "modem1" ); | ||
47 | // tabWindow->addTab( modem1, tr("&Device") ); | ||
48 | // modem2 = new ModemWidget2( interface, tabWindow, "modem2" ); | ||
49 | // tabWindow->addTab( modem2, tr("&Modem") ); | ||
45 | 50 | ||
46 | } | 51 | } |
47 | 52 | ||
48 | 53 | ||
49 | PPPConfigWidget::~PPPConfigWidget() | 54 | PPPConfigWidget::~PPPConfigWidget() |
50 | { | 55 | { |
51 | 56 | ||
52 | } | 57 | } |
53 | 58 | ||
54 | void PPPConfigWidget::accept() | 59 | void PPPConfigWidget::accept() |
55 | { | 60 | { |
56 | qDebug("PPPConfigWidget::accept"); | 61 | qDebug("PPPConfigWidget::accept"); |
57 | qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); | 62 | qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); |
58 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | 63 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); |
59 | interface->setInterfaceName( interface->data()->modemDevice() ); | 64 | interface->setInterfaceName( interface->data()->devname() ); |
60 | interface->setHardwareName( interface->data()->accname() ); | 65 | interface->setHardwareName( interface->data()->accname() ); |
61 | interface->save(); | 66 | interface->save(); |
62 | QDialog::accept(); | 67 | QDialog::accept(); |
63 | } | 68 | } |
64 | 69 | ||
65 | 70 | ||
66 | void PPPConfigWidget::reject() | 71 | void PPPConfigWidget::reject() |
67 | { | 72 | { |
68 | interface->data()->cancel(); | 73 | interface->data()->cancel(); |
69 | QDialog::reject(); | 74 | QDialog::reject(); |
70 | } | 75 | } |