Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfacesetupimp.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h index 172da6a..f38fba5 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h | |||
@@ -1,46 +1,52 @@ | |||
1 | #ifndef INTERFACESETUPIMP_H | 1 | #ifndef INTERFACESETUPIMP_H |
2 | #define INTERFACESETUPIMP_H | 2 | #define INTERFACESETUPIMP_H |
3 | 3 | ||
4 | #include "interfacesetup.h" | 4 | #include "interfacesetup.h" |
5 | #include "interfaces.h" | 5 | #include "interfaces.h" |
6 | #include <qdialog.h> | 6 | #include <qdialog.h> |
7 | 7 | ||
8 | class Interface; | 8 | class Interface; |
9 | 9 | ||
10 | /** | ||
11 | * A default implementation for setting up basic | ||
12 | * network config. Like DHCP, IP and other information. | ||
13 | * You can use it in a tab or in any other way* | ||
14 | * On saveChanges() it'll save the changes to Interfaces. | ||
15 | */ | ||
10 | class InterfaceSetupImp : public InterfaceSetup { | 16 | class InterfaceSetupImp : public InterfaceSetup { |
11 | Q_OBJECT | 17 | Q_OBJECT |
12 | 18 | ||
13 | public: | 19 | public: |
14 | InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i = 0, Interfaces *j = 0, WFlags fl = 0); | 20 | InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i = 0, Interfaces *j = 0, WFlags fl = 0); |
15 | ~InterfaceSetupImp(); | 21 | ~InterfaceSetupImp(); |
16 | bool saveChanges(); | 22 | bool saveChanges(); |
17 | 23 | ||
18 | public slots: | 24 | public slots: |
19 | void setProfile(const QString &profile); | 25 | void setProfile(const QString &profile); |
20 | bool saveSettings(); | 26 | bool saveSettings(); |
21 | 27 | ||
22 | private: | 28 | private: |
23 | Interfaces *interfaces; | 29 | Interfaces *interfaces; |
24 | Interface *interface; | 30 | Interface *interface; |
25 | 31 | ||
26 | bool delInterfaces; | 32 | bool delInterfaces; |
27 | }; | 33 | }; |
28 | 34 | ||
29 | 35 | ||
30 | #include <qlayout.h> | 36 | #include <qlayout.h> |
31 | 37 | ||
32 | class InterfaceSetupImpDialog : public QDialog { | 38 | class InterfaceSetupImpDialog : public QDialog { |
33 | Q_OBJECT | 39 | Q_OBJECT |
34 | 40 | ||
35 | public: | 41 | public: |
36 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ | 42 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ |
37 | QVBoxLayout *InterfaceSetupLayout = new QVBoxLayout( this ); | 43 | QVBoxLayout *InterfaceSetupLayout = new QVBoxLayout( this ); |
38 | setCaption("Interface Setup"); | 44 | setCaption("Interface Setup"); |
39 | interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i); | 45 | interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i); |
40 | InterfaceSetupLayout->addWidget( interfaceSetup ); | 46 | InterfaceSetupLayout->addWidget( interfaceSetup ); |
41 | }; | 47 | }; |
42 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; | 48 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; |
43 | 49 | ||
44 | private: | 50 | private: |
45 | InterfaceSetupImp *interfaceSetup; | 51 | InterfaceSetupImp *interfaceSetup; |
46 | 52 | ||