summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/wlan/wlanedit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/wlan/wlanedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/wlan/wlanedit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/wlan/wlanedit.cpp b/noncore/settings/networksettings2/wlan/wlanedit.cpp
index 8d3979e..74174bf 100644
--- a/noncore/settings/networksettings2/wlan/wlanedit.cpp
+++ b/noncore/settings/networksettings2/wlan/wlanedit.cpp
@@ -11,25 +11,25 @@
11#include "wlanedit.h" 11#include "wlanedit.h"
12#include "wlan_NN.h" 12#include "wlan_NN.h"
13#include "wlan_NNI.h" 13#include "wlan_NNI.h"
14 14
15WLanEdit::WLanEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : 15WLanEdit::WLanEdit( QWidget * Parent, ANetNodeInstance * TNNI ) :
16 WLanGUI( Parent ), RefreshTimer(this){ 16 WLanGUI( Parent ), RefreshTimer(this){
17 17
18 InterfaceInfo * II; 18 InterfaceInfo * II;
19 19
20 NNI = TNNI; 20 NNI = TNNI;
21 Dev = NNI->runtime()->device(); 21 Dev = NNI->runtime()->device();
22 WE = 0; 22 WE = 0;
23 if( ( II = Dev->assignedInterface() ) ) { 23 if( ( II = NNI->connection()->assignedInterface() ) ) {
24 // show data 24 // show data
25 WE = new WExtensions( II->Name ); 25 WE = new WExtensions( II->Name );
26 26
27 if( WE->doesHaveWirelessExtensions() ) { 27 if( WE->doesHaveWirelessExtensions() ) {
28 QString S; 28 QString S;
29 Station_LBL->setText( WE->station() ); 29 Station_LBL->setText( WE->station() );
30 ESSID_LBL->setText( WE->essid() ); 30 ESSID_LBL->setText( WE->essid() );
31 Mode_LBL->setText( WE->mode() ); 31 Mode_LBL->setText( WE->mode() );
32 S.setNum( WE->frequency() ); 32 S.setNum( WE->frequency() );
33 Frequency_LBL->setText( S ); 33 Frequency_LBL->setText( S );
34 S.setNum( WE->channel() ); 34 S.setNum( WE->channel() );
35 Channel_LBL->setText( S ); 35 Channel_LBL->setText( S );
@@ -52,40 +52,40 @@ WLanEdit::~WLanEdit( void ) {
52 52
53QString WLanEdit::acceptable( void ) { 53QString WLanEdit::acceptable( void ) {
54 if( ESSID_LE->text().isEmpty() ) { 54 if( ESSID_LE->text().isEmpty() ) {
55 return QString("ESSID is mandatory"); 55 return QString("ESSID is mandatory");
56 } 56 }
57 if( SpecifyAP_CB->isChecked() && 57 if( SpecifyAP_CB->isChecked() &&
58 APMac_LE->text().isEmpty() ) { 58 APMac_LE->text().isEmpty() ) {
59 return QString("APMac must have value"); 59 return QString("APMac must have value");
60 } 60 }
61 return QString(); 61 return QString();
62} 62}
63 63
64void WLanEdit::showData( WLanData_t & Data ) { 64void WLanEdit::showData( WLanData & Data ) {
65 Mode_CB->setCurrentItem( Data.Mode ); 65 Mode_CB->setCurrentItem( Data.Mode );
66 ESSID_LE->setText( Data.ESSID ); 66 ESSID_LE->setText( Data.ESSID );
67 NodeName_LE->setText( Data.NodeName ); 67 NodeName_LE->setText( Data.NodeName );
68 SpecifyAP_CB->setChecked( Data.SpecificAP ); 68 SpecifyAP_CB->setChecked( Data.SpecificAP );
69 APMac_LE->setText( Data.APMac ); 69 APMac_LE->setText( Data.APMac );
70 70
71 EnableWEP_CB->setChecked( Data.Encrypted ); 71 EnableWEP_CB->setChecked( Data.Encrypted );
72 AcceptNonEncrypted_CB->setChecked( Data.AcceptNonEncrypted ); 72 AcceptNonEncrypted_CB->setChecked( Data.AcceptNonEncrypted );
73 Key1_LE->setText( Data.Key[0] ); 73 Key1_LE->setText( Data.Key[0] );
74 Key2_LE->setText( Data.Key[1] ); 74 Key2_LE->setText( Data.Key[1] );
75 Key3_LE->setText( Data.Key[2] ); 75 Key3_LE->setText( Data.Key[2] );
76 Key4_LE->setText( Data.Key[3] ); 76 Key4_LE->setText( Data.Key[3] );
77} 77}
78 78
79bool WLanEdit::commit( WLanData_t & Data ) { 79bool WLanEdit::commit( WLanData & Data ) {
80 bool SM = 0; 80 bool SM = 0;
81 81
82 TXTM( Data.ESSID, ESSID_LE, SM ); 82 TXTM( Data.ESSID, ESSID_LE, SM );
83 TXTM( Data.NodeName, NodeName_LE, SM ); 83 TXTM( Data.NodeName, NodeName_LE, SM );
84 TXTM( Data.APMac, APMac_LE, SM ); 84 TXTM( Data.APMac, APMac_LE, SM );
85 TXTM( Data.Key[0], Key1_LE, SM ); 85 TXTM( Data.Key[0], Key1_LE, SM );
86 TXTM( Data.Key[1], Key2_LE, SM ); 86 TXTM( Data.Key[1], Key2_LE, SM );
87 TXTM( Data.Key[2], Key3_LE, SM ); 87 TXTM( Data.Key[2], Key3_LE, SM );
88 TXTM( Data.Key[3], Key4_LE, SM ); 88 TXTM( Data.Key[3], Key4_LE, SM );
89 CBM( Data.SpecificAP, SpecifyAP_CB, SM ); 89 CBM( Data.SpecificAP, SpecifyAP_CB, SM );
90 CBM( Data.Encrypted, EnableWEP_CB, SM ); 90 CBM( Data.Encrypted, EnableWEP_CB, SM );
91 CBM( Data.AcceptNonEncrypted, AcceptNonEncrypted_CB, SM ); 91 CBM( Data.AcceptNonEncrypted, AcceptNonEncrypted_CB, SM );