Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 95f4abe..80a9927 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -1,59 +1,60 @@ | |||
1 | #include "wlanimp.h" | 1 | #include "wlanimp.h" |
2 | #include "interfacesetupimp.h" | 2 | #include "interfacesetupimp.h" |
3 | 3 | ||
4 | #include <qfile.h> | 4 | #include <qfile.h> |
5 | #include <qdir.h> | 5 | #include <qdir.h> |
6 | #include <qtextstream.h> | 6 | #include <qtextstream.h> |
7 | #include <qmessagebox.h> | 7 | #include <qmessagebox.h> |
8 | #include <qlineedit.h> | 8 | #include <qlineedit.h> |
9 | #include <qlabel.h> | 9 | #include <qlabel.h> |
10 | #include <qspinbox.h> | 10 | #include <qspinbox.h> |
11 | #include <qradiobutton.h> | 11 | #include <qradiobutton.h> |
12 | #include <qcheckbox.h> | 12 | #include <qcheckbox.h> |
13 | #include <qtabwidget.h> | 13 | #include <qtabwidget.h> |
14 | #include <qcombobox.h> | 14 | #include <qcombobox.h> |
15 | 15 | ||
16 | #ifdef QWS | 16 | #ifdef QWS |
17 | #include <opie2/oprocess.h> | 17 | #include <opie2/oprocess.h> |
18 | #else | 18 | #else |
19 | #define OProcess KProcess | 19 | #define OProcess KProcess |
20 | #include <kprocess.h> | 20 | #include <kprocess.h> |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" | 23 | #define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" |
24 | 24 | ||
25 | /** | 25 | /** |
26 | * Constructor, read in the wireless.opts file for parsing later. | 26 | * Constructor, read in the wireless.opts file for parsing later. |
27 | */ | 27 | */ |
28 | using namespace Opie::Core; | ||
28 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") { | 29 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") { |
29 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i); | 30 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i); |
30 | tabWidget->insertTab(interfaceSetup, "TCP/IP"); | 31 | tabWidget->insertTab(interfaceSetup, "TCP/IP"); |
31 | 32 | ||
32 | // Read in the config file. | 33 | // Read in the config file. |
33 | QString wlanFile = WIRELESS_OPTS; | 34 | QString wlanFile = WIRELESS_OPTS; |
34 | QFile file(wlanFile); | 35 | QFile file(wlanFile); |
35 | if (file.open(IO_ReadOnly)){ | 36 | if (file.open(IO_ReadOnly)){ |
36 | QTextStream stream( &file ); | 37 | QTextStream stream( &file ); |
37 | QString line = ""; | 38 | QString line = ""; |
38 | while ( !stream.eof() ) { | 39 | while ( !stream.eof() ) { |
39 | line += stream.readLine(); | 40 | line += stream.readLine(); |
40 | line += "\n"; | 41 | line += "\n"; |
41 | } | 42 | } |
42 | file.close(); | 43 | file.close(); |
43 | settingsFileText = QStringList::split("\n", line, true); | 44 | settingsFileText = QStringList::split("\n", line, true); |
44 | parseSettingFile(); | 45 | parseSettingFile(); |
45 | } | 46 | } |
46 | else | 47 | else |
47 | qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); | 48 | qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); |
48 | connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); | 49 | connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); |
49 | } | 50 | } |
50 | 51 | ||
51 | void WLANImp::typeChanged(int mod){ | 52 | void WLANImp::typeChanged(int mod){ |
52 | networkChannel->setEnabled(mod); | 53 | networkChannel->setEnabled(mod); |
53 | channelLabel->setEnabled(mod); | 54 | channelLabel->setEnabled(mod); |
54 | } | 55 | } |
55 | 56 | ||
56 | /** | 57 | /** |
57 | * Change the profile for both wireless settings and network settings. | 58 | * Change the profile for both wireless settings and network settings. |
58 | */ | 59 | */ |
59 | void WLANImp::setProfile(const QString &profile){ | 60 | void WLANImp::setProfile(const QString &profile){ |