summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan/wlanimp.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp4
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
@@ -12,48 +12,52 @@
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qlineedit.h> 13#include <qlineedit.h>
14#include <qspinbox.h> 14#include <qspinbox.h>
15#include <qradiobutton.h> 15#include <qradiobutton.h>
16#include <qcheckbox.h> 16#include <qcheckbox.h>
17#include <qregexp.h> 17#include <qregexp.h>
18#include <qpe/config.h> 18#include <qpe/config.h>
19#include <qtabwidget.h> 19#include <qtabwidget.h>
20#include "interfacesetupimp.h" 20#include "interfacesetupimp.h"
21 21
22WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ 22WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl){
23 config = new Config("wireless"); 23 config = new Config("wireless");
24 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);//, Qt::WDestructiveClose); 24 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);//, Qt::WDestructiveClose);
25 //configure->setProfile(currentProfile); 25 //configure->setProfile(currentProfile);
26 tabWidget->insertTab(interfaceSetup, "TCP/IP"); 26 tabWidget->insertTab(interfaceSetup, "TCP/IP");
27 27
28 readConfig(); 28 readConfig();
29 29
30} 30}
31 31
32WLANImp::~WLANImp( ){ 32WLANImp::~WLANImp( ){
33 delete config; 33 delete config;
34} 34}
35 35
36void WLANImp::setProfile(QString &profile){
37 interfaceSetup->setProfile(profile);
38}
39
36void WLANImp::readConfig() 40void WLANImp::readConfig()
37{ 41{
38 qWarning( "WLANImp::readConfig() called." ); 42 qWarning( "WLANImp::readConfig() called." );
39 config->setGroup( "Properties" ); 43 config->setGroup( "Properties" );
40 QString ssid = config->readEntry( "SSID", "any" ); 44 QString ssid = config->readEntry( "SSID", "any" );
41 if( ssid == "any" || ssid == "ANY" ){ 45 if( ssid == "any" || ssid == "ANY" ){
42 essNon->setChecked( true ); 46 essNon->setChecked( true );
43 } else { 47 } else {
44 essSpecific->setChecked( true ); 48 essSpecific->setChecked( true );
45 essSpecificLineEdit->setText( ssid ); 49 essSpecificLineEdit->setText( ssid );
46 } 50 }
47 QString mode = config->readEntry( "Mode", "Managed" ); 51 QString mode = config->readEntry( "Mode", "Managed" );
48 if( mode == "adhoc" ) { 52 if( mode == "adhoc" ) {
49 network802->setChecked( true ); 53 network802->setChecked( true );
50 } else { 54 } else {
51 networkInfrastructure->setChecked( true ); 55 networkInfrastructure->setChecked( true );
52 } 56 }
53 networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) ); 57 networkChannel->setValue( config->readNumEntry( "CHANNEL", 1 ) );
54// config->readEntry( "RATE", "auto" ); 58// config->readEntry( "RATE", "auto" );
55 config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false ); 59 config->readEntry( "dot11PrivacyInvoked" ) == "true" ? wepEnabled->setChecked( true ) : wepEnabled->setChecked( false );
56 config->readEntry( "AuthType", "opensystem" ); 60 config->readEntry( "AuthType", "opensystem" );
57 config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true ); 61 config->readEntry( "PRIV_KEY128", "false" ) == "false" ? key40->setChecked( true ) : key128->setChecked( true );
58 int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 ); 62 int defaultkey = config->readNumEntry( "dot11WEPDefaultKeyID", 0 );
59 switch( defaultkey ){ 63 switch( defaultkey ){