summaryrefslogtreecommitdiff
path: root/noncore/settings
Unidiff
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/TODO6
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp22
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp50
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.h7
4 files changed, 65 insertions, 20 deletions
diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO
index 614501f..b28c5a0 100644
--- a/noncore/settings/networksettings/TODO
+++ b/noncore/settings/networksettings/TODO
@@ -1 +1,7 @@
1* make dcop handling portable
2* move dcop call for start, stop interfaces from wlan to interface
3
4
5Old TODO of Benmayer:
6
1Types: 7Types:
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index e7b842b..b988822 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -16,3 +16,3 @@
16 16
17#ifdef QWS 17#ifdef QWS
18 #include <opie/oprocess.h> 18 #include <opie/oprocess.h>
@@ -28,3 +28,3 @@
28 * Constructor, read in the wireless.opts file for parsing later. 28 * Constructor, read in the wireless.opts file for parsing later.
29 */ 29 */
30WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { 30WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) {
@@ -42,3 +42,3 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
42WLANImp::~WLANImp() { 42WLANImp::~WLANImp() {
43 delete interfaces; 43//FIXME: delete interfaces;
44} 44}
@@ -47,3 +47,3 @@ WLANImp::~WLANImp() {
47 * Change the profile for both wireless settings and network settings. 47 * Change the profile for both wireless settings and network settings.
48 */ 48 */
49void WLANImp::setProfile(const QString &profile){ 49void WLANImp::setProfile(const QString &profile){
@@ -60,3 +60,3 @@ void WLANImp::parseOpts() {
60 60
61 61
62 opt = interfaces->getInterfaceOption("wireless_essid", error); 62 opt = interfaces->getInterfaceOption("wireless_essid", error);
@@ -77,3 +77,3 @@ void WLANImp::parseOpts() {
77 } 77 }
78 78
79 opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace(); 79 opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace();
@@ -134,3 +134,3 @@ void WLANImp::parseKeyStr(QString keystr) {
134 break; 134 break;
135 } 135 }
136 } else { 136 } else {
@@ -142,3 +142,3 @@ void WLANImp::parseKeyStr(QString keystr) {
142 enc = 1; 142 enc = 1;
143 QStringList::Iterator next = ++it; 143 QStringList::Iterator next = ++it;
144 if (it == keys.end()) { 144 if (it == keys.end()) {
@@ -189,4 +189,4 @@ void WLANImp::accept() {
189 } 189 }
190 } 190 }
191 191
192 if (essid->currentText().isEmpty()) { 192 if (essid->currentText().isEmpty()) {
@@ -200,3 +200,3 @@ void WLANImp::accept() {
200 } 200 }
201 201
202 // Try to save the interfaces settings. 202 // Try to save the interfaces settings.
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 3c988d5..e6f082c 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -10,2 +10,5 @@
10 10
11
12
13
11/** 14/**
@@ -23,2 +26,3 @@ WLANModule::~WLANModule(){
23 delete i; 26 delete i;
27
24} 28}
@@ -75,6 +79,3 @@ QWidget *WLANModule::information(Interface *i){
75 79
76 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); 80 return getInfo( i );
77 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i);
78 info->tabWidget->insertTab(information, "TCP/IP");
79 return info;
80} 81}
@@ -130,11 +131,28 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
130 qDebug("got interface %s and acion %s", interface.latin1(), action.latin1()); 131 qDebug("got interface %s and acion %s", interface.latin1(), action.latin1());
132 // find interfaces
133 Interface *ifa=0;
134 for ( Interface *i=list.first(); i != 0; i=list.next() ){
135 if (i->getInterfaceName() == interface){
136 qDebug("found interface %s",interface.latin1());
137 ifa = i;
138 }
139 }
140
141 if (ifa == 0){
142 qFatal("Did not find %s",interface.latin1());
143 }
131 144
132 if (count == 2){ 145 if (count == 2){
133 // those should call the interface 146 // those should call the interface directly
147 QWidget *info = getInfo( ifa );
148 info->showMaximized();
149
134 if ( action.contains("start" ) ){ 150 if ( action.contains("start" ) ){
135 qDebug("starting %s not yet implemented",interface.latin1()); 151 ifa->start();
136 } else if ( action.contains("restart" ) ){ 152 } else if ( action.contains("restart" ) ){
137 qDebug("restarting %s not yet implemented",interface.latin1()); 153 ifa->restart();
138 } else if ( action.contains("stop" ) ){ 154 } else if ( action.contains("stop" ) ){
139 qDebug("stopping %s not yet implemented",interface.latin1()); 155 ifa->stop();
156 }else if ( action.contains("refresh" ) ){
157 ifa->refresh();
140 } 158 }
@@ -144,2 +162,8 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
144 qDebug("setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); 162 qDebug("setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() );
163 if ( action.contains("ESSID") ){
164 qDebug("Setting ESSID not yet impl");
165 }else if (action.contains("Channel")){
166 qDebug("Setting Channel not yet impl");
167 }else
168 qDebug("wlan plugin has no clue");
145 } 169 }
@@ -153 +177,11 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
153 177
178QWidget *WLANModule::getInfo( Interface *i)
179{
180 qDebug("WLANModule::getInfo start");
181 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose);
182 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i);
183 info->tabWidget->insertTab(information, "TCP/IP", 0);
184
185 qDebug("WLANModule::getInfo return");
186 return info;
187}
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.h b/noncore/settings/networksettings/wlan/wlanmodule.h
index a617a90..0963137 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.h
+++ b/noncore/settings/networksettings/wlan/wlanmodule.h
@@ -5,2 +5,4 @@
5 5
6//class WlanInfoImp;
7
6class WLANModule : Module{ 8class WLANModule : Module{
@@ -28,5 +30,8 @@ public:
28private: 30private:
31 QWidget *getInfo(Interface*);
32
29 QList<Interface> list; 33 QList<Interface> list;
30 QString profile; 34 QString profile;
31 35 // WlanInfoImp *info;
36 // Interface *iface;
32}; 37};