Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppconfig.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index e2521a6..4c5f7aa 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp | |||
@@ -5,65 +5,73 @@ | |||
5 | 5 | ||
6 | #include "accounts.h" | 6 | #include "accounts.h" |
7 | #include "general.h" | 7 | #include "general.h" |
8 | #include "interface.h" | 8 | #include "interface.h" |
9 | #include "modem.h" | 9 | #include "modem.h" |
10 | #include "pppconfig.h" | 10 | #include "pppconfig.h" |
11 | #include "pppdata.h" | 11 | #include "pppdata.h" |
12 | #include "runtests.h" | 12 | #include "runtests.h" |
13 | 13 | ||
14 | PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, | 14 | PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, |
15 | const char *name, | 15 | const char *name, |
16 | bool modal, WFlags fl ) | 16 | bool modal, WFlags fl ) |
17 | : QDialog(parent, name, modal, fl) | 17 | : QDialog(parent, name, modal, fl) |
18 | { | 18 | { |
19 | setCaption(tr("Configure Modem")); | 19 | setCaption(tr("Configure Modem")); |
20 | int result = runTests(); | 20 | int result = runTests(); |
21 | if(result == TEST_CRITICAL){ | 21 | if(result == TEST_CRITICAL){ |
22 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); | 22 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); |
23 | return; | 23 | return; |
24 | } | 24 | } |
25 | 25 | ||
26 | interface = iface; | 26 | interface = iface; |
27 | if (!PPPData::data()->setModemDevice( interface->getInterfaceName() )) | 27 | if (!PPPData::data()->setModemDevice( interface->getInterfaceName() )) |
28 | PPPData::data()->setModemDevice("/dev/modem"); | 28 | PPPData::data()->setModemDevice("/dev/modem"); |
29 | qDebug("PPPConfigWidget::PPPConfigWidget"); | ||
30 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | ||
29 | if (!PPPData::data()->setAccount( interface->getHardwareName() )) | 31 | if (!PPPData::data()->setAccount( interface->getHardwareName() )) |
30 | PPPData::data()->setAccount( 0 ); | 32 | PPPData::data()->setAccount( 0 ); |
33 | |||
34 | qDebug(" PPPData::data()->accname >%s<",PPPData::data()->accname().latin1()); | ||
35 | qDebug(" PPPData::data()->currentAccountID() >%i<",PPPData::data()->currentAccountID()); | ||
31 | (void)new Modem; | 36 | (void)new Modem; |
32 | 37 | ||
33 | QVBoxLayout *layout = new QVBoxLayout( this ); | 38 | QVBoxLayout *layout = new QVBoxLayout( this ); |
34 | layout->setSpacing( 0 ); | 39 | layout->setSpacing( 0 ); |
35 | layout->setMargin( 1 ); | 40 | layout->setMargin( 1 ); |
36 | tabWindow = new QTabWidget( this, "tabWidget" ); | 41 | tabWindow = new QTabWidget( this, "tabWidget" ); |
37 | layout->addWidget( tabWindow ); | 42 | layout->addWidget( tabWindow ); |
38 | 43 | ||
39 | accounts = new AccountWidget( tabWindow, "accounts" ); | 44 | accounts = new AccountWidget( tabWindow, "accounts" ); |
40 | tabWindow->addTab( accounts, tr("&Accounts") ); | 45 | tabWindow->addTab( accounts, tr("&Accounts") ); |
41 | modem1 = new ModemWidget( tabWindow, "modem1" ); | 46 | modem1 = new ModemWidget( tabWindow, "modem1" ); |
42 | tabWindow->addTab( modem1, tr("&Device") ); | 47 | tabWindow->addTab( modem1, tr("&Device") ); |
43 | modem2 = new ModemWidget2( tabWindow, "modem2" ); | 48 | modem2 = new ModemWidget2( tabWindow, "modem2" ); |
44 | tabWindow->addTab( modem2, tr("&Modem") ); | 49 | tabWindow->addTab( modem2, tr("&Modem") ); |
45 | // graph = new GraphSetup( tabWindow->addPage( tr("&Graph"), tr("Throughput Graph" ) ) ); | 50 | // graph = new GraphSetup( tabWindow->addPage( tr("&Graph"), tr("Throughput Graph" ) ) ); |
46 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); | 51 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); |
47 | 52 | ||
48 | } | 53 | } |
49 | 54 | ||
50 | 55 | ||
51 | PPPConfigWidget::~PPPConfigWidget() | 56 | PPPConfigWidget::~PPPConfigWidget() |
52 | { | 57 | { |
53 | 58 | ||
54 | } | 59 | } |
55 | 60 | ||
56 | void PPPConfigWidget::accept() | 61 | void PPPConfigWidget::accept() |
57 | { | 62 | { |
63 | qDebug("PPPConfigWidget::accept"); | ||
64 | qDebug(" PPPData::data()->accname >%s<",PPPData::data()->accname().latin1()); | ||
65 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | ||
58 | interface->setInterfaceName( PPPData::data()->modemDevice() ); | 66 | interface->setInterfaceName( PPPData::data()->modemDevice() ); |
59 | interface->setHardwareName( PPPData::data()->accname() ); | 67 | interface->setHardwareName( PPPData::data()->accname() ); |
60 | PPPData::data()->save(); | 68 | PPPData::data()->save(); |
61 | QDialog::accept(); | 69 | QDialog::accept(); |
62 | } | 70 | } |
63 | 71 | ||
64 | 72 | ||
65 | void PPPConfigWidget::reject() | 73 | void PPPConfigWidget::reject() |
66 | { | 74 | { |
67 | PPPData::data()->cancel(); | 75 | PPPData::data()->cancel(); |
68 | QDialog::reject(); | 76 | QDialog::reject(); |
69 | } | 77 | } |