Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index a466020..74bf390 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -1,83 +1,87 @@ #include "wlanimp.h" /* Config class */ #include <qpe/config.h> /* Global namespace */ #include <qpe/global.h> /* system() */ #include <stdlib.h> #include <qfile.h> #include <qdir.h> #include <qtextstream.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qspinbox.h> #include <qradiobutton.h> #include <qcheckbox.h> #include <qregexp.h> #include <qpe/config.h> #include <qtabwidget.h> #include "interfacesetupimp.h" WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ config = new Config("wireless"); interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);//, Qt::WDestructiveClose); //configure->setProfile(currentProfile); tabWidget->insertTab(interfaceSetup, "TCP/IP"); readConfig(); } WLANImp::~WLANImp( ){ delete config; } +void WLANImp::setProfile(QString &profile){ + interfaceSetup->setProfile(profile); +} + void WLANImp::readConfig() { qWarning( "WLANImp::readConfig() called." ); config->setGroup( "Properties" ); QString ssid = config->readEntry( "SSID", "any" ); if( ssid == "any" || ssid == "ANY" ){ essNon->setChecked( true ); } else { essSpecific->setChecked( true ); essSpecificLineEdit->setText( ssid ); } QString mode = config->readEntry( "Mode", "Managed" ); if( mode == "adhoc" ) { network802->setChecked( true ); } else { networkInfrastructure->setChecked( true ); } networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) ); // config->readEntry( "RATE", "auto" ); config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); config->readEntry( "AuthType", "opensystem" ); config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); switch( defaultkey ){ case 0: keyRadio0->setChecked( true ); break; case 1: keyRadio1->setChecked( true ); break; case 2: keyRadio2->setChecked( true ); break; case 3: keyRadio3->setChecked( true ); break; } keyLineEdit0->setText(config->readEntry( "dot11WEPDefaultKey0" )); keyLineEdit1->setText(config->readEntry( "dot11WEPDefaultKey1" )); keyLineEdit2->setText(config->readEntry( "dot11WEPDefaultKey2" )); keyLineEdit3->setText(config->readEntry( "dot11WEPDefaultKey3" )); return; } bool WLANImp::writeConfig() { qWarning( "WLANImp::writeConfig() called." ); config->setGroup( "Properties" ); |