author | benmeyer <benmeyer> | 2002-10-25 15:41:48 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-25 15:41:48 (UTC) |
commit | d0d87d596d64cc1d5ef6322896c68883e4dfb5d0 (patch) (unidiff) | |
tree | 44fb7b0871c1d069cc470d0f38a05af187a98819 | |
parent | 9086a63d5c27531c2014bade180b1cfd01663e2b (diff) | |
download | opie-d0d87d596d64cc1d5ef6322896c68883e4dfb5d0.zip opie-d0d87d596d64cc1d5ef6322896c68883e4dfb5d0.tar.gz opie-d0d87d596d64cc1d5ef6322896c68883e4dfb5d0.tar.bz2 |
Automaticly update the wlaninfo
-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 | |||
@@ -6,23 +6,23 @@ | |||
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> |
@@ -178,17 +178,17 @@ | |||
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> |
@@ -199,143 +199,101 @@ | |||
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> |
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,11 +1,11 @@ | |||
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 | */ |
@@ -67,32 +67,18 @@ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ | |||
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 | */ |
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 | |||
@@ -6,23 +6,23 @@ | |||
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> |
@@ -178,17 +178,17 @@ | |||
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> |
@@ -199,143 +199,101 @@ | |||
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> |
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,11 +1,11 @@ | |||
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 | */ |
@@ -67,32 +67,18 @@ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ | |||
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 | */ |