Diffstat (limited to 'noncore/applets/wirelessapplet/wireless.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/wirelessapplet/wireless.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/noncore/applets/wirelessapplet/wireless.h b/noncore/applets/wirelessapplet/wireless.h new file mode 100644 index 0000000..d45ac68 --- a/dev/null +++ b/noncore/applets/wirelessapplet/wireless.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
3 | ** All rights reserved. | ||
4 | ** | ||
5 | ** This file may be distributed and/or modified under the terms of the | ||
6 | ** GNU General Public License version 2 as published by the Free Software | ||
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
8 | ** packaging of this file. | ||
9 | ** | ||
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | ** | ||
13 | **********************************************************************/ | ||
14 | |||
15 | #ifndef __WIRELESS_APPLET_H__ | ||
16 | #define __WIRELESS_APPLET_H__ | ||
17 | |||
18 | #include <qwidget.h> | ||
19 | #include <qframe.h> | ||
20 | #include <qpixmap.h> | ||
21 | |||
22 | class MNetwork; | ||
23 | class MWirelessNetwork; | ||
24 | class MNetworkInterface; | ||
25 | class MWirelessNetworkInterface; | ||
26 | class Y; | ||
27 | class QLabel; | ||
28 | class WirelessApplet; | ||
29 | class MGraph; | ||
30 | |||
31 | class WirelessControl : public QFrame | ||
32 | { | ||
33 | Q_OBJECT | ||
34 | public: | ||
35 | WirelessControl( WirelessApplet* icon, QWidget *parent=0, const char *name=0 ); | ||
36 | void show( bool ); | ||
37 | |||
38 | MGraph* mgraph; | ||
39 | QLabel* statusLabel; | ||
40 | QLabel* updateLabel; | ||
41 | |||
42 | public slots: | ||
43 | void updateDelayChange( int ); | ||
44 | |||
45 | private: | ||
46 | WirelessApplet* applet; | ||
47 | }; | ||
48 | |||
49 | class WirelessApplet : public QWidget | ||
50 | { | ||
51 | Q_OBJECT | ||
52 | public: | ||
53 | WirelessApplet( QWidget *parent = 0, const char *name=0 ); | ||
54 | ~WirelessApplet(); | ||
55 | WirelessControl* status; | ||
56 | |||
57 | virtual void timerEvent( QTimerEvent* ); | ||
58 | void updateDelayChange( int delay ); | ||
59 | |||
60 | public slots: | ||
61 | void styleChange( int ); | ||
62 | |||
63 | private: | ||
64 | void mousePressEvent( QMouseEvent * ); | ||
65 | void paintEvent( QPaintEvent* ); | ||
66 | void checkInterface(); | ||
67 | |||
68 | bool mustRepaint(); | ||
69 | void updatePopupWindow(); | ||
70 | const char** getQualityPixmap(); | ||
71 | |||
72 | private: | ||
73 | QPixmap snapshotPixmap; | ||
74 | int visualStyle; | ||
75 | int timer; | ||
76 | |||
77 | MWirelessNetwork* network; | ||
78 | MNetworkInterface* interface; | ||
79 | |||
80 | private: | ||
81 | const char** oldpixmap; | ||
82 | MWirelessNetworkInterface* oldiface; | ||
83 | int oldqualityH; | ||
84 | int oldsignalH; | ||
85 | int oldnoiseH; | ||
86 | }; | ||
87 | |||
88 | #endif // __WIRELESS_APPLET_H__ | ||
89 | |||