author | tille <tille> | 2003-06-13 14:54:32 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-13 14:54:32 (UTC) |
commit | 006f7b028f03232e51dd6ceab35a7d492288fd22 (patch) (unidiff) | |
tree | 27fe264b7628f7ac4f17b925803b3f562f165fb7 | |
parent | e5d826221bab71c39dc8fc89d91509dd16bc2a8a (diff) | |
download | opie-006f7b028f03232e51dd6ceab35a7d492288fd22.zip opie-006f7b028f03232e51dd6ceab35a7d492288fd22.tar.gz opie-006f7b028f03232e51dd6ceab35a7d492288fd22.tar.bz2 |
qcop channels for ESSID, Channel and Mode
4 files changed, 42 insertions, 20 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 0ef1e68..5029525 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -664,3 +664,4 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) | |||
664 | 664 | ||
665 | if (!found) qDebug("Huh what do ya want"); | 665 | if (found) QPEApplication::setKeepRunning(); |
666 | else qDebug("Huh what do ya want"); | ||
666 | } | 667 | } |
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index b988822..cdafb4d 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp | |||
@@ -30,3 +30,3 @@ | |||
30 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { | 30 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { |
31 | interfaces = new Interfaces; | 31 | interfaces = new Interfaces(); |
32 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces); | 32 | interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces); |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index e6f082c..bc467bb 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -6,4 +6,7 @@ | |||
6 | 6 | ||
7 | #include <qcheckbox.h> | ||
8 | #include <qcombobox.h> | ||
7 | #include <qlabel.h> | 9 | #include <qlabel.h> |
8 | #include <qprogressbar.h> | 10 | #include <qprogressbar.h> |
11 | #include <qspinbox.h> | ||
9 | #include <qtabwidget.h> | 12 | #include <qtabwidget.h> |
@@ -16,3 +19,6 @@ | |||
16 | */ | 19 | */ |
17 | WLANModule::WLANModule() : Module() { | 20 | WLANModule::WLANModule() |
21 | : Module(), | ||
22 | wlanconfigWiget(0) | ||
23 | { | ||
18 | } | 24 | } |
@@ -117,3 +123,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
117 | int count = params.count(); | 123 | int count = params.count(); |
118 | qDebug("got %i params", count ); | 124 | qDebug("WLANModule got %i params", count ); |
119 | if (count < 2){ | 125 | if (count < 2){ |
@@ -130,3 +136,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
130 | stream >> action; | 136 | stream >> action; |
131 | qDebug("got interface %s and acion %s", interface.latin1(), action.latin1()); | 137 | qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); |
132 | // find interfaces | 138 | // find interfaces |
@@ -135,3 +141,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
135 | if (i->getInterfaceName() == interface){ | 141 | if (i->getInterfaceName() == interface){ |
136 | qDebug("found interface %s",interface.latin1()); | 142 | qDebug("WLANModule found interface %s",interface.latin1()); |
137 | ifa = i; | 143 | ifa = i; |
@@ -141,3 +147,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
141 | if (ifa == 0){ | 147 | if (ifa == 0){ |
142 | qFatal("Did not find %s",interface.latin1()); | 148 | qFatal("WLANModule Did not find %s",interface.latin1()); |
143 | } | 149 | } |
@@ -160,8 +166,28 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
160 | QString value; | 166 | QString value; |
167 | if (!wlanconfigWiget){ | ||
168 | //FIXME: what if it got closed meanwhile? | ||
169 | wlanconfigWiget = (WLANImp*) configure(ifa); | ||
170 | } | ||
171 | wlanconfigWiget->showMaximized(); | ||
161 | stream >> value; | 172 | stream >> value; |
162 | qDebug("setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); | 173 | qDebug("WLANModule is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); |
163 | if ( action.contains("ESSID") ){ | 174 | if ( action.contains("ESSID") ){ |
164 | qDebug("Setting ESSID not yet impl"); | 175 | QComboBox *combo = wlanconfigWiget->essid; |
176 | bool found = false; | ||
177 | for ( int i = 0; i < combo->count(); i++) | ||
178 | if ( combo->text( i ) == value ){ | ||
179 | combo->setCurrentItem( i ); | ||
180 | found = true; | ||
181 | } | ||
182 | if (!found) combo->insertItem( value, 0 ); | ||
183 | }else if ( action.contains("Mode") ){ | ||
184 | QComboBox *combo = wlanconfigWiget->mode; | ||
185 | for ( int i = 0; i < combo->count(); i++) | ||
186 | if ( combo->text( i ) == value ){ | ||
187 | combo->setCurrentItem( i ); | ||
188 | } | ||
189 | |||
165 | }else if (action.contains("Channel")){ | 190 | }else if (action.contains("Channel")){ |
166 | qDebug("Setting Channel not yet impl"); | 191 | wlanconfigWiget->specifyChan->setChecked( true ); |
192 | wlanconfigWiget->networkChannel->setValue( value.toInt() ); | ||
167 | }else | 193 | }else |
@@ -169,8 +195,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | |||
169 | } | 195 | } |
170 | // if (param.contains("QString,QString,QString")) { | 196 | |
171 | // QDataStream stream(arg,IO_ReadOnly); | ||
172 | // QString arg1, arg2, arg3; | ||
173 | // stream >> arg1 >> arg2 >> arg3 ; | ||
174 | // qDebug("interface >%s< setting >%s< value >%s<",arg1.latin1(),arg2.latin1(),arg3.latin1()); | ||
175 | // } | ||
176 | } | 197 | } |
@@ -187 +208,2 @@ QWidget *WLANModule::getInfo( Interface *i) | |||
187 | } | 208 | } |
209 | |||
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.h b/noncore/settings/networksettings/wlan/wlanmodule.h index 0963137..027ecec 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.h +++ b/noncore/settings/networksettings/wlan/wlanmodule.h | |||
@@ -5,3 +5,3 @@ | |||
5 | 5 | ||
6 | //class WlanInfoImp; | 6 | class WLANImp; |
7 | 7 | ||
@@ -31,7 +31,6 @@ private: | |||
31 | QWidget *getInfo(Interface*); | 31 | QWidget *getInfo(Interface*); |
32 | 32 | WLANImp *wlanconfigWiget; | |
33 | QList<Interface> list; | 33 | QList<Interface> list; |
34 | QString profile; | 34 | QString profile; |
35 | // WlanInfoImp *info; | 35 | |
36 | // Interface *iface; | ||
37 | }; | 36 | }; |