author | simon <simon> | 2003-01-03 21:24:40 (UTC) |
---|---|---|
committer | simon <simon> | 2003-01-03 21:24:40 (UTC) |
commit | e483d88ee4158ba13d8c28b020d0e93b62e86d85 (patch) (unidiff) | |
tree | 2c4ac27cf05428ad58257869c90a9ce51c4e43d3 /noncore/net/networksetup/wlan/infoimp.cpp | |
parent | 91395e6cd4d104b05f962ae8833767bbbd094163 (diff) | |
download | opie-e483d88ee4158ba13d8c28b020d0e93b62e86d85.zip opie-e483d88ee4158ba13d8c28b020d0e93b62e86d85.tar.gz opie-e483d88ee4158ba13d8c28b020d0e93b62e86d85.tar.bz2 |
- these have been renamed to networksettings
Diffstat (limited to 'noncore/net/networksetup/wlan/infoimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/wlan/infoimp.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/noncore/net/networksetup/wlan/infoimp.cpp b/noncore/net/networksetup/wlan/infoimp.cpp deleted file mode 100644 index bd56678..0000000 --- a/noncore/net/networksetup/wlan/infoimp.cpp +++ b/dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #include "infoimp.h" | ||
2 | #include "wextensions.h" | ||
3 | |||
4 | #include <qtimer.h> | ||
5 | #include <qprogressbar.h> | ||
6 | #include <qlabel.h> | ||
7 | |||
8 | /** | ||
9 | * Constructor. If wireless extensions are enabled on device name then | ||
10 | * start a timer that every second will update the information. | ||
11 | */ | ||
12 | WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInfo(parent, name, fl){ | ||
13 | WExtensions *wExtensions = new WExtensions(name); | ||
14 | if(!wExtensions->doesHaveWirelessExtensions()){ | ||
15 | delete wExtensions; | ||
16 | qDebug("WlanInfoImp::No wireless extension"); | ||
17 | return; | ||
18 | } | ||
19 | delete wExtensions; | ||
20 | timer = new QTimer( this ); | ||
21 | connect( timer, SIGNAL(timeout()), this, SLOT(update())); | ||
22 | timer->start( 1000, false ); | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * Updates the information about the wireless device. | ||
27 | */ | ||
28 | void WlanInfoImp::update(){ | ||
29 | WExtensions *wExtensions = new WExtensions(this->name()); | ||
30 | if(!wExtensions->doesHaveWirelessExtensions()){ | ||
31 | qDebug("No extension"); | ||
32 | delete wExtensions; | ||
33 | timer->stop(); | ||
34 | return; | ||
35 | } | ||
36 | essidLabel->setText(wExtensions->essid()); | ||
37 | apLabel->setText(wExtensions->ap()); | ||
38 | stationLabel->setText(wExtensions->station()); | ||
39 | modeLabel->setText(wExtensions->mode()); | ||
40 | channelLabel->setText(QString("%1").arg(wExtensions->channel())); | ||
41 | int signal = 0; | ||
42 | int noise = 0; | ||
43 | int quality = 0; | ||
44 | wExtensions->stats(signal, noise, quality); | ||
45 | if(signalProgressBar->progress() != signal) | ||
46 | signalProgressBar->setProgress(signal); | ||
47 | if(noiseProgressBar->progress() != noise) | ||
48 | noiseProgressBar->setProgress(noise); | ||
49 | if(qualityProgressBar->progress() != quality) | ||
50 | qualityProgressBar->setProgress(quality); | ||
51 | rateLabel->setText(QString("%1 Mb/s").arg(wExtensions->rate())); | ||
52 | delete wExtensions; | ||
53 | } | ||
54 | |||
55 | // infoimp.cpp | ||
56 | |||