summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan
authortille <tille>2003-06-21 15:34:55 (UTC)
committer tille <tille>2003-06-21 15:34:55 (UTC)
commit5f5accf337a109371296c6a78175734454165406 (patch) (unidiff)
tree7c4334febdedcd8c0b42a2296af6875f6f990762 /noncore/settings/networksettings/wlan
parentfde32755685bec14851f943be337e94675caf0c4 (diff)
downloadopie-5f5accf337a109371296c6a78175734454165406.zip
opie-5f5accf337a109371296c6a78175734454165406.tar.gz
opie-5f5accf337a109371296c6a78175734454165406.tar.bz2
channel count for wellenreiter
Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 7bded85..a4488f9 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -132,9 +132,26 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
132 QDataStream stream(arg,IO_ReadOnly); 132 QDataStream stream(arg,IO_ReadOnly);
133 QString interface; 133 QString interface;
134 QString action; 134 QString action;
135 int countMsgs = 0;
136 stream >> interface;
137 qDebug("got count? >%s<",interface.latin1());
138 if (interface == "count"){
139 qDebug("got count");
140 stream >> action;
141 qDebug("Got count num >%s<", action.latin1());
142 countMsgs = action.toInt();
143 }
144
135 QDialog *toShow; 145 QDialog *toShow;
136 while (! stream.atEnd() ){ 146 //while (! stream.atEnd() ){
147 for (int i = 0; i < countMsgs; i++){
148 qDebug("start stream %d/%d",i,countMsgs);
149 if (stream.atEnd()){
150 qDebug("end of stream");
151 return;
152 }
137 stream >> interface; 153 stream >> interface;
154 qDebug("got iface");
138 stream >> action; 155 stream >> action;
139 qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); 156 qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1());
140 // find interfaces 157 // find interfaces
@@ -175,7 +192,11 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
175 } 192 }
176 wlanconfigWiget->showMaximized(); 193 wlanconfigWiget->showMaximized();
177 stream >> value; 194 stream >> value;
178 qDebug("WLANModule is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); 195 qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() );
196 if (value.isEmpty()){
197 qDebug("value is empty!!!\nreturning");
198 return;
199 }
179 if ( action.contains("ESSID") ){ 200 if ( action.contains("ESSID") ){
180 QComboBox *combo = wlanconfigWiget->essid; 201 QComboBox *combo = wlanconfigWiget->essid;
181 bool found = false; 202 bool found = false;
@@ -194,8 +215,10 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
194 215
195 }else if (action.contains("Channel")){ 216 }else if (action.contains("Channel")){
196 bool ok; 217 bool ok;
218 qDebug("converting channel");
197 int chan = value.toInt( &ok ); 219 int chan = value.toInt( &ok );
198 if (ok){ 220 if (ok){
221 qDebug("ok setting channel");
199 wlanconfigWiget->specifyChan->setChecked( true ); 222 wlanconfigWiget->specifyChan->setChecked( true );
200 wlanconfigWiget->networkChannel->setValue( chan ); 223 wlanconfigWiget->networkChannel->setValue( chan );
201 } 224 }
@@ -205,8 +228,11 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
205 }else 228 }else
206 qDebug("wlan plugin has no clue"); 229 qDebug("wlan plugin has no clue");
207 } 230 }
231 qDebug("next stream");
208 }// while stream 232 }// while stream
233 qDebug("end of stream");
209 if (toShow) toShow->exec(); 234 if (toShow) toShow->exec();
235 qDebug("returning");
210} 236}
211 237
212QWidget *WLANModule::getInfo( Interface *i) 238QWidget *WLANModule::getInfo( Interface *i)
@@ -215,7 +241,11 @@ QWidget *WLANModule::getInfo( Interface *i)
215 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); 241 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose);
216 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); 242 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i);
217 info->tabWidget->insertTab(information, "TCP/IP", 0); 243 info->tabWidget->insertTab(information, "TCP/IP", 0);
218 244 info->tabWidget->setCurrentPage( 0 );
245 info->tabWidget->showPage( information );
246 if (info->tabWidget->currentPage() == information ) qDebug("infotab OK");
247 else qDebug("infotab NOT OK");
248 qDebug("current idx %d", info->tabWidget->currentPageIndex());
219 qDebug("WLANModule::getInfo return"); 249 qDebug("WLANModule::getInfo return");
220 return info; 250 return info;
221} 251}