Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 50 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.h | 7 |
3 files changed, 40 insertions, 19 deletions
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 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { - interfaces = new Interfaces; + interfaces = new Interfaces(); 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 @@ +#include <qcheckbox.h> +#include <qcombobox.h> #include <qlabel.h> #include <qprogressbar.h> +#include <qspinbox.h> #include <qtabwidget.h> @@ -16,3 +19,6 @@ */ -WLANModule::WLANModule() : Module() { +WLANModule::WLANModule() + : Module(), + wlanconfigWiget(0) +{ } @@ -117,3 +123,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) int count = params.count(); - qDebug("got %i params", count ); + qDebug("WLANModule got %i params", count ); if (count < 2){ @@ -130,3 +136,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) stream >> action; - qDebug("got interface %s and acion %s", interface.latin1(), action.latin1()); + qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); // find interfaces @@ -135,3 +141,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) if (i->getInterfaceName() == interface){ - qDebug("found interface %s",interface.latin1()); + qDebug("WLANModule found interface %s",interface.latin1()); ifa = i; @@ -141,3 +147,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) if (ifa == 0){ - qFatal("Did not find %s",interface.latin1()); + qFatal("WLANModule Did not find %s",interface.latin1()); } @@ -160,8 +166,28 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) QString value; + if (!wlanconfigWiget){ + //FIXME: what if it got closed meanwhile? + wlanconfigWiget = (WLANImp*) configure(ifa); + } + wlanconfigWiget->showMaximized(); stream >> value; - qDebug("setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); + qDebug("WLANModule is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); if ( action.contains("ESSID") ){ - qDebug("Setting ESSID not yet impl"); + QComboBox *combo = wlanconfigWiget->essid; + bool found = false; + for ( int i = 0; i < combo->count(); i++) + if ( combo->text( i ) == value ){ + combo->setCurrentItem( i ); + found = true; + } + if (!found) combo->insertItem( value, 0 ); + }else if ( action.contains("Mode") ){ + QComboBox *combo = wlanconfigWiget->mode; + for ( int i = 0; i < combo->count(); i++) + if ( combo->text( i ) == value ){ + combo->setCurrentItem( i ); + } + }else if (action.contains("Channel")){ - qDebug("Setting Channel not yet impl"); + wlanconfigWiget->specifyChan->setChecked( true ); + wlanconfigWiget->networkChannel->setValue( value.toInt() ); }else @@ -169,8 +195,3 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) } - // if (param.contains("QString,QString,QString")) { -// QDataStream stream(arg,IO_ReadOnly); -// QString arg1, arg2, arg3; -// stream >> arg1 >> arg2 >> arg3 ; -// qDebug("interface >%s< setting >%s< value >%s<",arg1.latin1(),arg2.latin1(),arg3.latin1()); -// } + } @@ -187 +208,2 @@ QWidget *WLANModule::getInfo( Interface *i) } + 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 @@ -//class WlanInfoImp; +class WLANImp; @@ -31,7 +31,6 @@ private: QWidget *getInfo(Interface*); - + WLANImp *wlanconfigWiget; QList<Interface> list; QString profile; - // WlanInfoImp *info; - // Interface *iface; + }; |