Diffstat (limited to 'noncore/applets/wirelessapplet/wireless.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/wirelessapplet/wireless.cpp | 55 |
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 @@ | |||
14 | #include "wireless.h" | 14 | #include "wireless.h" |
15 | #include "networkinfo.h" | ||
16 | #include "mgraph.h" | 15 | #include "mgraph.h" |
@@ -53,4 +52,4 @@ | |||
53 | 52 | ||
54 | //#define MDEBUG | 53 | #define MDEBUG |
55 | #undef MDEBUG | 54 | //#undef MDEBUG |
56 | 55 | ||
@@ -327,4 +326,3 @@ void WirelessApplet::timerEvent( QTimerEvent* ) | |||
327 | { | 326 | { |
328 | /* | 327 | qDebug( "WirelessApplet::timerEvent" ); |
329 | |||
330 | OWirelessNetworkInterface* iface = interface; | 328 | OWirelessNetworkInterface* iface = interface; |
@@ -333,13 +331,5 @@ void WirelessApplet::timerEvent( QTimerEvent* ) | |||
333 | { | 331 | { |
334 | bool statResult = iface->updateStatistics(); | ||
335 | if ( !statResult ) | ||
336 | { | ||
337 | interface = 0; | ||
338 | mustRepaint(); | ||
339 | return ; | ||
340 | } | ||
341 | else | ||
342 | if ( mustRepaint() ) | 332 | if ( mustRepaint() ) |
343 | { | 333 | { |
344 | //qDebug( "WIFIAPPLET: A value has changed -> repainting." ); | 334 | qDebug( "WIFIAPPLET: A value has changed -> repainting." ); |
345 | repaint(); | 335 | repaint(); |
@@ -348,7 +338,10 @@ void WirelessApplet::timerEvent( QTimerEvent* ) | |||
348 | if ( status->isVisible() ) | 338 | if ( status->isVisible() ) |
339 | { | ||
349 | updatePopupWindow(); | 340 | updatePopupWindow(); |
350 | } | 341 | } |
351 | else checkInterface(); | 342 | } |
352 | 343 | else | |
353 | */ | 344 | { |
345 | checkInterface(); | ||
346 | } | ||
354 | } | 347 | } |
@@ -452,4 +445,4 @@ void WirelessApplet::updatePopupWindow() | |||
452 | { | 445 | { |
453 | MWirelessNetworkInterface * iface = ( MWirelessNetworkInterface* ) interface; | 446 | OWirelessNetworkInterface* iface = interface; |
454 | int qualityH = iface->qualityPercent(); | 447 | int qualityH = iface->signalStrength(); |
455 | 448 | ||
@@ -459,9 +452,9 @@ void WirelessApplet::updatePopupWindow() | |||
459 | QString freqString; | 452 | QString freqString; |
460 | QString cell = ( iface->mode == "Managed" ) ? "AP: " : "Cell: "; | 453 | QString cell = ( iface->mode() == "Managed" ) ? "AP: " : "Cell: "; |
461 | freqString.sprintf( "%.3f GHz", iface->freq ); | 454 | freqString.sprintf( "%.3f GHz", iface->frequency() ); |
462 | status->statusLabel->setText( "Station: " + iface->nick + "<br>" + | 455 | status->statusLabel->setText( "Station: " + iface->nickName() + "<br>" + |
463 | "ESSID: " + iface->essid + "<br>" + | 456 | "ESSID: " + iface->SSID() + "<br>" + |
464 | "MODE: " + iface->mode + "<br>" + | 457 | "MODE: " + iface->mode() + "<br>" + |
465 | "FREQ: " + freqString + "<br>" + | 458 | "FREQ: " + freqString + "<br>" + |
466 | cell + " " + iface->APAddr ); | 459 | cell + " " + iface->associatedAP().toString() ); |
467 | } | 460 | } |
@@ -470,6 +463,6 @@ const char** WirelessApplet::getQualityPixmap() | |||
470 | { | 463 | { |
471 | MWirelessNetworkInterface * iface = ( MWirelessNetworkInterface* ) interface; | 464 | OWirelessNetworkInterface* iface = interface; |
472 | 465 | ||
473 | if ( !iface ) return ( const char** ) nowireless_xpm; | 466 | if ( !iface ) return ( const char** ) nowireless_xpm; |
474 | int qualityH = iface->qualityPercent(); | 467 | int qualityH = iface->signalStrength(); |
475 | if ( qualityH < 0 ) return ( const char** ) nowireless_xpm; | 468 | if ( qualityH < 0 ) return ( const char** ) nowireless_xpm; |
@@ -491,3 +484,3 @@ void WirelessApplet::paintEvent( QPaintEvent* ) | |||
491 | { | 484 | { |
492 | MWirelessNetworkInterface * iface = ( MWirelessNetworkInterface* ) interface; | 485 | OWirelessNetworkInterface* iface = interface; |
493 | 486 | ||
@@ -503,5 +496,5 @@ void WirelessApplet::paintEvent( QPaintEvent* ) | |||
503 | 496 | ||
504 | int noiseH = iface->noisePercent() * ( height() - 3 ) / 100; | 497 | int noiseH = 30; // iface->noisePercent() * ( height() - 3 ) / 100; |
505 | int signalH = iface->signalPercent() * ( height() - 3 ) / 100; | 498 | int signalH = 50; // iface->signalPercent() * ( height() - 3 ) / 100; |
506 | int qualityH = iface->qualityPercent() * ( height() - 3 ) / 100; | 499 | int qualityH = iface->signalStrength(); // iface->qualityPercent() * ( height() - 3 ) / 100; |
507 | 500 | ||