summaryrefslogtreecommitdiff
path: root/noncore/applets/wirelessapplet/wireless.cpp
Unidiff
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, 34 insertions, 21 deletions
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp
index 763aab8..cbaf5d6 100644
--- a/noncore/applets/wirelessapplet/wireless.cpp
+++ b/noncore/applets/wirelessapplet/wireless.cpp
@@ -1,7 +1,5 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 Michael 'Mickey' Lauer 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer <mickey@vanille.de>
3** <mickey@tm.informatik.uni-frankfurt.de>
4** http://www.Vanille.de
5** 3**
6** This file may be distributed and/or modified under the terms of the 4** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 5** GNU General Public License version 2 as published by the Free Software
@@ -14,11 +12,23 @@
14**********************************************************************/ 12**********************************************************************/
15 13
16#include "wireless.h" 14#include "wireless.h"
15#include "networkinfo.h"
16#include "mgraph.h"
17#include "advancedconfig.h"
18#include "connect0.xpm"
19#include "connect1.xpm"
20#include "connect2.xpm"
21#include "connect3.xpm"
22#include "connect4.xpm"
23#include "connect5.xpm"
24#include "nowireless.xpm"
17 25
18#include <qapplication.h> 26/* OPIE */
27#include <opie2/otaskbarapplet.h>
19#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
20#include <qpe/config.h> 29#include <qpe/config.h>
21 30
31/* QT */
22#include <qpoint.h> 32#include <qpoint.h>
23#include <qradiobutton.h> 33#include <qradiobutton.h>
24#include <qpushbutton.h> 34#include <qpushbutton.h>
@@ -33,22 +43,10 @@
33#include <qfile.h> 43#include <qfile.h>
34#include <qtextstream.h> 44#include <qtextstream.h>
35 45
46/* STD */
36#include <sys/types.h> 47#include <sys/types.h>
37#include <signal.h> 48#include <signal.h>
38 49
39#include "networkinfo.h"
40#include "mgraph.h"
41
42#include "advancedconfig.h"
43
44#include "connect0.xpm"
45#include "connect1.xpm"
46#include "connect2.xpm"
47#include "connect3.xpm"
48#include "connect4.xpm"
49#include "connect5.xpm"
50#include "nowireless.xpm"
51
52#define STYLE_BARS 0 50#define STYLE_BARS 0
53#define STYLE_ANTENNA 1 51#define STYLE_ANTENNA 1
54 52
@@ -226,6 +224,7 @@ void WirelessApplet::checkInterface()
226#ifdef MDEBUG 224#ifdef MDEBUG
227 qDebug( "WIFIAPPLET: using interface '%s'", (const char*) interface->getName() ); 225 qDebug( "WIFIAPPLET: using interface '%s'", (const char*) interface->getName() );
228#endif 226#endif
227
229 } 228 }
230 else 229 else
231 { 230 {
@@ -314,8 +313,7 @@ void WirelessApplet::displayStyleChange( int style )
314} 313}
315 314
316WirelessApplet::~WirelessApplet() 315WirelessApplet::~WirelessApplet()
317{ 316{}
318}
319 317
320void WirelessApplet::timerEvent( QTimerEvent* ) 318void WirelessApplet::timerEvent( QTimerEvent* )
321{ 319{
@@ -329,7 +327,8 @@ void WirelessApplet::timerEvent( QTimerEvent* )
329 interface = 0; 327 interface = 0;
330 mustRepaint(); 328 mustRepaint();
331 return; 329 return;
332 } else 330 }
331 else
333 if ( mustRepaint() ) 332 if ( mustRepaint() )
334 { 333 {
335 //qDebug( "WIFIAPPLET: A value has changed -> repainting." ); 334 //qDebug( "WIFIAPPLET: A value has changed -> repainting." );
@@ -338,7 +337,8 @@ void WirelessApplet::timerEvent( QTimerEvent* )
338 337
339 if ( status->isVisible() ) 338 if ( status->isVisible() )
340 updatePopupWindow(); 339 updatePopupWindow();
341 } else checkInterface(); 340 }
341 else checkInterface();
342} 342}
343 343
344void WirelessApplet::mousePressEvent( QMouseEvent *) 344void WirelessApplet::mousePressEvent( QMouseEvent *)
@@ -537,3 +537,16 @@ void WirelessApplet::paintEvent( QPaintEvent* )
537 } 537 }
538 } 538 }
539} 539}
540
541
542int WirelessApplet::position()
543{
544 return 6;
545}
546
547
548Q_EXPORT_INTERFACE()
549{
550 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<WirelessApplet> );
551}
552