author | mickeyl <mickeyl> | 2004-02-23 13:37:46 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-23 13:37:46 (UTC) |
commit | 1f362cd77a2b39eae2abca6da28efa5118d2c347 (patch) (unidiff) | |
tree | ddc796d7505b2ec0f20e9b74154316d3f818d16c /noncore/applets/wirelessapplet/wireless.cpp | |
parent | 12ce268e3f75e4f07699b8e0c368f2112e651f7f (diff) | |
download | opie-1f362cd77a2b39eae2abca6da28efa5118d2c347.zip opie-1f362cd77a2b39eae2abca6da28efa5118d2c347.tar.gz opie-1f362cd77a2b39eae2abca6da28efa5118d2c347.tar.bz2 |
start with the long awaited wireless applet overhaul
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, 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 | ||
316 | WirelessApplet::~WirelessApplet() | 315 | WirelessApplet::~WirelessApplet() |
317 | { | 316 | {} |
318 | } | ||
319 | 317 | ||
320 | void WirelessApplet::timerEvent( QTimerEvent* ) | 318 | void 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 | ||
344 | void WirelessApplet::mousePressEvent( QMouseEvent *) | 344 | void WirelessApplet::mousePressEvent( QMouseEvent *) |
@@ -537,3 +537,16 @@ void WirelessApplet::paintEvent( QPaintEvent* ) | |||
537 | } | 537 | } |
538 | } | 538 | } |
539 | } | 539 | } |
540 | |||
541 | |||
542 | int WirelessApplet::position() | ||
543 | { | ||
544 | return 6; | ||
545 | } | ||
546 | |||
547 | |||
548 | Q_EXPORT_INTERFACE() | ||
549 | { | ||
550 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<WirelessApplet> ); | ||
551 | } | ||
552 | |||