summaryrefslogtreecommitdiff
path: root/noncore/applets/wirelessapplet/wireless.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/wirelessapplet/wireless.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp55
1 files changed, 24 insertions, 31 deletions
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp
index dc9742a..72ac380 100644
--- a/noncore/applets/wirelessapplet/wireless.cpp
+++ b/noncore/applets/wirelessapplet/wireless.cpp
@@ -14,3 +14,2 @@
#include "wireless.h"
-#include "networkinfo.h"
#include "mgraph.h"
@@ -53,4 +52,4 @@
-//#define MDEBUG
-#undef MDEBUG
+#define MDEBUG
+//#undef MDEBUG
@@ -327,4 +326,3 @@ void WirelessApplet::timerEvent( QTimerEvent* )
{
- /*
-
+ qDebug( "WirelessApplet::timerEvent" );
OWirelessNetworkInterface* iface = interface;
@@ -333,13 +331,5 @@ void WirelessApplet::timerEvent( QTimerEvent* )
{
- bool statResult = iface->updateStatistics();
- if ( !statResult )
- {
- interface = 0;
- mustRepaint();
- return ;
- }
- else
if ( mustRepaint() )
{
- //qDebug( "WIFIAPPLET: A value has changed -> repainting." );
+ qDebug( "WIFIAPPLET: A value has changed -> repainting." );
repaint();
@@ -348,7 +338,10 @@ void WirelessApplet::timerEvent( QTimerEvent* )
if ( status->isVisible() )
+ {
updatePopupWindow();
}
- else checkInterface();
-
- */
+ }
+ else
+ {
+ checkInterface();
+ }
}
@@ -452,4 +445,4 @@ void WirelessApplet::updatePopupWindow()
{
- MWirelessNetworkInterface * iface = ( MWirelessNetworkInterface* ) interface;
- int qualityH = iface->qualityPercent();
+ OWirelessNetworkInterface* iface = interface;
+ int qualityH = iface->signalStrength();
@@ -459,9 +452,9 @@ void WirelessApplet::updatePopupWindow()
QString freqString;
- QString cell = ( iface->mode == "Managed" ) ? "AP: " : "Cell: ";
- freqString.sprintf( "%.3f GHz", iface->freq );
- status->statusLabel->setText( "Station: " + iface->nick + "<br>" +
- "ESSID: " + iface->essid + "<br>" +
- "MODE: " + iface->mode + "<br>" +
+ QString cell = ( iface->mode() == "Managed" ) ? "AP: " : "Cell: ";
+ freqString.sprintf( "%.3f GHz", iface->frequency() );
+ status->statusLabel->setText( "Station: " + iface->nickName() + "<br>" +
+ "ESSID: " + iface->SSID() + "<br>" +
+ "MODE: " + iface->mode() + "<br>" +
"FREQ: " + freqString + "<br>" +
- cell + " " + iface->APAddr );
+ cell + " " + iface->associatedAP().toString() );
}
@@ -470,6 +463,6 @@ const char** WirelessApplet::getQualityPixmap()
{
- MWirelessNetworkInterface * iface = ( MWirelessNetworkInterface* ) interface;
+ OWirelessNetworkInterface* iface = interface;
if ( !iface ) return ( const char** ) nowireless_xpm;
- int qualityH = iface->qualityPercent();
+ int qualityH = iface->signalStrength();
if ( qualityH < 0 ) return ( const char** ) nowireless_xpm;
@@ -491,3 +484,3 @@ void WirelessApplet::paintEvent( QPaintEvent* )
{
- MWirelessNetworkInterface * iface = ( MWirelessNetworkInterface* ) interface;
+ OWirelessNetworkInterface* iface = interface;
@@ -503,5 +496,5 @@ void WirelessApplet::paintEvent( QPaintEvent* )
- int noiseH = iface->noisePercent() * ( height() - 3 ) / 100;
- int signalH = iface->signalPercent() * ( height() - 3 ) / 100;
- int qualityH = iface->qualityPercent() * ( height() - 3 ) / 100;
+ int noiseH = 30; // iface->noisePercent() * ( height() - 3 ) / 100;
+ int signalH = 50; // iface->signalPercent() * ( height() - 3 ) / 100;
+ int qualityH = iface->signalStrength(); // iface->qualityPercent() * ( height() - 3 ) / 100;