Diffstat (limited to 'noncore/net/networksetup/wlan/wlanmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
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,15 +1,15 @@ | |||
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 | /** |
@@ -63,40 +63,26 @@ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ | |||
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 | ||