Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 45952b9..7c902e0 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -6,28 +6,36 @@ | |||
6 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
7 | /* system() */ | 7 | /* system() */ |
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <qfile.h> | 9 | #include <qfile.h> |
10 | #include <qdir.h> | 10 | #include <qdir.h> |
11 | #include <qtextstream.h> | 11 | #include <qtextstream.h> |
12 | #include <qmessagebox.h> | 12 | #include <qmessagebox.h> |
13 | #include <qlineedit.h> | 13 | #include <qlineedit.h> |
14 | #include <qspinbox.h> | 14 | #include <qspinbox.h> |
15 | #include <qradiobutton.h> | 15 | #include <qradiobutton.h> |
16 | #include <qcheckbox.h> | 16 | #include <qcheckbox.h> |
17 | #include <qregexp.h> | 17 | #include <qregexp.h> |
18 | #include <qpe/config.h> | ||
19 | #include <qtabwidget.h> | ||
20 | #include "interfacesetupimp.h" | ||
18 | 21 | ||
19 | WLANImp::WLANImp( QWidget* parent, const char* name, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ | 22 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ |
20 | config = new Config("wireless"); | 23 | config = new Config("wireless"); |
24 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);//, Qt::WDestructiveClose); | ||
25 | //configure->setProfile(currentProfile); | ||
26 | tabWidget->insertTab(interfaceSetup, "TCP/IP"); | ||
27 | |||
21 | readConfig(); | 28 | readConfig(); |
29 | |||
22 | } | 30 | } |
23 | 31 | ||
24 | WLANImp::~WLANImp( ){ | 32 | WLANImp::~WLANImp( ){ |
25 | delete config; | 33 | delete config; |
26 | } | 34 | } |
27 | 35 | ||
28 | void WLANImp::readConfig() | 36 | void WLANImp::readConfig() |
29 | { | 37 | { |
30 | qWarning( "WLANImp::readConfig() called." ); | 38 | qWarning( "WLANImp::readConfig() called." ); |
31 | config->setGroup( "Properties" ); | 39 | config->setGroup( "Properties" ); |
32 | QString ssid = config->readEntry( "SSID", "any" ); | 40 | QString ssid = config->readEntry( "SSID", "any" ); |
33 | if( ssid == "any" || ssid == "ANY" ){ | 41 | if( ssid == "any" || ssid == "ANY" ){ |
@@ -100,26 +108,28 @@ bool WLANImp::writeConfig() | |||
100 | config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 108 | config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
101 | config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 109 | config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
102 | config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 110 | config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
103 | config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 111 | config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
104 | return true; | 112 | return true; |
105 | return writeWirelessOpts( ); | 113 | return writeWirelessOpts( ); |
106 | } | 114 | } |
107 | 115 | ||
108 | /** | 116 | /** |
109 | */ | 117 | */ |
110 | void WLANImp::accept() | 118 | void WLANImp::accept() |
111 | { | 119 | { |
112 | if ( writeConfig() ) | 120 | if ( writeConfig() ){ |
121 | interfaceSetup->saveChanges(); | ||
113 | QDialog::accept(); | 122 | QDialog::accept(); |
123 | } | ||
114 | } | 124 | } |
115 | 125 | ||
116 | bool WLANImp::writeWirelessOpts( QString scheme ) | 126 | bool WLANImp::writeWirelessOpts( QString scheme ) |
117 | { | 127 | { |
118 | qWarning( "WLANImp::writeWirelessOpts entered." ); | 128 | qWarning( "WLANImp::writeWirelessOpts entered." ); |
119 | QString prev = "/etc/pcmcia/wireless.opts"; | 129 | QString prev = "/etc/pcmcia/wireless.opts"; |
120 | QFile prevFile(prev); | 130 | QFile prevFile(prev); |
121 | if ( !prevFile.open( IO_ReadOnly ) ) | 131 | if ( !prevFile.open( IO_ReadOnly ) ) |
122 | return false; | 132 | return false; |
123 | 133 | ||
124 | QString tmp = "/etc/pcmcia/wireless.opts-qpe-new"; | 134 | QString tmp = "/etc/pcmcia/wireless.opts-qpe-new"; |
125 | QFile tmpFile(tmp); | 135 | QFile tmpFile(tmp); |