Diffstat (limited to 'noncore/net/networksetup/wlan') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/wlan/wlan.pro | 6 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 9 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.h | 3 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 7 |
4 files changed, 8 insertions, 17 deletions
diff --git a/noncore/net/networksetup/wlan/wlan.pro b/noncore/net/networksetup/wlan/wlan.pro index 432a096..814a0b4 100644 --- a/noncore/net/networksetup/wlan/wlan.pro +++ b/noncore/net/networksetup/wlan/wlan.pro | |||
@@ -1,10 +1,10 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | #CONFIG += qt warn_on release |
3 | #CONFIG += qt warn_on debug | 3 | CONFIG += qt warn_on debug |
4 | DESTDIR = $(OPIEDIR)/plugins/networksetup | 4 | #DESTDIR = $(OPIEDIR)/plugins/networksetup |
5 | HEADERS = wlanimp.h wlanmodule.h wextensions.h | 5 | HEADERS = wlanimp.h wlanmodule.h wextensions.h |
6 | SOURCES = wlanimp.cpp wlanmodule.cpp wextensions.cpp | 6 | SOURCES = wlanimp.cpp wlanmodule.cpp wextensions.cpp |
7 | INCLUDEPATH+= $(OPIEDIR)/include ../ | 7 | INCLUDEPATH+= $(OPIEDIR)/include ../ |
8 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | INTERFACES= wlan.ui info.ui | 10 | INTERFACES= wlan.ui info.ui |
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 94c7518..45952b9 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp | |||
@@ -13,13 +13,13 @@ | |||
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 | 18 | ||
19 | WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){ | 19 | WLANImp::WLANImp( QWidget* parent, const char* name, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ |
20 | config = new Config("wireless"); | 20 | config = new Config("wireless"); |
21 | readConfig(); | 21 | readConfig(); |
22 | } | 22 | } |
23 | 23 | ||
24 | WLANImp::~WLANImp( ){ | 24 | WLANImp::~WLANImp( ){ |
25 | delete config; | 25 | delete config; |
@@ -98,29 +98,24 @@ bool WLANImp::writeConfig() | |||
98 | config->writeEntry( "dot11WEPDefaultKeyID", 3 ); | 98 | config->writeEntry( "dot11WEPDefaultKeyID", 3 ); |
99 | } | 99 | } |
100 | config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 100 | config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
101 | config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 101 | config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
102 | config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 102 | config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
103 | config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 103 | config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
104 | return true; | ||
104 | return writeWirelessOpts( ); | 105 | return writeWirelessOpts( ); |
105 | } | 106 | } |
106 | 107 | ||
107 | /** | 108 | /** |
108 | */ | 109 | */ |
109 | void WLANImp::accept() | 110 | void WLANImp::accept() |
110 | { | 111 | { |
111 | if ( writeConfig() ) | 112 | if ( writeConfig() ) |
112 | QDialog::accept(); | 113 | QDialog::accept(); |
113 | } | 114 | } |
114 | 115 | ||
115 | void WLANImp::done ( int r ) | ||
116 | { | ||
117 | QDialog::done ( r ); | ||
118 | close ( ); | ||
119 | } | ||
120 | |||
121 | bool WLANImp::writeWirelessOpts( QString scheme ) | 116 | bool WLANImp::writeWirelessOpts( QString scheme ) |
122 | { | 117 | { |
123 | qWarning( "WLANImp::writeWirelessOpts entered." ); | 118 | qWarning( "WLANImp::writeWirelessOpts entered." ); |
124 | QString prev = "/etc/pcmcia/wireless.opts"; | 119 | QString prev = "/etc/pcmcia/wireless.opts"; |
125 | QFile prevFile(prev); | 120 | QFile prevFile(prev); |
126 | if ( !prevFile.open( IO_ReadOnly ) ) | 121 | if ( !prevFile.open( IO_ReadOnly ) ) |
diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h index 22ce143..59b7c59 100644 --- a/noncore/net/networksetup/wlan/wlanimp.h +++ b/noncore/net/networksetup/wlan/wlanimp.h | |||
@@ -6,18 +6,17 @@ | |||
6 | #include <qpe/config.h> | 6 | #include <qpe/config.h> |
7 | 7 | ||
8 | class WLANImp : public WLAN { | 8 | class WLANImp : public WLAN { |
9 | Q_OBJECT | 9 | Q_OBJECT |
10 | 10 | ||
11 | public: | 11 | public: |
12 | WLANImp( QWidget* parent = 0, const char* name = 0); | 12 | WLANImp( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); |
13 | ~WLANImp( ); | 13 | ~WLANImp( ); |
14 | 14 | ||
15 | protected: | 15 | protected: |
16 | void accept(); | 16 | void accept(); |
17 | void done ( int r ); | ||
18 | 17 | ||
19 | private: | 18 | private: |
20 | void readConfig(); | 19 | void readConfig(); |
21 | bool writeConfig(); | 20 | bool writeConfig(); |
22 | bool writeWirelessOpts( QString scheme = "*" ); | 21 | bool writeWirelessOpts( QString scheme = "*" ); |
23 | bool writeWlanngOpts( QString scheme = "*" ); | 22 | bool writeWlanngOpts( QString scheme = "*" ); |
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index 7507c54..3363b8a 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp | |||
@@ -12,12 +12,13 @@ | |||
12 | WLANModule::WLANModule() : Module() { | 12 | WLANModule::WLANModule() : Module() { |
13 | } | 13 | } |
14 | 14 | ||
15 | /** | 15 | /** |
16 | */ | 16 | */ |
17 | WLANModule::~WLANModule(){ | 17 | WLANModule::~WLANModule(){ |
18 | qDebug("Deleting module"); | ||
18 | Interface *i; | 19 | Interface *i; |
19 | for ( i=list.first(); i != 0; i=list.next() ) | 20 | for ( i=list.first(); i != 0; i=list.next() ) |
20 | delete i; | 21 | delete i; |
21 | } | 22 | } |
22 | 23 | ||
23 | /** | 24 | /** |
@@ -54,13 +55,13 @@ bool WLANModule::isOwner(Interface *i){ | |||
54 | /** | 55 | /** |
55 | * Create, set tabWiget and return the WLANConfigure Module | 56 | * Create, set tabWiget and return the WLANConfigure Module |
56 | * @param tabWidget a pointer to the tab widget that this configure has. | 57 | * @param tabWidget a pointer to the tab widget that this configure has. |
57 | * @return QWidget* pointer to the tab widget in this modules configure. | 58 | * @return QWidget* pointer to the tab widget in this modules configure. |
58 | */ | 59 | */ |
59 | QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ | 60 | QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ |
60 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig"); | 61 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); |
61 | (*tabWidget) = wlanconfig->tabWidget; | 62 | (*tabWidget) = wlanconfig->tabWidget; |
62 | return wlanconfig; | 63 | return wlanconfig; |
63 | } | 64 | } |
64 | 65 | ||
65 | /** | 66 | /** |
66 | * Create, set tabWiget and return the Information Module | 67 | * Create, set tabWiget and return the Information Module |
@@ -85,16 +86,12 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ | |||
85 | int quality = 0; | 86 | int quality = 0; |
86 | we.stats(signal, noise, quality); | 87 | we.stats(signal, noise, quality); |
87 | info->signalProgressBar->setProgress(signal); | 88 | info->signalProgressBar->setProgress(signal); |
88 | info->noiseProgressBar->setProgress(noise); | 89 | info->noiseProgressBar->setProgress(noise); |
89 | info->qualityProgressBar->setProgress(quality); | 90 | info->qualityProgressBar->setProgress(quality); |
90 | info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); | 91 | info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); |
91 | //WlanInfo info (0, "wireless info", true); | ||
92 | //info.show(); | ||
93 | //return NULL; | ||
94 | |||
95 | return info; | 92 | return info; |
96 | } | 93 | } |
97 | 94 | ||
98 | /** | 95 | /** |
99 | * Get all active (up or down) interfaces | 96 | * Get all active (up or down) interfaces |
100 | * @return QList<Interface> A list of interfaces that exsist that havn't | 97 | * @return QList<Interface> A list of interfaces that exsist that havn't |