-rw-r--r-- | noncore/net/networksetup/wlan/info.ui | 108 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlan.pro | 4 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 18 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/info.ui | 108 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlan.pro | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 18 |
6 files changed, 74 insertions, 186 deletions
diff --git a/noncore/net/networksetup/wlan/info.ui b/noncore/net/networksetup/wlan/info.ui index 52d3a43..1e3e8b5 100644 --- a/noncore/net/networksetup/wlan/info.ui +++ b/noncore/net/networksetup/wlan/info.ui | |||
@@ -1,68 +1,68 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>WlanInfo</class> | 2 | <class>WlanInfo</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>WlanInfo</cstring> | 7 | <cstring>WlanInfo</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>279</width> | 14 | <width>242</width> |
15 | <height>292</height> | 15 | <height>316</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>WLAN Information</string> | 20 | <string>Interface Information</string> |
21 | </property> | 21 | </property> |
22 | <vbox> | 22 | <vbox> |
23 | <property stdset="1"> | 23 | <property stdset="1"> |
24 | <name>margin</name> | 24 | <name>margin</name> |
25 | <number>0</number> | 25 | <number>0</number> |
26 | </property> | 26 | </property> |
27 | <property stdset="1"> | 27 | <property stdset="1"> |
28 | <name>spacing</name> | 28 | <name>spacing</name> |
29 | <number>0</number> | 29 | <number>0</number> |
30 | </property> | 30 | </property> |
31 | <widget> | 31 | <widget> |
32 | <class>QTabWidget</class> | 32 | <class>QTabWidget</class> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>name</name> | 34 | <name>name</name> |
35 | <cstring>tabWidget</cstring> | 35 | <cstring>tabWidget</cstring> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QWidget</class> | 38 | <class>QWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>Widget2</cstring> | 41 | <cstring>Widget2</cstring> |
42 | </property> | 42 | </property> |
43 | <attribute> | 43 | <attribute> |
44 | <name>title</name> | 44 | <name>title</name> |
45 | <string>802.11b</string> | 45 | <string>802.11b</string> |
46 | </attribute> | 46 | </attribute> |
47 | <grid> | 47 | <grid> |
48 | <property stdset="1"> | 48 | <property stdset="1"> |
49 | <name>margin</name> | 49 | <name>margin</name> |
50 | <number>11</number> | 50 | <number>11</number> |
51 | </property> | 51 | </property> |
52 | <property stdset="1"> | 52 | <property stdset="1"> |
53 | <name>spacing</name> | 53 | <name>spacing</name> |
54 | <number>6</number> | 54 | <number>6</number> |
55 | </property> | 55 | </property> |
56 | <widget row="3" column="0" > | 56 | <widget row="3" column="0" > |
57 | <class>QLabel</class> | 57 | <class>QLabel</class> |
58 | <property stdset="1"> | 58 | <property stdset="1"> |
59 | <name>name</name> | 59 | <name>name</name> |
60 | <cstring>TextLabel4</cstring> | 60 | <cstring>TextLabel4</cstring> |
61 | </property> | 61 | </property> |
62 | <property stdset="1"> | 62 | <property stdset="1"> |
63 | <name>text</name> | 63 | <name>text</name> |
64 | <string>Frequency</string> | 64 | <string>Frequency</string> |
65 | </property> | 65 | </property> |
66 | </widget> | 66 | </widget> |
67 | <widget row="2" column="0" > | 67 | <widget row="2" column="0" > |
68 | <class>QLabel</class> | 68 | <class>QLabel</class> |
@@ -138,226 +138,184 @@ | |||
138 | <enum>Sunken</enum> | 138 | <enum>Sunken</enum> |
139 | </property> | 139 | </property> |
140 | </widget> | 140 | </widget> |
141 | <widget row="1" column="1" > | 141 | <widget row="1" column="1" > |
142 | <class>QLabel</class> | 142 | <class>QLabel</class> |
143 | <property stdset="1"> | 143 | <property stdset="1"> |
144 | <name>name</name> | 144 | <name>name</name> |
145 | <cstring>essidLabel</cstring> | 145 | <cstring>essidLabel</cstring> |
146 | </property> | 146 | </property> |
147 | <property stdset="1"> | 147 | <property stdset="1"> |
148 | <name>frameShape</name> | 148 | <name>frameShape</name> |
149 | <enum>Panel</enum> | 149 | <enum>Panel</enum> |
150 | </property> | 150 | </property> |
151 | <property stdset="1"> | 151 | <property stdset="1"> |
152 | <name>frameShadow</name> | 152 | <name>frameShadow</name> |
153 | <enum>Sunken</enum> | 153 | <enum>Sunken</enum> |
154 | </property> | 154 | </property> |
155 | </widget> | 155 | </widget> |
156 | <widget row="0" column="1" > | 156 | <widget row="0" column="1" > |
157 | <class>QLabel</class> | 157 | <class>QLabel</class> |
158 | <property stdset="1"> | 158 | <property stdset="1"> |
159 | <name>name</name> | 159 | <name>name</name> |
160 | <cstring>stationLabel</cstring> | 160 | <cstring>stationLabel</cstring> |
161 | </property> | 161 | </property> |
162 | <property stdset="1"> | 162 | <property stdset="1"> |
163 | <name>frameShape</name> | 163 | <name>frameShape</name> |
164 | <enum>Panel</enum> | 164 | <enum>Panel</enum> |
165 | </property> | 165 | </property> |
166 | <property stdset="1"> | 166 | <property stdset="1"> |
167 | <name>frameShadow</name> | 167 | <name>frameShadow</name> |
168 | <enum>Sunken</enum> | 168 | <enum>Sunken</enum> |
169 | </property> | 169 | </property> |
170 | </widget> | 170 | </widget> |
171 | <widget row="3" column="1" > | 171 | <widget row="3" column="1" > |
172 | <class>QLabel</class> | 172 | <class>QLabel</class> |
173 | <property stdset="1"> | 173 | <property stdset="1"> |
174 | <name>name</name> | 174 | <name>name</name> |
175 | <cstring>freqLabel</cstring> | 175 | <cstring>freqLabel</cstring> |
176 | </property> | 176 | </property> |
177 | <property stdset="1"> | 177 | <property stdset="1"> |
178 | <name>frameShape</name> | 178 | <name>frameShape</name> |
179 | <enum>Panel</enum> | 179 | <enum>Panel</enum> |
180 | </property> | 180 | </property> |
181 | <property stdset="1"> | 181 | <property stdset="1"> |
182 | <name>frameShadow</name> | 182 | <name>frameShadow</name> |
183 | <enum>Sunken</enum> | 183 | <enum>Sunken</enum> |
184 | </property> | 184 | </property> |
185 | </widget> | 185 | </widget> |
186 | <spacer row="5" column="1" > | 186 | <spacer row="9" column="1" > |
187 | <property> | 187 | <property> |
188 | <name>name</name> | 188 | <name>name</name> |
189 | <cstring>Spacer7</cstring> | 189 | <cstring>Spacer7</cstring> |
190 | </property> | 190 | </property> |
191 | <property stdset="1"> | 191 | <property stdset="1"> |
192 | <name>orientation</name> | 192 | <name>orientation</name> |
193 | <enum>Vertical</enum> | 193 | <enum>Vertical</enum> |
194 | </property> | 194 | </property> |
195 | <property stdset="1"> | 195 | <property stdset="1"> |
196 | <name>sizeType</name> | 196 | <name>sizeType</name> |
197 | <enum>Expanding</enum> | 197 | <enum>Expanding</enum> |
198 | </property> | 198 | </property> |
199 | <property> | 199 | <property> |
200 | <name>sizeHint</name> | 200 | <name>sizeHint</name> |
201 | <size> | 201 | <size> |
202 | <width>20</width> | 202 | <width>20</width> |
203 | <height>20</height> | 203 | <height>20</height> |
204 | </size> | 204 | </size> |
205 | </property> | 205 | </property> |
206 | </spacer> | 206 | </spacer> |
207 | </grid> | 207 | <widget row="5" column="1" > |
208 | </widget> | ||
209 | <widget> | ||
210 | <class>QWidget</class> | ||
211 | <property stdset="1"> | ||
212 | <name>name</name> | ||
213 | <cstring>tab</cstring> | ||
214 | </property> | ||
215 | <attribute> | ||
216 | <name>title</name> | ||
217 | <string>Statistics</string> | ||
218 | </attribute> | ||
219 | <grid> | ||
220 | <property stdset="1"> | ||
221 | <name>margin</name> | ||
222 | <number>11</number> | ||
223 | </property> | ||
224 | <property stdset="1"> | ||
225 | <name>spacing</name> | ||
226 | <number>6</number> | ||
227 | </property> | ||
228 | <spacer row="4" column="1" > | ||
229 | <property> | ||
230 | <name>name</name> | ||
231 | <cstring>Spacer2</cstring> | ||
232 | </property> | ||
233 | <property stdset="1"> | ||
234 | <name>orientation</name> | ||
235 | <enum>Vertical</enum> | ||
236 | </property> | ||
237 | <property stdset="1"> | ||
238 | <name>sizeType</name> | ||
239 | <enum>Expanding</enum> | ||
240 | </property> | ||
241 | <property> | ||
242 | <name>sizeHint</name> | ||
243 | <size> | ||
244 | <width>20</width> | ||
245 | <height>20</height> | ||
246 | </size> | ||
247 | </property> | ||
248 | </spacer> | ||
249 | <widget row="0" column="1" > | ||
250 | <class>QProgressBar</class> | 208 | <class>QProgressBar</class> |
251 | <property stdset="1"> | 209 | <property stdset="1"> |
252 | <name>name</name> | 210 | <name>name</name> |
253 | <cstring>signalProgressBar</cstring> | 211 | <cstring>signalProgressBar</cstring> |
254 | </property> | 212 | </property> |
255 | </widget> | 213 | </widget> |
256 | <widget row="1" column="1" > | 214 | <widget row="6" column="1" > |
257 | <class>QProgressBar</class> | 215 | <class>QProgressBar</class> |
258 | <property stdset="1"> | 216 | <property stdset="1"> |
259 | <name>name</name> | 217 | <name>name</name> |
260 | <cstring>noiseProgressBar</cstring> | 218 | <cstring>noiseProgressBar</cstring> |
261 | </property> | 219 | </property> |
262 | </widget> | 220 | </widget> |
263 | <widget row="2" column="1" > | 221 | <widget row="7" column="1" > |
264 | <class>QProgressBar</class> | 222 | <class>QProgressBar</class> |
265 | <property stdset="1"> | 223 | <property stdset="1"> |
266 | <name>name</name> | 224 | <name>name</name> |
267 | <cstring>qualityProgressBar</cstring> | 225 | <cstring>qualityProgressBar</cstring> |
268 | </property> | 226 | </property> |
269 | </widget> | 227 | </widget> |
270 | <widget row="0" column="0" > | 228 | <widget row="8" column="1" > |
271 | <class>QLabel</class> | 229 | <class>QLabel</class> |
272 | <property stdset="1"> | 230 | <property stdset="1"> |
273 | <name>name</name> | 231 | <name>name</name> |
274 | <cstring>TextLabel1_2</cstring> | 232 | <cstring>rateLabel</cstring> |
275 | </property> | 233 | </property> |
276 | <property stdset="1"> | 234 | <property stdset="1"> |
277 | <name>text</name> | 235 | <name>sizePolicy</name> |
278 | <string>Signal</string> | 236 | <sizepolicy> |
237 | <hsizetype>7</hsizetype> | ||
238 | <vsizetype>1</vsizetype> | ||
239 | </sizepolicy> | ||
240 | </property> | ||
241 | <property stdset="1"> | ||
242 | <name>frameShape</name> | ||
243 | <enum>Panel</enum> | ||
244 | </property> | ||
245 | <property stdset="1"> | ||
246 | <name>frameShadow</name> | ||
247 | <enum>Sunken</enum> | ||
279 | </property> | 248 | </property> |
280 | </widget> | 249 | </widget> |
281 | <widget row="1" column="0" > | 250 | <widget row="8" column="0" > |
282 | <class>QLabel</class> | 251 | <class>QLabel</class> |
283 | <property stdset="1"> | 252 | <property stdset="1"> |
284 | <name>name</name> | 253 | <name>name</name> |
285 | <cstring>TextLabel2_2</cstring> | 254 | <cstring>TextLabel4_2</cstring> |
286 | </property> | 255 | </property> |
287 | <property stdset="1"> | 256 | <property stdset="1"> |
288 | <name>text</name> | 257 | <name>text</name> |
289 | <string>Noise</string> | 258 | <string>Rate</string> |
290 | </property> | 259 | </property> |
291 | </widget> | 260 | </widget> |
292 | <widget row="2" column="0" > | 261 | <widget row="7" column="0" > |
293 | <class>QLabel</class> | 262 | <class>QLabel</class> |
294 | <property stdset="1"> | 263 | <property stdset="1"> |
295 | <name>name</name> | 264 | <name>name</name> |
296 | <cstring>TextLabel3_2</cstring> | 265 | <cstring>TextLabel3_2</cstring> |
297 | </property> | 266 | </property> |
298 | <property stdset="1"> | 267 | <property stdset="1"> |
299 | <name>text</name> | 268 | <name>text</name> |
300 | <string>Quality</string> | 269 | <string>Quality</string> |
301 | </property> | 270 | </property> |
302 | </widget> | 271 | </widget> |
303 | <widget row="3" column="0" > | 272 | <widget row="6" column="0" > |
304 | <class>QLabel</class> | 273 | <class>QLabel</class> |
305 | <property stdset="1"> | 274 | <property stdset="1"> |
306 | <name>name</name> | 275 | <name>name</name> |
307 | <cstring>TextLabel4_2</cstring> | 276 | <cstring>TextLabel2_2</cstring> |
308 | </property> | 277 | </property> |
309 | <property stdset="1"> | 278 | <property stdset="1"> |
310 | <name>text</name> | 279 | <name>text</name> |
311 | <string>Rate</string> | 280 | <string>Noise</string> |
312 | </property> | 281 | </property> |
313 | </widget> | 282 | </widget> |
314 | <widget row="3" column="1" > | 283 | <widget row="5" column="0" > |
315 | <class>QLabel</class> | 284 | <class>QLabel</class> |
316 | <property stdset="1"> | 285 | <property stdset="1"> |
317 | <name>name</name> | 286 | <name>name</name> |
318 | <cstring>rateLabel</cstring> | 287 | <cstring>TextLabel1_2</cstring> |
319 | </property> | ||
320 | <property stdset="1"> | ||
321 | <name>sizePolicy</name> | ||
322 | <sizepolicy> | ||
323 | <hsizetype>7</hsizetype> | ||
324 | <vsizetype>1</vsizetype> | ||
325 | </sizepolicy> | ||
326 | </property> | ||
327 | <property stdset="1"> | ||
328 | <name>frameShape</name> | ||
329 | <enum>Panel</enum> | ||
330 | </property> | 288 | </property> |
331 | <property stdset="1"> | 289 | <property stdset="1"> |
332 | <name>frameShadow</name> | 290 | <name>text</name> |
333 | <enum>Sunken</enum> | 291 | <string>Signal</string> |
334 | </property> | 292 | </property> |
335 | </widget> | 293 | </widget> |
336 | </grid> | 294 | </grid> |
337 | </widget> | 295 | </widget> |
338 | </widget> | 296 | </widget> |
339 | </vbox> | 297 | </vbox> |
340 | </widget> | 298 | </widget> |
341 | <customwidgets> | 299 | <customwidgets> |
342 | <customwidget> | 300 | <customwidget> |
343 | <class>QWidget</class> | 301 | <class>QWidget</class> |
344 | <header location="local">qwidget.h</header> | 302 | <header location="local">qwidget.h</header> |
345 | <sizehint> | 303 | <sizehint> |
346 | <width>100</width> | 304 | <width>100</width> |
347 | <height>100</height> | 305 | <height>100</height> |
348 | </sizehint> | 306 | </sizehint> |
349 | <container>0</container> | 307 | <container>0</container> |
350 | <sizepolicy> | 308 | <sizepolicy> |
351 | <hordata>7</hordata> | 309 | <hordata>7</hordata> |
352 | <verdata>7</verdata> | 310 | <verdata>7</verdata> |
353 | </sizepolicy> | 311 | </sizepolicy> |
354 | <pixmap>image0</pixmap> | 312 | <pixmap>image0</pixmap> |
355 | </customwidget> | 313 | </customwidget> |
356 | </customwidgets> | 314 | </customwidgets> |
357 | <images> | 315 | <images> |
358 | <image> | 316 | <image> |
359 | <name>image0</name> | 317 | <name>image0</name> |
360 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 318 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
361 | </image> | 319 | </image> |
362 | </images> | 320 | </images> |
363 | </UI> | 321 | </UI> |
diff --git a/noncore/net/networksetup/wlan/wlan.pro b/noncore/net/networksetup/wlan/wlan.pro index 432a096..f28feb2 100644 --- a/noncore/net/networksetup/wlan/wlan.pro +++ b/noncore/net/networksetup/wlan/wlan.pro | |||
@@ -1,12 +1,12 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | #CONFIG += qt warn_on debug | 3 | #CONFIG += qt warn_on debug |
4 | DESTDIR = $(OPIEDIR)/plugins/networksetup | 4 | DESTDIR = $(OPIEDIR)/plugins/networksetup |
5 | HEADERS = wlanimp.h wlanmodule.h wextensions.h | 5 | HEADERS = wlanimp.h infoimp.h wlanmodule.h wextensions.h |
6 | SOURCES = wlanimp.cpp wlanmodule.cpp wextensions.cpp | 6 | SOURCES = wlanimp.cpp infoimp.cpp wlanmodule.cpp wextensions.cpp |
7 | INCLUDEPATH+= $(OPIEDIR)/include ../ | 7 | INCLUDEPATH+= $(OPIEDIR)/include ../ |
8 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | INTERFACES= wlan.ui info.ui | 10 | INTERFACES= wlan.ui info.ui |
11 | TARGET = wlanplugin | 11 | TARGET = wlanplugin |
12 | VERSION = 1.0.0 | 12 | VERSION = 1.0.0 |
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index bf2589e..3993ca0 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp | |||
@@ -1,125 +1,111 @@ | |||
1 | #include "wlanmodule.h" | 1 | #include "wlanmodule.h" |
2 | #include "wlanimp.h" | 2 | #include "wlanimp.h" |
3 | #include "info.h" | 3 | #include "infoimp.h" |
4 | #include "wextensions.h" | 4 | #include "wextensions.h" |
5 | 5 | ||
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qprogressbar.h> | 7 | #include <qprogressbar.h> |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Constructor, find all of the possible interfaces | 10 | * Constructor, find all of the possible interfaces |
11 | */ | 11 | */ |
12 | WLANModule::WLANModule() : Module() { | 12 | WLANModule::WLANModule() : Module() { |
13 | } | 13 | } |
14 | 14 | ||
15 | /** | 15 | /** |
16 | */ | 16 | */ |
17 | WLANModule::~WLANModule(){ | 17 | WLANModule::~WLANModule(){ |
18 | Interface *i; | 18 | Interface *i; |
19 | for ( i=list.first(); i != 0; i=list.next() ) | 19 | for ( i=list.first(); i != 0; i=list.next() ) |
20 | delete i; | 20 | delete i; |
21 | } | 21 | } |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * Change the current profile | 24 | * Change the current profile |
25 | */ | 25 | */ |
26 | void WLANModule::setProfile(QString newProfile){ | 26 | void WLANModule::setProfile(QString newProfile){ |
27 | profile = newProfile; | 27 | profile = newProfile; |
28 | } | 28 | } |
29 | 29 | ||
30 | /** | 30 | /** |
31 | * get the icon name for this device. | 31 | * get the icon name for this device. |
32 | * @param Interface* can be used in determining the icon. | 32 | * @param Interface* can be used in determining the icon. |
33 | * @return QString the icon name (minus .png, .gif etc) | 33 | * @return QString the icon name (minus .png, .gif etc) |
34 | */ | 34 | */ |
35 | QString WLANModule::getPixmapName(Interface* ){ | 35 | QString WLANModule::getPixmapName(Interface* ){ |
36 | return "wlan"; | 36 | return "wlan"; |
37 | } | 37 | } |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * Check to see if the interface i is owned by this module. | 40 | * Check to see if the interface i is owned by this module. |
41 | * @param Interface* interface to check against | 41 | * @param Interface* interface to check against |
42 | * @return bool true if i is owned by this module, false otherwise. | 42 | * @return bool true if i is owned by this module, false otherwise. |
43 | */ | 43 | */ |
44 | bool WLANModule::isOwner(Interface *i){ | 44 | bool WLANModule::isOwner(Interface *i){ |
45 | WExtensions we(i->getInterfaceName()); | 45 | WExtensions we(i->getInterfaceName()); |
46 | if(!we.doesHaveWirelessExtensions()) | 46 | if(!we.doesHaveWirelessExtensions()) |
47 | return false; | 47 | return false; |
48 | 48 | ||
49 | i->setHardwareName("802.11b"); | 49 | i->setHardwareName("802.11b"); |
50 | list.append(i); | 50 | list.append(i); |
51 | return true; | 51 | return true; |
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Create, set tabWiget and return the WLANConfigure Module | 55 | * Create, set tabWiget and return the WLANConfigure Module |
56 | * @param tabWidget a pointer to the tab widget that this configure has. | 56 | * @param tabWidget a pointer to the tab widget that this configure has. |
57 | * @return QWidget* pointer to the tab widget in this modules configure. | 57 | * @return QWidget* pointer to the tab widget in this modules configure. |
58 | */ | 58 | */ |
59 | QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ | 59 | QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ |
60 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); | 60 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); |
61 | (*tabWidget) = wlanconfig->tabWidget; | 61 | (*tabWidget) = wlanconfig->tabWidget; |
62 | return wlanconfig; | 62 | return wlanconfig; |
63 | } | 63 | } |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Create, set tabWiget and return the Information Module | 66 | * Create, set tabWiget and return the Information Module |
67 | * @param tabWidget a pointer to the tab widget that this information has. | 67 | * @param tabWidget a pointer to the tab widget that this information has. |
68 | * @return QWidget* pointer to the tab widget in this modules info. | 68 | * @return QWidget* pointer to the tab widget in this modules info. |
69 | */ | 69 | */ |
70 | QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ | 70 | QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ |
71 | WExtensions we(i->getInterfaceName()); | 71 | WExtensions we(i->getInterfaceName()); |
72 | if(!we.doesHaveWirelessExtensions()) | 72 | if(!we.doesHaveWirelessExtensions()) |
73 | return NULL; | 73 | return NULL; |
74 | 74 | ||
75 | WlanInfo *info = new WlanInfo(0, "wireless info", Qt::WDestructiveClose); | 75 | WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); |
76 | (*tabWidget) = info->tabWidget; | 76 | (*tabWidget) = info->tabWidget; |
77 | |||
78 | info->essidLabel->setText(we.essid()); | ||
79 | info->apLabel->setText(we.ap()); | ||
80 | info->stationLabel->setText(we.station()); | ||
81 | info->modeLabel->setText(we.mode()); | ||
82 | info->freqLabel->setText(QString("%1 GHz").arg(we.frequency())); | ||
83 | int signal = 0; | ||
84 | int noise = 0; | ||
85 | int quality = 0; | ||
86 | we.stats(signal, noise, quality); | ||
87 | info->signalProgressBar->setProgress(signal); | ||
88 | info->noiseProgressBar->setProgress(noise); | ||
89 | info->qualityProgressBar->setProgress(quality); | ||
90 | info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); | ||
91 | return info; | 77 | return info; |
92 | } | 78 | } |
93 | 79 | ||
94 | /** | 80 | /** |
95 | * Get all active (up or down) interfaces | 81 | * Get all active (up or down) interfaces |
96 | * @return QList<Interface> A list of interfaces that exsist that havn't | 82 | * @return QList<Interface> A list of interfaces that exsist that havn't |
97 | * been called by isOwner() | 83 | * been called by isOwner() |
98 | */ | 84 | */ |
99 | QList<Interface> WLANModule::getInterfaces(){ | 85 | QList<Interface> WLANModule::getInterfaces(){ |
100 | return list; | 86 | return list; |
101 | } | 87 | } |
102 | 88 | ||
103 | /** | 89 | /** |
104 | * Attempt to add a new interface as defined by name | 90 | * Attempt to add a new interface as defined by name |
105 | * @param name the name of the type of interface that should be created given | 91 | * @param name the name of the type of interface that should be created given |
106 | * by possibleNewInterfaces(); | 92 | * by possibleNewInterfaces(); |
107 | * @return Interface* NULL if it was unable to be created. | 93 | * @return Interface* NULL if it was unable to be created. |
108 | */ | 94 | */ |
109 | Interface *WLANModule::addNewInterface(QString ){ | 95 | Interface *WLANModule::addNewInterface(QString ){ |
110 | // We can't add a 802.11 interface, either the hardware will be there | 96 | // We can't add a 802.11 interface, either the hardware will be there |
111 | // or it wont. | 97 | // or it wont. |
112 | return NULL; | 98 | return NULL; |
113 | } | 99 | } |
114 | 100 | ||
115 | /** | 101 | /** |
116 | * Attempts to remove the interface, doesn't delete i | 102 | * Attempts to remove the interface, doesn't delete i |
117 | * @return bool true if successfull, false otherwise. | 103 | * @return bool true if successfull, false otherwise. |
118 | */ | 104 | */ |
119 | bool WLANModule::remove(Interface*){ | 105 | bool WLANModule::remove(Interface*){ |
120 | // Can't remove a hardware device, you can stop it though. | 106 | // Can't remove a hardware device, you can stop it though. |
121 | return false; | 107 | return false; |
122 | } | 108 | } |
123 | 109 | ||
124 | // wlanmodule.cpp | 110 | // wlanmodule.cpp |
125 | 111 | ||
diff --git a/noncore/settings/networksettings/wlan/info.ui b/noncore/settings/networksettings/wlan/info.ui index 52d3a43..1e3e8b5 100644 --- a/noncore/settings/networksettings/wlan/info.ui +++ b/noncore/settings/networksettings/wlan/info.ui | |||
@@ -1,68 +1,68 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>WlanInfo</class> | 2 | <class>WlanInfo</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>WlanInfo</cstring> | 7 | <cstring>WlanInfo</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>279</width> | 14 | <width>242</width> |
15 | <height>292</height> | 15 | <height>316</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>WLAN Information</string> | 20 | <string>Interface Information</string> |
21 | </property> | 21 | </property> |
22 | <vbox> | 22 | <vbox> |
23 | <property stdset="1"> | 23 | <property stdset="1"> |
24 | <name>margin</name> | 24 | <name>margin</name> |
25 | <number>0</number> | 25 | <number>0</number> |
26 | </property> | 26 | </property> |
27 | <property stdset="1"> | 27 | <property stdset="1"> |
28 | <name>spacing</name> | 28 | <name>spacing</name> |
29 | <number>0</number> | 29 | <number>0</number> |
30 | </property> | 30 | </property> |
31 | <widget> | 31 | <widget> |
32 | <class>QTabWidget</class> | 32 | <class>QTabWidget</class> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>name</name> | 34 | <name>name</name> |
35 | <cstring>tabWidget</cstring> | 35 | <cstring>tabWidget</cstring> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QWidget</class> | 38 | <class>QWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>Widget2</cstring> | 41 | <cstring>Widget2</cstring> |
42 | </property> | 42 | </property> |
43 | <attribute> | 43 | <attribute> |
44 | <name>title</name> | 44 | <name>title</name> |
45 | <string>802.11b</string> | 45 | <string>802.11b</string> |
46 | </attribute> | 46 | </attribute> |
47 | <grid> | 47 | <grid> |
48 | <property stdset="1"> | 48 | <property stdset="1"> |
49 | <name>margin</name> | 49 | <name>margin</name> |
50 | <number>11</number> | 50 | <number>11</number> |
51 | </property> | 51 | </property> |
52 | <property stdset="1"> | 52 | <property stdset="1"> |
53 | <name>spacing</name> | 53 | <name>spacing</name> |
54 | <number>6</number> | 54 | <number>6</number> |
55 | </property> | 55 | </property> |
56 | <widget row="3" column="0" > | 56 | <widget row="3" column="0" > |
57 | <class>QLabel</class> | 57 | <class>QLabel</class> |
58 | <property stdset="1"> | 58 | <property stdset="1"> |
59 | <name>name</name> | 59 | <name>name</name> |
60 | <cstring>TextLabel4</cstring> | 60 | <cstring>TextLabel4</cstring> |
61 | </property> | 61 | </property> |
62 | <property stdset="1"> | 62 | <property stdset="1"> |
63 | <name>text</name> | 63 | <name>text</name> |
64 | <string>Frequency</string> | 64 | <string>Frequency</string> |
65 | </property> | 65 | </property> |
66 | </widget> | 66 | </widget> |
67 | <widget row="2" column="0" > | 67 | <widget row="2" column="0" > |
68 | <class>QLabel</class> | 68 | <class>QLabel</class> |
@@ -138,226 +138,184 @@ | |||
138 | <enum>Sunken</enum> | 138 | <enum>Sunken</enum> |
139 | </property> | 139 | </property> |
140 | </widget> | 140 | </widget> |
141 | <widget row="1" column="1" > | 141 | <widget row="1" column="1" > |
142 | <class>QLabel</class> | 142 | <class>QLabel</class> |
143 | <property stdset="1"> | 143 | <property stdset="1"> |
144 | <name>name</name> | 144 | <name>name</name> |
145 | <cstring>essidLabel</cstring> | 145 | <cstring>essidLabel</cstring> |
146 | </property> | 146 | </property> |
147 | <property stdset="1"> | 147 | <property stdset="1"> |
148 | <name>frameShape</name> | 148 | <name>frameShape</name> |
149 | <enum>Panel</enum> | 149 | <enum>Panel</enum> |
150 | </property> | 150 | </property> |
151 | <property stdset="1"> | 151 | <property stdset="1"> |
152 | <name>frameShadow</name> | 152 | <name>frameShadow</name> |
153 | <enum>Sunken</enum> | 153 | <enum>Sunken</enum> |
154 | </property> | 154 | </property> |
155 | </widget> | 155 | </widget> |
156 | <widget row="0" column="1" > | 156 | <widget row="0" column="1" > |
157 | <class>QLabel</class> | 157 | <class>QLabel</class> |
158 | <property stdset="1"> | 158 | <property stdset="1"> |
159 | <name>name</name> | 159 | <name>name</name> |
160 | <cstring>stationLabel</cstring> | 160 | <cstring>stationLabel</cstring> |
161 | </property> | 161 | </property> |
162 | <property stdset="1"> | 162 | <property stdset="1"> |
163 | <name>frameShape</name> | 163 | <name>frameShape</name> |
164 | <enum>Panel</enum> | 164 | <enum>Panel</enum> |
165 | </property> | 165 | </property> |
166 | <property stdset="1"> | 166 | <property stdset="1"> |
167 | <name>frameShadow</name> | 167 | <name>frameShadow</name> |
168 | <enum>Sunken</enum> | 168 | <enum>Sunken</enum> |
169 | </property> | 169 | </property> |
170 | </widget> | 170 | </widget> |
171 | <widget row="3" column="1" > | 171 | <widget row="3" column="1" > |
172 | <class>QLabel</class> | 172 | <class>QLabel</class> |
173 | <property stdset="1"> | 173 | <property stdset="1"> |
174 | <name>name</name> | 174 | <name>name</name> |
175 | <cstring>freqLabel</cstring> | 175 | <cstring>freqLabel</cstring> |
176 | </property> | 176 | </property> |
177 | <property stdset="1"> | 177 | <property stdset="1"> |
178 | <name>frameShape</name> | 178 | <name>frameShape</name> |
179 | <enum>Panel</enum> | 179 | <enum>Panel</enum> |
180 | </property> | 180 | </property> |
181 | <property stdset="1"> | 181 | <property stdset="1"> |
182 | <name>frameShadow</name> | 182 | <name>frameShadow</name> |
183 | <enum>Sunken</enum> | 183 | <enum>Sunken</enum> |
184 | </property> | 184 | </property> |
185 | </widget> | 185 | </widget> |
186 | <spacer row="5" column="1" > | 186 | <spacer row="9" column="1" > |
187 | <property> | 187 | <property> |
188 | <name>name</name> | 188 | <name>name</name> |
189 | <cstring>Spacer7</cstring> | 189 | <cstring>Spacer7</cstring> |
190 | </property> | 190 | </property> |
191 | <property stdset="1"> | 191 | <property stdset="1"> |
192 | <name>orientation</name> | 192 | <name>orientation</name> |
193 | <enum>Vertical</enum> | 193 | <enum>Vertical</enum> |
194 | </property> | 194 | </property> |
195 | <property stdset="1"> | 195 | <property stdset="1"> |
196 | <name>sizeType</name> | 196 | <name>sizeType</name> |
197 | <enum>Expanding</enum> | 197 | <enum>Expanding</enum> |
198 | </property> | 198 | </property> |
199 | <property> | 199 | <property> |
200 | <name>sizeHint</name> | 200 | <name>sizeHint</name> |
201 | <size> | 201 | <size> |
202 | <width>20</width> | 202 | <width>20</width> |
203 | <height>20</height> | 203 | <height>20</height> |
204 | </size> | 204 | </size> |
205 | </property> | 205 | </property> |
206 | </spacer> | 206 | </spacer> |
207 | </grid> | 207 | <widget row="5" column="1" > |
208 | </widget> | ||
209 | <widget> | ||
210 | <class>QWidget</class> | ||
211 | <property stdset="1"> | ||
212 | <name>name</name> | ||
213 | <cstring>tab</cstring> | ||
214 | </property> | ||
215 | <attribute> | ||
216 | <name>title</name> | ||
217 | <string>Statistics</string> | ||
218 | </attribute> | ||
219 | <grid> | ||
220 | <property stdset="1"> | ||
221 | <name>margin</name> | ||
222 | <number>11</number> | ||
223 | </property> | ||
224 | <property stdset="1"> | ||
225 | <name>spacing</name> | ||
226 | <number>6</number> | ||
227 | </property> | ||
228 | <spacer row="4" column="1" > | ||
229 | <property> | ||
230 | <name>name</name> | ||
231 | <cstring>Spacer2</cstring> | ||
232 | </property> | ||
233 | <property stdset="1"> | ||
234 | <name>orientation</name> | ||
235 | <enum>Vertical</enum> | ||
236 | </property> | ||
237 | <property stdset="1"> | ||
238 | <name>sizeType</name> | ||
239 | <enum>Expanding</enum> | ||
240 | </property> | ||
241 | <property> | ||
242 | <name>sizeHint</name> | ||
243 | <size> | ||
244 | <width>20</width> | ||
245 | <height>20</height> | ||
246 | </size> | ||
247 | </property> | ||
248 | </spacer> | ||
249 | <widget row="0" column="1" > | ||
250 | <class>QProgressBar</class> | 208 | <class>QProgressBar</class> |
251 | <property stdset="1"> | 209 | <property stdset="1"> |
252 | <name>name</name> | 210 | <name>name</name> |
253 | <cstring>signalProgressBar</cstring> | 211 | <cstring>signalProgressBar</cstring> |
254 | </property> | 212 | </property> |
255 | </widget> | 213 | </widget> |
256 | <widget row="1" column="1" > | 214 | <widget row="6" column="1" > |
257 | <class>QProgressBar</class> | 215 | <class>QProgressBar</class> |
258 | <property stdset="1"> | 216 | <property stdset="1"> |
259 | <name>name</name> | 217 | <name>name</name> |
260 | <cstring>noiseProgressBar</cstring> | 218 | <cstring>noiseProgressBar</cstring> |
261 | </property> | 219 | </property> |
262 | </widget> | 220 | </widget> |
263 | <widget row="2" column="1" > | 221 | <widget row="7" column="1" > |
264 | <class>QProgressBar</class> | 222 | <class>QProgressBar</class> |
265 | <property stdset="1"> | 223 | <property stdset="1"> |
266 | <name>name</name> | 224 | <name>name</name> |
267 | <cstring>qualityProgressBar</cstring> | 225 | <cstring>qualityProgressBar</cstring> |
268 | </property> | 226 | </property> |
269 | </widget> | 227 | </widget> |
270 | <widget row="0" column="0" > | 228 | <widget row="8" column="1" > |
271 | <class>QLabel</class> | 229 | <class>QLabel</class> |
272 | <property stdset="1"> | 230 | <property stdset="1"> |
273 | <name>name</name> | 231 | <name>name</name> |
274 | <cstring>TextLabel1_2</cstring> | 232 | <cstring>rateLabel</cstring> |
275 | </property> | 233 | </property> |
276 | <property stdset="1"> | 234 | <property stdset="1"> |
277 | <name>text</name> | 235 | <name>sizePolicy</name> |
278 | <string>Signal</string> | 236 | <sizepolicy> |
237 | <hsizetype>7</hsizetype> | ||
238 | <vsizetype>1</vsizetype> | ||
239 | </sizepolicy> | ||
240 | </property> | ||
241 | <property stdset="1"> | ||
242 | <name>frameShape</name> | ||
243 | <enum>Panel</enum> | ||
244 | </property> | ||
245 | <property stdset="1"> | ||
246 | <name>frameShadow</name> | ||
247 | <enum>Sunken</enum> | ||
279 | </property> | 248 | </property> |
280 | </widget> | 249 | </widget> |
281 | <widget row="1" column="0" > | 250 | <widget row="8" column="0" > |
282 | <class>QLabel</class> | 251 | <class>QLabel</class> |
283 | <property stdset="1"> | 252 | <property stdset="1"> |
284 | <name>name</name> | 253 | <name>name</name> |
285 | <cstring>TextLabel2_2</cstring> | 254 | <cstring>TextLabel4_2</cstring> |
286 | </property> | 255 | </property> |
287 | <property stdset="1"> | 256 | <property stdset="1"> |
288 | <name>text</name> | 257 | <name>text</name> |
289 | <string>Noise</string> | 258 | <string>Rate</string> |
290 | </property> | 259 | </property> |
291 | </widget> | 260 | </widget> |
292 | <widget row="2" column="0" > | 261 | <widget row="7" column="0" > |
293 | <class>QLabel</class> | 262 | <class>QLabel</class> |
294 | <property stdset="1"> | 263 | <property stdset="1"> |
295 | <name>name</name> | 264 | <name>name</name> |
296 | <cstring>TextLabel3_2</cstring> | 265 | <cstring>TextLabel3_2</cstring> |
297 | </property> | 266 | </property> |
298 | <property stdset="1"> | 267 | <property stdset="1"> |
299 | <name>text</name> | 268 | <name>text</name> |
300 | <string>Quality</string> | 269 | <string>Quality</string> |
301 | </property> | 270 | </property> |
302 | </widget> | 271 | </widget> |
303 | <widget row="3" column="0" > | 272 | <widget row="6" column="0" > |
304 | <class>QLabel</class> | 273 | <class>QLabel</class> |
305 | <property stdset="1"> | 274 | <property stdset="1"> |
306 | <name>name</name> | 275 | <name>name</name> |
307 | <cstring>TextLabel4_2</cstring> | 276 | <cstring>TextLabel2_2</cstring> |
308 | </property> | 277 | </property> |
309 | <property stdset="1"> | 278 | <property stdset="1"> |
310 | <name>text</name> | 279 | <name>text</name> |
311 | <string>Rate</string> | 280 | <string>Noise</string> |
312 | </property> | 281 | </property> |
313 | </widget> | 282 | </widget> |
314 | <widget row="3" column="1" > | 283 | <widget row="5" column="0" > |
315 | <class>QLabel</class> | 284 | <class>QLabel</class> |
316 | <property stdset="1"> | 285 | <property stdset="1"> |
317 | <name>name</name> | 286 | <name>name</name> |
318 | <cstring>rateLabel</cstring> | 287 | <cstring>TextLabel1_2</cstring> |
319 | </property> | ||
320 | <property stdset="1"> | ||
321 | <name>sizePolicy</name> | ||
322 | <sizepolicy> | ||
323 | <hsizetype>7</hsizetype> | ||
324 | <vsizetype>1</vsizetype> | ||
325 | </sizepolicy> | ||
326 | </property> | ||
327 | <property stdset="1"> | ||
328 | <name>frameShape</name> | ||
329 | <enum>Panel</enum> | ||
330 | </property> | 288 | </property> |
331 | <property stdset="1"> | 289 | <property stdset="1"> |
332 | <name>frameShadow</name> | 290 | <name>text</name> |
333 | <enum>Sunken</enum> | 291 | <string>Signal</string> |
334 | </property> | 292 | </property> |
335 | </widget> | 293 | </widget> |
336 | </grid> | 294 | </grid> |
337 | </widget> | 295 | </widget> |
338 | </widget> | 296 | </widget> |
339 | </vbox> | 297 | </vbox> |
340 | </widget> | 298 | </widget> |
341 | <customwidgets> | 299 | <customwidgets> |
342 | <customwidget> | 300 | <customwidget> |
343 | <class>QWidget</class> | 301 | <class>QWidget</class> |
344 | <header location="local">qwidget.h</header> | 302 | <header location="local">qwidget.h</header> |
345 | <sizehint> | 303 | <sizehint> |
346 | <width>100</width> | 304 | <width>100</width> |
347 | <height>100</height> | 305 | <height>100</height> |
348 | </sizehint> | 306 | </sizehint> |
349 | <container>0</container> | 307 | <container>0</container> |
350 | <sizepolicy> | 308 | <sizepolicy> |
351 | <hordata>7</hordata> | 309 | <hordata>7</hordata> |
352 | <verdata>7</verdata> | 310 | <verdata>7</verdata> |
353 | </sizepolicy> | 311 | </sizepolicy> |
354 | <pixmap>image0</pixmap> | 312 | <pixmap>image0</pixmap> |
355 | </customwidget> | 313 | </customwidget> |
356 | </customwidgets> | 314 | </customwidgets> |
357 | <images> | 315 | <images> |
358 | <image> | 316 | <image> |
359 | <name>image0</name> | 317 | <name>image0</name> |
360 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 318 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
361 | </image> | 319 | </image> |
362 | </images> | 320 | </images> |
363 | </UI> | 321 | </UI> |
diff --git a/noncore/settings/networksettings/wlan/wlan.pro b/noncore/settings/networksettings/wlan/wlan.pro index 432a096..f28feb2 100644 --- a/noncore/settings/networksettings/wlan/wlan.pro +++ b/noncore/settings/networksettings/wlan/wlan.pro | |||
@@ -1,12 +1,12 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | #CONFIG += qt warn_on debug | 3 | #CONFIG += qt warn_on debug |
4 | DESTDIR = $(OPIEDIR)/plugins/networksetup | 4 | DESTDIR = $(OPIEDIR)/plugins/networksetup |
5 | HEADERS = wlanimp.h wlanmodule.h wextensions.h | 5 | HEADERS = wlanimp.h infoimp.h wlanmodule.h wextensions.h |
6 | SOURCES = wlanimp.cpp wlanmodule.cpp wextensions.cpp | 6 | SOURCES = wlanimp.cpp infoimp.cpp wlanmodule.cpp wextensions.cpp |
7 | INCLUDEPATH+= $(OPIEDIR)/include ../ | 7 | INCLUDEPATH+= $(OPIEDIR)/include ../ |
8 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | INTERFACES= wlan.ui info.ui | 10 | INTERFACES= wlan.ui info.ui |
11 | TARGET = wlanplugin | 11 | TARGET = wlanplugin |
12 | VERSION = 1.0.0 | 12 | VERSION = 1.0.0 |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index bf2589e..3993ca0 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -1,125 +1,111 @@ | |||
1 | #include "wlanmodule.h" | 1 | #include "wlanmodule.h" |
2 | #include "wlanimp.h" | 2 | #include "wlanimp.h" |
3 | #include "info.h" | 3 | #include "infoimp.h" |
4 | #include "wextensions.h" | 4 | #include "wextensions.h" |
5 | 5 | ||
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qprogressbar.h> | 7 | #include <qprogressbar.h> |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Constructor, find all of the possible interfaces | 10 | * Constructor, find all of the possible interfaces |
11 | */ | 11 | */ |
12 | WLANModule::WLANModule() : Module() { | 12 | WLANModule::WLANModule() : Module() { |
13 | } | 13 | } |
14 | 14 | ||
15 | /** | 15 | /** |
16 | */ | 16 | */ |
17 | WLANModule::~WLANModule(){ | 17 | WLANModule::~WLANModule(){ |
18 | Interface *i; | 18 | Interface *i; |
19 | for ( i=list.first(); i != 0; i=list.next() ) | 19 | for ( i=list.first(); i != 0; i=list.next() ) |
20 | delete i; | 20 | delete i; |
21 | } | 21 | } |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * Change the current profile | 24 | * Change the current profile |
25 | */ | 25 | */ |
26 | void WLANModule::setProfile(QString newProfile){ | 26 | void WLANModule::setProfile(QString newProfile){ |
27 | profile = newProfile; | 27 | profile = newProfile; |
28 | } | 28 | } |
29 | 29 | ||
30 | /** | 30 | /** |
31 | * get the icon name for this device. | 31 | * get the icon name for this device. |
32 | * @param Interface* can be used in determining the icon. | 32 | * @param Interface* can be used in determining the icon. |
33 | * @return QString the icon name (minus .png, .gif etc) | 33 | * @return QString the icon name (minus .png, .gif etc) |
34 | */ | 34 | */ |
35 | QString WLANModule::getPixmapName(Interface* ){ | 35 | QString WLANModule::getPixmapName(Interface* ){ |
36 | return "wlan"; | 36 | return "wlan"; |
37 | } | 37 | } |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * Check to see if the interface i is owned by this module. | 40 | * Check to see if the interface i is owned by this module. |
41 | * @param Interface* interface to check against | 41 | * @param Interface* interface to check against |
42 | * @return bool true if i is owned by this module, false otherwise. | 42 | * @return bool true if i is owned by this module, false otherwise. |
43 | */ | 43 | */ |
44 | bool WLANModule::isOwner(Interface *i){ | 44 | bool WLANModule::isOwner(Interface *i){ |
45 | WExtensions we(i->getInterfaceName()); | 45 | WExtensions we(i->getInterfaceName()); |
46 | if(!we.doesHaveWirelessExtensions()) | 46 | if(!we.doesHaveWirelessExtensions()) |
47 | return false; | 47 | return false; |
48 | 48 | ||
49 | i->setHardwareName("802.11b"); | 49 | i->setHardwareName("802.11b"); |
50 | list.append(i); | 50 | list.append(i); |
51 | return true; | 51 | return true; |
52 | } | 52 | } |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Create, set tabWiget and return the WLANConfigure Module | 55 | * Create, set tabWiget and return the WLANConfigure Module |
56 | * @param tabWidget a pointer to the tab widget that this configure has. | 56 | * @param tabWidget a pointer to the tab widget that this configure has. |
57 | * @return QWidget* pointer to the tab widget in this modules configure. | 57 | * @return QWidget* pointer to the tab widget in this modules configure. |
58 | */ | 58 | */ |
59 | QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ | 59 | QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ |
60 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); | 60 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); |
61 | (*tabWidget) = wlanconfig->tabWidget; | 61 | (*tabWidget) = wlanconfig->tabWidget; |
62 | return wlanconfig; | 62 | return wlanconfig; |
63 | } | 63 | } |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Create, set tabWiget and return the Information Module | 66 | * Create, set tabWiget and return the Information Module |
67 | * @param tabWidget a pointer to the tab widget that this information has. | 67 | * @param tabWidget a pointer to the tab widget that this information has. |
68 | * @return QWidget* pointer to the tab widget in this modules info. | 68 | * @return QWidget* pointer to the tab widget in this modules info. |
69 | */ | 69 | */ |
70 | QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ | 70 | QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ |
71 | WExtensions we(i->getInterfaceName()); | 71 | WExtensions we(i->getInterfaceName()); |
72 | if(!we.doesHaveWirelessExtensions()) | 72 | if(!we.doesHaveWirelessExtensions()) |
73 | return NULL; | 73 | return NULL; |
74 | 74 | ||
75 | WlanInfo *info = new WlanInfo(0, "wireless info", Qt::WDestructiveClose); | 75 | WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); |
76 | (*tabWidget) = info->tabWidget; | 76 | (*tabWidget) = info->tabWidget; |
77 | |||
78 | info->essidLabel->setText(we.essid()); | ||
79 | info->apLabel->setText(we.ap()); | ||
80 | info->stationLabel->setText(we.station()); | ||
81 | info->modeLabel->setText(we.mode()); | ||
82 | info->freqLabel->setText(QString("%1 GHz").arg(we.frequency())); | ||
83 | int signal = 0; | ||
84 | int noise = 0; | ||
85 | int quality = 0; | ||
86 | we.stats(signal, noise, quality); | ||
87 | info->signalProgressBar->setProgress(signal); | ||
88 | info->noiseProgressBar->setProgress(noise); | ||
89 | info->qualityProgressBar->setProgress(quality); | ||
90 | info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); | ||
91 | return info; | 77 | return info; |
92 | } | 78 | } |
93 | 79 | ||
94 | /** | 80 | /** |
95 | * Get all active (up or down) interfaces | 81 | * Get all active (up or down) interfaces |
96 | * @return QList<Interface> A list of interfaces that exsist that havn't | 82 | * @return QList<Interface> A list of interfaces that exsist that havn't |
97 | * been called by isOwner() | 83 | * been called by isOwner() |
98 | */ | 84 | */ |
99 | QList<Interface> WLANModule::getInterfaces(){ | 85 | QList<Interface> WLANModule::getInterfaces(){ |
100 | return list; | 86 | return list; |
101 | } | 87 | } |
102 | 88 | ||
103 | /** | 89 | /** |
104 | * Attempt to add a new interface as defined by name | 90 | * Attempt to add a new interface as defined by name |
105 | * @param name the name of the type of interface that should be created given | 91 | * @param name the name of the type of interface that should be created given |
106 | * by possibleNewInterfaces(); | 92 | * by possibleNewInterfaces(); |
107 | * @return Interface* NULL if it was unable to be created. | 93 | * @return Interface* NULL if it was unable to be created. |
108 | */ | 94 | */ |
109 | Interface *WLANModule::addNewInterface(QString ){ | 95 | Interface *WLANModule::addNewInterface(QString ){ |
110 | // We can't add a 802.11 interface, either the hardware will be there | 96 | // We can't add a 802.11 interface, either the hardware will be there |
111 | // or it wont. | 97 | // or it wont. |
112 | return NULL; | 98 | return NULL; |
113 | } | 99 | } |
114 | 100 | ||
115 | /** | 101 | /** |
116 | * Attempts to remove the interface, doesn't delete i | 102 | * Attempts to remove the interface, doesn't delete i |
117 | * @return bool true if successfull, false otherwise. | 103 | * @return bool true if successfull, false otherwise. |
118 | */ | 104 | */ |
119 | bool WLANModule::remove(Interface*){ | 105 | bool WLANModule::remove(Interface*){ |
120 | // Can't remove a hardware device, you can stop it though. | 106 | // Can't remove a hardware device, you can stop it though. |
121 | return false; | 107 | return false; |
122 | } | 108 | } |
123 | 109 | ||
124 | // wlanmodule.cpp | 110 | // wlanmodule.cpp |
125 | 111 | ||