Diffstat (limited to 'noncore/settings/networksettings2/wlan') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan.pro | 18 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanGUI.cpp | 360 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanGUI.h | 96 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan_NN.cpp | 60 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan_NN.h | 44 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan_NNI.cpp | 30 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlan_NNI.h | 43 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlandata.h | 17 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanedit.cpp | 16 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanedit.h | 12 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanrun.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/networksettings2/wlan/wlanrun.h | 42 |
12 files changed, 743 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/wlan/wlan.pro b/noncore/settings/networksettings2/wlan/wlan.pro new file mode 100644 index 0000000..4cc47ee --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlan.pro | |||
@@ -0,0 +1,18 @@ | |||
1 | TEMPLATE = lib | ||
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/plugins/networksettings2 | ||
4 | HEADERS = wlan_NN.h \ | ||
5 | wlan_NNI.h \ | ||
6 | wlanedit.h | ||
7 | SOURCES = wlan_NN.cpp \ | ||
8 | wlan_NNI.cpp \ | ||
9 | wlanedit.cpp \ | ||
10 | wlanrun.cpp | ||
11 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../networksettings2 | ||
12 | DEPENDPATH+= $(OPIEDIR)/include ../ ../networksettings2 | ||
13 | LIBS += -lqpe | ||
14 | INTERFACES= wlanGUI.ui | ||
15 | TARGET = wlan | ||
16 | VERSION = 1.0.0 | ||
17 | |||
18 | include ( $(OPIEDIR)/include.pro ) | ||
diff --git a/noncore/settings/networksettings2/wlan/wlanGUI.cpp b/noncore/settings/networksettings2/wlan/wlanGUI.cpp new file mode 100644 index 0000000..902bd27 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlanGUI.cpp | |||
@@ -0,0 +1,360 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form implementation generated from reading ui file 'wlanGUI.ui' | ||
3 | ** | ||
4 | ** Created: Tue Mar 30 02:42:58 2004 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #include "wlanGUI.h" | ||
10 | |||
11 | #include <qbuttongroup.h> | ||
12 | #include <qcheckbox.h> | ||
13 | #include <qcombobox.h> | ||
14 | #include <qgroupbox.h> | ||
15 | #include <qlabel.h> | ||
16 | #include <qlineedit.h> | ||
17 | #include <qprogressbar.h> | ||
18 | #include <qpushbutton.h> | ||
19 | #include <qradiobutton.h> | ||
20 | #include <qspinbox.h> | ||
21 | #include <qtabwidget.h> | ||
22 | #include <qlayout.h> | ||
23 | #include <qvariant.h> | ||
24 | #include <qtooltip.h> | ||
25 | #include <qwhatsthis.h> | ||
26 | |||
27 | /* | ||
28 | * Constructs a WLanGUI which is a child of 'parent', with the | ||
29 | * name 'name' and widget flags set to 'f' | ||
30 | */ | ||
31 | WLanGUI::WLanGUI( QWidget* parent, const char* name, WFlags fl ) | ||
32 | : QWidget( parent, name, fl ) | ||
33 | { | ||
34 | if ( !name ) | ||
35 | setName( "WLanGUI" ); | ||
36 | resize( 196, 329 ); | ||
37 | setCaption( tr( "Form1" ) ); | ||
38 | WLanGUILayout = new QVBoxLayout( this ); | ||
39 | WLanGUILayout->setSpacing( 0 ); | ||
40 | WLanGUILayout->setMargin( 0 ); | ||
41 | |||
42 | tabWidget = new QTabWidget( this, "tabWidget" ); | ||
43 | tabWidget->setEnabled( TRUE ); | ||
44 | |||
45 | ConfigPage = new QWidget( tabWidget, "ConfigPage" ); | ||
46 | ConfigPageLayout = new QVBoxLayout( ConfigPage ); | ||
47 | ConfigPageLayout->setSpacing( 2 ); | ||
48 | ConfigPageLayout->setMargin( 0 ); | ||
49 | |||
50 | Layout6 = new QGridLayout; | ||
51 | Layout6->setSpacing( 6 ); | ||
52 | Layout6->setMargin( 1 ); | ||
53 | |||
54 | essidLabel = new QLabel( ConfigPage, "essidLabel" ); | ||
55 | essidLabel->setEnabled( TRUE ); | ||
56 | essidLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, essidLabel->sizePolicy().hasHeightForWidth() ) ); | ||
57 | essidLabel->setText( tr( "ESS-ID" ) ); | ||
58 | |||
59 | Layout6->addWidget( essidLabel, 1, 0 ); | ||
60 | |||
61 | essid = new QComboBox( FALSE, ConfigPage, "essid" ); | ||
62 | essid->insertItem( tr( "any" ) ); | ||
63 | essid->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, essid->sizePolicy().hasHeightForWidth() ) ); | ||
64 | essid->setEditable( TRUE ); | ||
65 | essid->setCurrentItem( 0 ); | ||
66 | essid->setSizeLimit( 5 ); | ||
67 | essid->setAutoCompletion( TRUE ); | ||
68 | essid->setDuplicatesEnabled( FALSE ); | ||
69 | |||
70 | Layout6->addWidget( essid, 1, 1 ); | ||
71 | |||
72 | modeLabel = new QLabel( ConfigPage, "modeLabel" ); | ||
73 | modeLabel->setEnabled( TRUE ); | ||
74 | modeLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, modeLabel->sizePolicy().hasHeightForWidth() ) ); | ||
75 | modeLabel->setText( tr( "Mode" ) ); | ||
76 | |||
77 | Layout6->addWidget( modeLabel, 0, 0 ); | ||
78 | |||
79 | mode = new QComboBox( FALSE, ConfigPage, "mode" ); | ||
80 | mode->insertItem( tr( "Infrastructure" ) ); | ||
81 | mode->insertItem( tr( "Auto" ) ); | ||
82 | mode->insertItem( tr( "Managed" ) ); | ||
83 | mode->insertItem( tr( "Ad-Hoc" ) ); | ||
84 | mode->setEnabled( TRUE ); | ||
85 | mode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, mode->sizePolicy().hasHeightForWidth() ) ); | ||
86 | |||
87 | Layout6->addWidget( mode, 0, 1 ); | ||
88 | ConfigPageLayout->addLayout( Layout6 ); | ||
89 | |||
90 | Layout8 = new QGridLayout; | ||
91 | Layout8->setSpacing( 2 ); | ||
92 | Layout8->setMargin( 1 ); | ||
93 | |||
94 | specifyAp = new QCheckBox( ConfigPage, "specifyAp" ); | ||
95 | specifyAp->setText( tr( "Specify &Access Point" ) ); | ||
96 | |||
97 | Layout8->addMultiCellWidget( specifyAp, 0, 0, 0, 2 ); | ||
98 | |||
99 | macLabel = new QLabel( ConfigPage, "macLabel" ); | ||
100 | macLabel->setEnabled( FALSE ); | ||
101 | macLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)1, macLabel->sizePolicy().hasHeightForWidth() ) ); | ||
102 | macLabel->setText( tr( "MAC" ) ); | ||
103 | |||
104 | Layout8->addWidget( macLabel, 1, 1 ); | ||
105 | |||
106 | macEdit = new QLineEdit( ConfigPage, "macEdit" ); | ||
107 | macEdit->setEnabled( FALSE ); | ||
108 | macEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, macEdit->sizePolicy().hasHeightForWidth() ) ); | ||
109 | |||
110 | Layout8->addWidget( macEdit, 1, 2 ); | ||
111 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); | ||
112 | Layout8->addItem( spacer, 1, 0 ); | ||
113 | ConfigPageLayout->addLayout( Layout8 ); | ||
114 | |||
115 | Layout7 = new QHBoxLayout; | ||
116 | Layout7->setSpacing( 6 ); | ||
117 | Layout7->setMargin( 1 ); | ||
118 | |||
119 | specifyChan = new QCheckBox( ConfigPage, "specifyChan" ); | ||
120 | specifyChan->setText( tr( "Specific &Channel" ) ); | ||
121 | Layout7->addWidget( specifyChan ); | ||
122 | |||
123 | networkChannel = new QSpinBox( ConfigPage, "networkChannel" ); | ||
124 | networkChannel->setEnabled( FALSE ); | ||
125 | networkChannel->setMaxValue( 15 ); | ||
126 | networkChannel->setMinValue( 1 ); | ||
127 | networkChannel->setValue( 1 ); | ||
128 | Layout7->addWidget( networkChannel ); | ||
129 | ConfigPageLayout->addLayout( Layout7 ); | ||
130 | QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
131 | ConfigPageLayout->addItem( spacer_2 ); | ||
132 | tabWidget->insertTab( ConfigPage, tr( "General" ) ); | ||
133 | |||
134 | WepPage = new QWidget( tabWidget, "WepPage" ); | ||
135 | WepPageLayout = new QVBoxLayout( WepPage ); | ||
136 | WepPageLayout->setSpacing( 2 ); | ||
137 | WepPageLayout->setMargin( 0 ); | ||
138 | |||
139 | wepEnabled = new QCheckBox( WepPage, "wepEnabled" ); | ||
140 | wepEnabled->setText( tr( "&Enable Encryption" ) ); | ||
141 | WepPageLayout->addWidget( wepEnabled ); | ||
142 | |||
143 | KeyButtonGroup = new QButtonGroup( WepPage, "KeyButtonGroup" ); | ||
144 | KeyButtonGroup->setEnabled( FALSE ); | ||
145 | KeyButtonGroup->setTitle( tr( "&Key Setting" ) ); | ||
146 | KeyButtonGroup->setColumnLayout(0, Qt::Vertical ); | ||
147 | KeyButtonGroup->layout()->setSpacing( 0 ); | ||
148 | KeyButtonGroup->layout()->setMargin( 0 ); | ||
149 | KeyButtonGroupLayout = new QGridLayout( KeyButtonGroup->layout() ); | ||
150 | KeyButtonGroupLayout->setAlignment( Qt::AlignTop ); | ||
151 | KeyButtonGroupLayout->setSpacing( 2 ); | ||
152 | KeyButtonGroupLayout->setMargin( 2 ); | ||
153 | |||
154 | keyRadio0 = new QRadioButton( KeyButtonGroup, "keyRadio0" ); | ||
155 | keyRadio0->setText( tr( "Key &1" ) ); | ||
156 | keyRadio0->setChecked( TRUE ); | ||
157 | |||
158 | KeyButtonGroupLayout->addWidget( keyRadio0, 0, 0 ); | ||
159 | |||
160 | keyRadio3 = new QRadioButton( KeyButtonGroup, "keyRadio3" ); | ||
161 | keyRadio3->setText( tr( "Key &4" ) ); | ||
162 | |||
163 | KeyButtonGroupLayout->addWidget( keyRadio3, 3, 0 ); | ||
164 | |||
165 | LineEdit6 = new QLineEdit( KeyButtonGroup, "LineEdit6" ); | ||
166 | |||
167 | KeyButtonGroupLayout->addWidget( LineEdit6, 0, 1 ); | ||
168 | |||
169 | keyRadio1 = new QRadioButton( KeyButtonGroup, "keyRadio1" ); | ||
170 | keyRadio1->setText( tr( "Key &2" ) ); | ||
171 | |||
172 | KeyButtonGroupLayout->addWidget( keyRadio1, 1, 0 ); | ||
173 | |||
174 | keyRadio2 = new QRadioButton( KeyButtonGroup, "keyRadio2" ); | ||
175 | keyRadio2->setText( tr( "Key &3" ) ); | ||
176 | |||
177 | KeyButtonGroupLayout->addWidget( keyRadio2, 2, 0 ); | ||
178 | |||
179 | LineEdit6_2 = new QLineEdit( KeyButtonGroup, "LineEdit6_2" ); | ||
180 | |||
181 | KeyButtonGroupLayout->addWidget( LineEdit6_2, 1, 1 ); | ||
182 | |||
183 | LineEdit6_4 = new QLineEdit( KeyButtonGroup, "LineEdit6_4" ); | ||
184 | |||
185 | KeyButtonGroupLayout->addWidget( LineEdit6_4, 3, 1 ); | ||
186 | |||
187 | LineEdit6_3 = new QLineEdit( KeyButtonGroup, "LineEdit6_3" ); | ||
188 | |||
189 | KeyButtonGroupLayout->addWidget( LineEdit6_3, 2, 1 ); | ||
190 | WepPageLayout->addWidget( KeyButtonGroup ); | ||
191 | |||
192 | NonEncButtonGroup = new QButtonGroup( WepPage, "NonEncButtonGroup" ); | ||
193 | NonEncButtonGroup->setEnabled( FALSE ); | ||
194 | NonEncButtonGroup->setTitle( tr( "Non-encrypted Packets" ) ); | ||
195 | NonEncButtonGroup->setRadioButtonExclusive( TRUE ); | ||
196 | NonEncButtonGroup->setColumnLayout(0, Qt::Vertical ); | ||
197 | NonEncButtonGroup->layout()->setSpacing( 0 ); | ||
198 | NonEncButtonGroup->layout()->setMargin( 0 ); | ||
199 | NonEncButtonGroupLayout = new QGridLayout( NonEncButtonGroup->layout() ); | ||
200 | NonEncButtonGroupLayout->setAlignment( Qt::AlignTop ); | ||
201 | NonEncButtonGroupLayout->setSpacing( 6 ); | ||
202 | NonEncButtonGroupLayout->setMargin( 2 ); | ||
203 | |||
204 | acceptNonEnc = new QRadioButton( NonEncButtonGroup, "acceptNonEnc" ); | ||
205 | acceptNonEnc->setText( tr( "&Accept" ) ); | ||
206 | acceptNonEnc->setChecked( TRUE ); | ||
207 | NonEncButtonGroup->insert( acceptNonEnc, 0 ); | ||
208 | |||
209 | NonEncButtonGroupLayout->addWidget( acceptNonEnc, 0, 0 ); | ||
210 | |||
211 | rejectNonEnc = new QRadioButton( NonEncButtonGroup, "rejectNonEnc" ); | ||
212 | rejectNonEnc->setText( tr( "&Reject" ) ); | ||
213 | NonEncButtonGroup->insert( rejectNonEnc, 1 ); | ||
214 | |||
215 | NonEncButtonGroupLayout->addWidget( rejectNonEnc, 0, 1 ); | ||
216 | WepPageLayout->addWidget( NonEncButtonGroup ); | ||
217 | QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
218 | WepPageLayout->addItem( spacer_3 ); | ||
219 | tabWidget->insertTab( WepPage, tr( "Encryption" ) ); | ||
220 | |||
221 | tab = new QWidget( tabWidget, "tab" ); | ||
222 | tabLayout = new QVBoxLayout( tab ); | ||
223 | tabLayout->setSpacing( 2 ); | ||
224 | tabLayout->setMargin( 0 ); | ||
225 | |||
226 | Layout12 = new QGridLayout; | ||
227 | Layout12->setSpacing( 2 ); | ||
228 | Layout12->setMargin( 0 ); | ||
229 | |||
230 | TextLabel1_3 = new QLabel( tab, "TextLabel1_3" ); | ||
231 | TextLabel1_3->setText( tr( "Station" ) ); | ||
232 | |||
233 | Layout12->addWidget( TextLabel1_3, 0, 0 ); | ||
234 | |||
235 | Channel_LBL = new QLabel( tab, "Channel_LBL" ); | ||
236 | Channel_LBL->setFrameShape( QLabel::Panel ); | ||
237 | Channel_LBL->setFrameShadow( QLabel::Sunken ); | ||
238 | |||
239 | Layout12->addWidget( Channel_LBL, 3, 1 ); | ||
240 | |||
241 | TextLabel4_3 = new QLabel( tab, "TextLabel4_3" ); | ||
242 | TextLabel4_3->setText( tr( "Channel" ) ); | ||
243 | |||
244 | Layout12->addWidget( TextLabel4_3, 3, 0 ); | ||
245 | |||
246 | TextLabel3_3 = new QLabel( tab, "TextLabel3_3" ); | ||
247 | TextLabel3_3->setText( tr( "Mode" ) ); | ||
248 | |||
249 | Layout12->addWidget( TextLabel3_3, 2, 0 ); | ||
250 | |||
251 | TextLabel2_3 = new QLabel( tab, "TextLabel2_3" ); | ||
252 | TextLabel2_3->setText( tr( "ESSID" ) ); | ||
253 | |||
254 | Layout12->addWidget( TextLabel2_3, 1, 0 ); | ||
255 | |||
256 | TextLabel9_2 = new QLabel( tab, "TextLabel9_2" ); | ||
257 | TextLabel9_2->setText( tr( "AP" ) ); | ||
258 | |||
259 | Layout12->addWidget( TextLabel9_2, 4, 0 ); | ||
260 | |||
261 | Station_LBL = new QLabel( tab, "Station_LBL" ); | ||
262 | Station_LBL->setFrameShape( QLabel::Panel ); | ||
263 | Station_LBL->setFrameShadow( QLabel::Sunken ); | ||
264 | |||
265 | Layout12->addWidget( Station_LBL, 0, 1 ); | ||
266 | |||
267 | Rate_LBL = new QLabel( tab, "Rate_LBL" ); | ||
268 | Rate_LBL->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, Rate_LBL->sizePolicy().hasHeightForWidth() ) ); | ||
269 | Rate_LBL->setFrameShape( QLabel::Panel ); | ||
270 | Rate_LBL->setFrameShadow( QLabel::Sunken ); | ||
271 | |||
272 | Layout12->addWidget( Rate_LBL, 5, 1 ); | ||
273 | |||
274 | TextLabel4_2_2 = new QLabel( tab, "TextLabel4_2_2" ); | ||
275 | TextLabel4_2_2->setText( tr( "Rate" ) ); | ||
276 | |||
277 | Layout12->addWidget( TextLabel4_2_2, 5, 0 ); | ||
278 | |||
279 | AP_LBL = new QLabel( tab, "AP_LBL" ); | ||
280 | AP_LBL->setFrameShape( QLabel::Panel ); | ||
281 | AP_LBL->setFrameShadow( QLabel::Sunken ); | ||
282 | |||
283 | Layout12->addWidget( AP_LBL, 4, 1 ); | ||
284 | |||
285 | essidLabel_3 = new QLabel( tab, "essidLabel_3" ); | ||
286 | essidLabel_3->setFrameShape( QLabel::Panel ); | ||
287 | essidLabel_3->setFrameShadow( QLabel::Sunken ); | ||
288 | |||
289 | Layout12->addWidget( essidLabel_3, 1, 1 ); | ||
290 | |||
291 | modeLabel_3 = new QLabel( tab, "modeLabel_3" ); | ||
292 | modeLabel_3->setFrameShape( QLabel::Panel ); | ||
293 | modeLabel_3->setFrameShadow( QLabel::Sunken ); | ||
294 | |||
295 | Layout12->addWidget( modeLabel_3, 2, 1 ); | ||
296 | tabLayout->addLayout( Layout12 ); | ||
297 | |||
298 | GroupBox1 = new QGroupBox( tab, "GroupBox1" ); | ||
299 | GroupBox1->setTitle( tr( "Link Quality" ) ); | ||
300 | GroupBox1->setColumnLayout(0, Qt::Vertical ); | ||
301 | GroupBox1->layout()->setSpacing( 0 ); | ||
302 | GroupBox1->layout()->setMargin( 0 ); | ||
303 | GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); | ||
304 | GroupBox1Layout->setAlignment( Qt::AlignTop ); | ||
305 | GroupBox1Layout->setSpacing( 2 ); | ||
306 | GroupBox1Layout->setMargin( 2 ); | ||
307 | |||
308 | TextLabel2_2_2 = new QLabel( GroupBox1, "TextLabel2_2_2" ); | ||
309 | TextLabel2_2_2->setText( tr( "Noise" ) ); | ||
310 | |||
311 | GroupBox1Layout->addWidget( TextLabel2_2_2, 1, 0 ); | ||
312 | |||
313 | TextLabel3_2_2 = new QLabel( GroupBox1, "TextLabel3_2_2" ); | ||
314 | TextLabel3_2_2->setText( tr( "Quality" ) ); | ||
315 | |||
316 | GroupBox1Layout->addWidget( TextLabel3_2_2, 2, 0 ); | ||
317 | |||
318 | Noise_PB = new QProgressBar( GroupBox1, "Noise_PB" ); | ||
319 | Noise_PB->setProgress( 0 ); | ||
320 | |||
321 | GroupBox1Layout->addWidget( Noise_PB, 1, 2 ); | ||
322 | |||
323 | Quality_PB = new QProgressBar( GroupBox1, "Quality_PB" ); | ||
324 | Quality_PB->setProgress( 0 ); | ||
325 | |||
326 | GroupBox1Layout->addWidget( Quality_PB, 2, 2 ); | ||
327 | |||
328 | TextLabel1_2_2 = new QLabel( GroupBox1, "TextLabel1_2_2" ); | ||
329 | TextLabel1_2_2->setText( tr( "Signal" ) ); | ||
330 | |||
331 | GroupBox1Layout->addWidget( TextLabel1_2_2, 0, 0 ); | ||
332 | QSpacerItem* spacer_4 = new QSpacerItem( 16, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); | ||
333 | GroupBox1Layout->addItem( spacer_4, 0, 1 ); | ||
334 | |||
335 | Signal_PB = new QProgressBar( GroupBox1, "Signal_PB" ); | ||
336 | Signal_PB->setProgress( 0 ); | ||
337 | |||
338 | GroupBox1Layout->addWidget( Signal_PB, 0, 2 ); | ||
339 | tabLayout->addWidget( GroupBox1 ); | ||
340 | QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
341 | tabLayout->addItem( spacer_5 ); | ||
342 | tabWidget->insertTab( tab, tr( "State" ) ); | ||
343 | WLanGUILayout->addWidget( tabWidget ); | ||
344 | |||
345 | // signals and slots connections | ||
346 | connect( wepEnabled, SIGNAL( toggled(bool) ), KeyButtonGroup, SLOT( setEnabled(bool) ) ); | ||
347 | connect( wepEnabled, SIGNAL( toggled(bool) ), NonEncButtonGroup, SLOT( setEnabled(bool) ) ); | ||
348 | connect( specifyAp, SIGNAL( toggled(bool) ), macEdit, SLOT( setEnabled(bool) ) ); | ||
349 | connect( specifyAp, SIGNAL( toggled(bool) ), macLabel, SLOT( setEnabled(bool) ) ); | ||
350 | connect( specifyChan, SIGNAL( toggled(bool) ), networkChannel, SLOT( setEnabled(bool) ) ); | ||
351 | } | ||
352 | |||
353 | /* | ||
354 | * Destroys the object and frees any allocated resources | ||
355 | */ | ||
356 | WLanGUI::~WLanGUI() | ||
357 | { | ||
358 | // no need to delete child widgets, Qt does it all for us | ||
359 | } | ||
360 | |||
diff --git a/noncore/settings/networksettings2/wlan/wlanGUI.h b/noncore/settings/networksettings2/wlan/wlanGUI.h new file mode 100644 index 0000000..42e8705 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlanGUI.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form interface generated from reading ui file 'wlanGUI.ui' | ||
3 | ** | ||
4 | ** Created: Tue Mar 30 02:42:55 2004 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #ifndef WLANGUI_H | ||
10 | #define WLANGUI_H | ||
11 | |||
12 | #include <qvariant.h> | ||
13 | #include <qwidget.h> | ||
14 | class QVBoxLayout; | ||
15 | class QHBoxLayout; | ||
16 | class QGridLayout; | ||
17 | class QButtonGroup; | ||
18 | class QCheckBox; | ||
19 | class QComboBox; | ||
20 | class QGroupBox; | ||
21 | class QLabel; | ||
22 | class QLineEdit; | ||
23 | class QProgressBar; | ||
24 | class QRadioButton; | ||
25 | class QSpinBox; | ||
26 | class QTabWidget; | ||
27 | |||
28 | class WLanGUI : public QWidget | ||
29 | { | ||
30 | Q_OBJECT | ||
31 | |||
32 | public: | ||
33 | WLanGUI( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
34 | ~WLanGUI(); | ||
35 | |||
36 | QTabWidget* tabWidget; | ||
37 | QWidget* ConfigPage; | ||
38 | QLabel* essidLabel; | ||
39 | QComboBox* essid; | ||
40 | QLabel* modeLabel; | ||
41 | QComboBox* mode; | ||
42 | QCheckBox* specifyAp; | ||
43 | QLabel* macLabel; | ||
44 | QLineEdit* macEdit; | ||
45 | QCheckBox* specifyChan; | ||
46 | QSpinBox* networkChannel; | ||
47 | QWidget* WepPage; | ||
48 | QCheckBox* wepEnabled; | ||
49 | QButtonGroup* KeyButtonGroup; | ||
50 | QRadioButton* keyRadio0; | ||
51 | QRadioButton* keyRadio3; | ||
52 | QLineEdit* LineEdit6; | ||
53 | QRadioButton* keyRadio1; | ||
54 | QRadioButton* keyRadio2; | ||
55 | QLineEdit* LineEdit6_2; | ||
56 | QLineEdit* LineEdit6_4; | ||
57 | QLineEdit* LineEdit6_3; | ||
58 | QButtonGroup* NonEncButtonGroup; | ||
59 | QRadioButton* acceptNonEnc; | ||
60 | QRadioButton* rejectNonEnc; | ||
61 | QWidget* tab; | ||
62 | QLabel* TextLabel1_3; | ||
63 | QLabel* Channel_LBL; | ||
64 | QLabel* TextLabel4_3; | ||
65 | QLabel* TextLabel3_3; | ||
66 | QLabel* TextLabel2_3; | ||
67 | QLabel* TextLabel9_2; | ||
68 | QLabel* Station_LBL; | ||
69 | QLabel* Rate_LBL; | ||
70 | QLabel* TextLabel4_2_2; | ||
71 | QLabel* AP_LBL; | ||
72 | QLabel* essidLabel_3; | ||
73 | QLabel* modeLabel_3; | ||
74 | QGroupBox* GroupBox1; | ||
75 | QLabel* TextLabel2_2_2; | ||
76 | QLabel* TextLabel3_2_2; | ||
77 | QProgressBar* Noise_PB; | ||
78 | QProgressBar* Quality_PB; | ||
79 | QLabel* TextLabel1_2_2; | ||
80 | QProgressBar* Signal_PB; | ||
81 | |||
82 | protected: | ||
83 | QVBoxLayout* WLanGUILayout; | ||
84 | QVBoxLayout* ConfigPageLayout; | ||
85 | QGridLayout* Layout6; | ||
86 | QGridLayout* Layout8; | ||
87 | QHBoxLayout* Layout7; | ||
88 | QVBoxLayout* WepPageLayout; | ||
89 | QGridLayout* KeyButtonGroupLayout; | ||
90 | QGridLayout* NonEncButtonGroupLayout; | ||
91 | QVBoxLayout* tabLayout; | ||
92 | QGridLayout* Layout12; | ||
93 | QGridLayout* GroupBox1Layout; | ||
94 | }; | ||
95 | |||
96 | #endif // WLANGUI_H | ||
diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.cpp b/noncore/settings/networksettings2/wlan/wlan_NN.cpp new file mode 100644 index 0000000..5a26e41 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlan_NN.cpp | |||
@@ -0,0 +1,60 @@ | |||
1 | #include "wlan_NN.h" | ||
2 | #include "wlan_NNI.h" | ||
3 | |||
4 | static const char * WLanNeeds[] = | ||
5 | { 0 | ||
6 | }; | ||
7 | |||
8 | /** | ||
9 | * Constructor, find all of the possible interfaces | ||
10 | */ | ||
11 | WLanNetNode::WLanNetNode() : ANetNode() { | ||
12 | } | ||
13 | |||
14 | /** | ||
15 | * Delete any interfaces that we own. | ||
16 | */ | ||
17 | WLanNetNode::~WLanNetNode(){ | ||
18 | } | ||
19 | |||
20 | const QString WLanNetNode::nodeDescription(){ | ||
21 | return tr("\ | ||
22 | <p>Configure Wi/Fi or WLan network cards.</p>\ | ||
23 | <p>Defines Wireless options for those cards</p>\ | ||
24 | " | ||
25 | ); | ||
26 | } | ||
27 | |||
28 | ANetNodeInstance * WLanNetNode::createInstance( void ) { | ||
29 | return new AWLan( this ); | ||
30 | } | ||
31 | |||
32 | const char ** WLanNetNode::needs( void ) { | ||
33 | return WLanNeeds; | ||
34 | } | ||
35 | |||
36 | const char * WLanNetNode::provides( void ) { | ||
37 | return "device"; | ||
38 | } | ||
39 | |||
40 | bool WLanNetNode::generateProperFilesFor( | ||
41 | ANetNodeInstance * ) { | ||
42 | return 1; | ||
43 | } | ||
44 | |||
45 | bool WLanNetNode::hasDataFor( const QString & ) { | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | bool WLanNetNode::generateDataForCommonFile( | ||
50 | SystemFile & , | ||
51 | long, | ||
52 | ANetNodeInstance * ) { | ||
53 | return 1; | ||
54 | } | ||
55 | |||
56 | extern "C" { | ||
57 | void create_plugin( QList<ANetNode> & PNN ) { | ||
58 | PNN.append( new WLanNetNode() ); | ||
59 | } | ||
60 | } | ||
diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.h b/noncore/settings/networksettings2/wlan/wlan_NN.h new file mode 100644 index 0000000..d1d6ded --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlan_NN.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef WLAN_NETNODE_H | ||
2 | #define WLAN_NETNODE_H | ||
3 | |||
4 | #include "netnode.h" | ||
5 | |||
6 | class AWLan; | ||
7 | |||
8 | class WLanNetNode : public ANetNode{ | ||
9 | |||
10 | Q_OBJECT | ||
11 | |||
12 | public: | ||
13 | |||
14 | WLanNetNode(); | ||
15 | virtual ~WLanNetNode(); | ||
16 | |||
17 | virtual const QString pixmapName() | ||
18 | { return "wlan"; } | ||
19 | |||
20 | virtual const QString nodeName() | ||
21 | { return tr("WLan Device"); } | ||
22 | |||
23 | virtual const QString nodeDescription() ; | ||
24 | |||
25 | virtual ANetNodeInstance * createInstance( void ); | ||
26 | |||
27 | virtual const char ** needs( void ); | ||
28 | virtual const char * provides( void ); | ||
29 | |||
30 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); | ||
31 | virtual bool hasDataFor( const QString & S ); | ||
32 | virtual bool generateDataForCommonFile( | ||
33 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); | ||
34 | |||
35 | private: | ||
36 | |||
37 | }; | ||
38 | |||
39 | extern "C" | ||
40 | { | ||
41 | void create_plugin( QList<ANetNode> & PNN ); | ||
42 | }; | ||
43 | |||
44 | #endif | ||
diff --git a/noncore/settings/networksettings2/wlan/wlan_NNI.cpp b/noncore/settings/networksettings2/wlan/wlan_NNI.cpp new file mode 100644 index 0000000..92f3457 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlan_NNI.cpp | |||
@@ -0,0 +1,30 @@ | |||
1 | #include "wlanedit.h" | ||
2 | #include "wlan_NNI.h" | ||
3 | #include "wlan_NN.h" | ||
4 | |||
5 | AWLan::AWLan( WLanNetNode * PNN ) : ANetNodeInstance( PNN ) { | ||
6 | GUI = 0; | ||
7 | RT = 0; | ||
8 | } | ||
9 | |||
10 | void AWLan::setSpecificAttribute( QString & , QString & ) { | ||
11 | } | ||
12 | |||
13 | void AWLan::saveSpecificAttribute( QTextStream & ) { | ||
14 | } | ||
15 | |||
16 | QWidget * AWLan::edit( QWidget * parent ) { | ||
17 | GUI = new WLanEdit( parent ); | ||
18 | GUI->showData( Data ); | ||
19 | return GUI; | ||
20 | } | ||
21 | |||
22 | QString AWLan::acceptable( void ) { | ||
23 | return ( GUI ) ? GUI->acceptable( ) : QString(); | ||
24 | } | ||
25 | |||
26 | void AWLan::commit( void ) { | ||
27 | if( GUI && GUI->commit( Data ) ) | ||
28 | setModified( 1 ); | ||
29 | } | ||
30 | |||
diff --git a/noncore/settings/networksettings2/wlan/wlan_NNI.h b/noncore/settings/networksettings2/wlan/wlan_NNI.h new file mode 100644 index 0000000..8b695b5 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlan_NNI.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef WLAN_H | ||
2 | #define WLAN_H | ||
3 | |||
4 | #include <netnode.h> | ||
5 | #include "wlandata.h" | ||
6 | #include "wlanrun.h" | ||
7 | |||
8 | class WLanNetNode; | ||
9 | class WLanEdit; | ||
10 | |||
11 | class AWLan : public ANetNodeInstance { | ||
12 | |||
13 | public : | ||
14 | |||
15 | AWLan( WLanNetNode * PNN ); | ||
16 | |||
17 | QWidget * edit( QWidget * parent ); | ||
18 | QString acceptable( void ); | ||
19 | void commit( void ); | ||
20 | |||
21 | RuntimeInfo * runtime( void ) | ||
22 | { if( RT == 0 ) | ||
23 | RT = new WLanRun( this, Data ); | ||
24 | return RT; | ||
25 | } | ||
26 | |||
27 | virtual void * data( void ) | ||
28 | { return (void *)&Data; } | ||
29 | |||
30 | protected : | ||
31 | |||
32 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | ||
33 | virtual void saveSpecificAttribute( QTextStream & TS ); | ||
34 | |||
35 | private : | ||
36 | |||
37 | WLanEdit * GUI; | ||
38 | WLanData Data; | ||
39 | WLanRun * RT; | ||
40 | |||
41 | }; | ||
42 | |||
43 | #endif | ||
diff --git a/noncore/settings/networksettings2/wlan/wlandata.h b/noncore/settings/networksettings2/wlan/wlandata.h new file mode 100644 index 0000000..ba1f2c2 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlandata.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef WLAN_DATA_H | ||
2 | #define WLAN_DATA_H | ||
3 | |||
4 | #include <qstring.h> | ||
5 | typedef struct WLanData { | ||
6 | QString Device; | ||
7 | QString LockFile; | ||
8 | long Speed; | ||
9 | short Parity; | ||
10 | short DataBits; | ||
11 | short StopBits; | ||
12 | bool HardwareControl; | ||
13 | bool SoftwareControl; | ||
14 | |||
15 | } WLanData_t; | ||
16 | |||
17 | #endif | ||
diff --git a/noncore/settings/networksettings2/wlan/wlanedit.cpp b/noncore/settings/networksettings2/wlan/wlanedit.cpp new file mode 100644 index 0000000..c884886 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlanedit.cpp | |||
@@ -0,0 +1,16 @@ | |||
1 | #include <GUIUtils.h> | ||
2 | #include "wlanedit.h" | ||
3 | |||
4 | WLanEdit::WLanEdit( QWidget * Parent ) : WLanGUI( Parent ){ | ||
5 | } | ||
6 | |||
7 | QString WLanEdit::acceptable( void ) { | ||
8 | return QString(); | ||
9 | } | ||
10 | |||
11 | void WLanEdit::showData( WLanData_t & Data ) { | ||
12 | } | ||
13 | |||
14 | bool WLanEdit::commit( WLanData_t & Data ) { | ||
15 | return 0; | ||
16 | } | ||
diff --git a/noncore/settings/networksettings2/wlan/wlanedit.h b/noncore/settings/networksettings2/wlan/wlanedit.h new file mode 100644 index 0000000..b7442d5 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlanedit.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #include "wlandata.h" | ||
2 | #include "wlanGUI.h" | ||
3 | |||
4 | class WLanEdit : public WLanGUI { | ||
5 | |||
6 | public : | ||
7 | |||
8 | WLanEdit( QWidget * parent ); | ||
9 | QString acceptable( void ); | ||
10 | void showData( WLanData_t & Data ); | ||
11 | bool commit( WLanData_t & Data ); | ||
12 | }; | ||
diff --git a/noncore/settings/networksettings2/wlan/wlanrun.cpp b/noncore/settings/networksettings2/wlan/wlanrun.cpp new file mode 100644 index 0000000..79f11f7 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlanrun.cpp | |||
@@ -0,0 +1,5 @@ | |||
1 | #include "wlanrun.h" | ||
2 | |||
3 | bool WLanRun::handlesInterface( const QString & S ) { | ||
4 | return Pat.match( S ) >= 0; | ||
5 | } | ||
diff --git a/noncore/settings/networksettings2/wlan/wlanrun.h b/noncore/settings/networksettings2/wlan/wlanrun.h new file mode 100644 index 0000000..4cbb059 --- a/dev/null +++ b/noncore/settings/networksettings2/wlan/wlanrun.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef WLANRUN_H | ||
2 | #define WLANRUN_H | ||
3 | |||
4 | #include <qregexp.h> | ||
5 | #include <asdevice.h> | ||
6 | #include "wlandata.h" | ||
7 | |||
8 | class WLanRun : public AsDevice { | ||
9 | |||
10 | public : | ||
11 | |||
12 | WLanRun( ANetNodeInstance * NNI, WLanData & Data ) : | ||
13 | AsDevice( NNI ), | ||
14 | Pat( "wlan[0-9]" ) | ||
15 | { } | ||
16 | |||
17 | virtual long count( void ) | ||
18 | { return 2; } | ||
19 | virtual QString genNic( long nr ) | ||
20 | { QString S; return S.sprintf( "wlan%ld", nr ); } | ||
21 | virtual AsDevice * device( void ) | ||
22 | { return asDevice(); } | ||
23 | |||
24 | protected : | ||
25 | |||
26 | void detectState( NodeCollection * ) | ||
27 | { } | ||
28 | |||
29 | bool setState( NodeCollection *, Action_t ) | ||
30 | { return 0; } | ||
31 | |||
32 | bool canSetState( State_t, Action_t ) | ||
33 | { return 0; } | ||
34 | |||
35 | bool handlesInterface( const QString & I ); | ||
36 | |||
37 | private : | ||
38 | |||
39 | QRegExp Pat; | ||
40 | }; | ||
41 | |||
42 | #endif | ||