Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppconfig.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp new file mode 100644 index 0000000..7b2b21b --- a/dev/null +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp | |||
@@ -0,0 +1,62 @@ | |||
1 | |||
2 | #include <qlayout.h> | ||
3 | #include <qmessagebox.h> | ||
4 | #include <qtabwidget.h> | ||
5 | |||
6 | #include "accounts.h" | ||
7 | #include "general.h" | ||
8 | #include "pppconfig.h" | ||
9 | #include "pppdata.h" | ||
10 | #include "runtests.h" | ||
11 | #include "modem.h" | ||
12 | |||
13 | PPPConfigWidget::PPPConfigWidget( QWidget *parent, const char *name, | ||
14 | bool modal, WFlags fl ) | ||
15 | : QDialog(parent, name, modal, fl) | ||
16 | { | ||
17 | setCaption(tr("Configure Modem")); | ||
18 | int result = runTests(); | ||
19 | if(result == TEST_CRITICAL){ | ||
20 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); | ||
21 | return; | ||
22 | } | ||
23 | |||
24 | // setFixedSize(sizeHint()); | ||
25 | |||
26 | (void)new Modem; | ||
27 | |||
28 | QVBoxLayout *layout = new QVBoxLayout( this ); | ||
29 | layout->setSpacing( 0 ); | ||
30 | layout->setMargin( 1 ); | ||
31 | tabWindow = new QTabWidget( this, "tabWidget" ); | ||
32 | layout->addWidget( tabWindow ); | ||
33 | |||
34 | accounts = new AccountWidget( tabWindow, "accounts" ); | ||
35 | tabWindow->addTab( accounts, tr("&Accounts") ); | ||
36 | modem1 = new ModemWidget( tabWindow, "modem1" ); | ||
37 | tabWindow->addTab( modem1, tr("&Device") ); | ||
38 | modem2 = new ModemWidget2( tabWindow, "modem2" ); | ||
39 | tabWindow->addTab( modem2, tr("&Modem") ); | ||
40 | // graph = new GraphSetup( tabWindow->addPage( tr("&Graph"), tr("Throughput Graph" ) ) ); | ||
41 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); | ||
42 | |||
43 | } | ||
44 | |||
45 | |||
46 | PPPConfigWidget::~PPPConfigWidget() | ||
47 | { | ||
48 | |||
49 | } | ||
50 | |||
51 | void PPPConfigWidget::accept() | ||
52 | { | ||
53 | gpppdata.save(); | ||
54 | QDialog::accept(); | ||
55 | } | ||
56 | |||
57 | |||
58 | void PPPConfigWidget::reject() | ||
59 | { | ||
60 | gpppdata.cancel(); | ||
61 | QDialog::reject(); | ||
62 | } | ||