Diffstat (limited to 'noncore/net/networksetup/interfaces/interfacesetupimp.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfaces/interfacesetupimp.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.h b/noncore/net/networksetup/interfaces/interfacesetupimp.h index 3bbf34e..a88e190 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.h +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.h | |||
@@ -3,29 +3,30 @@ | |||
3 | 3 | ||
4 | #include "interfacesetup.h" | 4 | #include "interfacesetup.h" |
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | 6 | ||
7 | class Interface; | 7 | class Interface; |
8 | class Interfaces; | 8 | class Interfaces; |
9 | 9 | ||
10 | class InterfaceSetupImp : public InterfaceSetup { | 10 | class InterfaceSetupImp : public InterfaceSetup { |
11 | Q_OBJECT | 11 | Q_OBJECT |
12 | 12 | ||
13 | public: | 13 | public: |
14 | InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, WFlags fl = 0); | 14 | InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, WFlags fl = 0); |
15 | void saveChanges(); | 15 | bool saveChanges(); |
16 | 16 | ||
17 | public slots: | 17 | public slots: |
18 | void setProfile(const QString &profile); | 18 | void setProfile(const QString &profile); |
19 | bool saveSettings(); | 19 | bool saveSettings(); |
20 | |||
20 | private: | 21 | private: |
21 | Interfaces *interfaces; | 22 | Interfaces *interfaces; |
22 | Interface *interface; | 23 | Interface *interface; |
23 | 24 | ||
24 | }; | 25 | }; |
25 | 26 | ||
26 | 27 | ||
27 | #include <qlayout.h> | 28 | #include <qlayout.h> |
28 | 29 | ||
29 | class InterfaceSetupImpDialog : public QDialog { | 30 | class InterfaceSetupImpDialog : public QDialog { |
30 | Q_OBJECT | 31 | Q_OBJECT |
31 | 32 | ||
@@ -34,22 +35,22 @@ public: | |||
34 | QVBoxLayout *InterfaceSetupLayout = new QVBoxLayout( this ); | 35 | QVBoxLayout *InterfaceSetupLayout = new QVBoxLayout( this ); |
35 | setCaption("Interface Setup"); | 36 | setCaption("Interface Setup"); |
36 | interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i,fl); | 37 | interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i,fl); |
37 | InterfaceSetupLayout->addWidget( interfaceSetup ); | 38 | InterfaceSetupLayout->addWidget( interfaceSetup ); |
38 | }; | 39 | }; |
39 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; | 40 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; |
40 | 41 | ||
41 | private: | 42 | private: |
42 | InterfaceSetupImp *interfaceSetup; | 43 | InterfaceSetupImp *interfaceSetup; |
43 | 44 | ||
44 | protected slots: | 45 | protected slots: |
45 | void accept(){ | 46 | void accept(){ |
46 | interfaceSetup->saveChanges(); | 47 | if(interfaceSetup->saveChanges()) |
47 | QDialog::accept(); | 48 | QDialog::accept(); |
48 | }; | 49 | }; |
49 | 50 | ||
50 | }; | 51 | }; |
51 | 52 | ||
52 | #endif | 53 | #endif |
53 | 54 | ||
54 | // interfacesetupimp.h | 55 | // interfacesetupimp.h |
55 | 56 | ||