author | mickeyl <mickeyl> | 2003-04-16 22:25:44 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-16 22:25:44 (UTC) |
commit | fb1101a35d081e47df547c01a645af59f4730969 (patch) (unidiff) | |
tree | 0da82e9d4a8cefbf8146480be2d17b6ccc912e5d /noncore/applets/networkapplet/networkapplet.h | |
parent | 0ac702419b3b8450b689e0ee2500f34b577f1a72 (diff) | |
download | opie-fb1101a35d081e47df547c01a645af59f4730969.zip opie-fb1101a35d081e47df547c01a645af59f4730969.tar.gz opie-fb1101a35d081e47df547c01a645af59f4730969.tar.bz2 |
introducing networkapplet - monolithic now, but at some point of time pluggable
long term plan: merge wirelessapplet with networkapplet
Diffstat (limited to 'noncore/applets/networkapplet/networkapplet.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/networkapplet/networkapplet.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/noncore/applets/networkapplet/networkapplet.h b/noncore/applets/networkapplet/networkapplet.h new file mode 100644 index 0000000..7b5fa97 --- a/dev/null +++ b/noncore/applets/networkapplet/networkapplet.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | |||
29 | */ | ||
30 | |||
31 | #ifndef NETWORKAPPLET_H | ||
32 | #define NETWORKAPPLET_H | ||
33 | |||
34 | #include <opie2/otaskbarapplet.h> | ||
35 | #include <qframe.h> | ||
36 | #include <qstring.h> | ||
37 | #include <qtoolbutton.h> | ||
38 | #include <qlineedit.h> | ||
39 | |||
40 | class ONetworkInterface; | ||
41 | class QShowEvent; | ||
42 | class QHideEvent; | ||
43 | class QVBoxLayout; | ||
44 | |||
45 | class IfaceUpDownButton : public QToolButton | ||
46 | { | ||
47 | Q_OBJECT | ||
48 | |||
49 | public: | ||
50 | IfaceUpDownButton( QWidget* parent, const char* name ); | ||
51 | virtual ~IfaceUpDownButton(); | ||
52 | |||
53 | public slots: | ||
54 | virtual void clicked(); | ||
55 | |||
56 | private: | ||
57 | ONetworkInterface* _iface; | ||
58 | }; | ||
59 | |||
60 | |||
61 | class IfaceIPAddress : public QLineEdit | ||
62 | { | ||
63 | Q_OBJECT | ||
64 | |||
65 | public: | ||
66 | IfaceIPAddress( QWidget* parent, const char* name ); | ||
67 | virtual ~IfaceIPAddress(); | ||
68 | |||
69 | public slots: | ||
70 | virtual void returnPressed(); | ||
71 | |||
72 | private: | ||
73 | ONetworkInterface* _iface; | ||
74 | }; | ||
75 | |||
76 | class NetworkAppletControl : public QFrame | ||
77 | { | ||
78 | public: | ||
79 | NetworkAppletControl( OTaskbarApplet* parent, const char* name = 0 ); | ||
80 | ~NetworkAppletControl(); | ||
81 | |||
82 | virtual QSize sizeHint() const; | ||
83 | |||
84 | protected: | ||
85 | virtual void showEvent( QShowEvent* ); | ||
86 | virtual void hideEvent( QHideEvent* ); | ||
87 | QString guessDevice( ONetworkInterface* iface ); | ||
88 | void build(); | ||
89 | |||
90 | private: | ||
91 | QVBoxLayout* l; | ||
92 | |||
93 | }; | ||
94 | |||
95 | |||
96 | class NetworkApplet : public OTaskbarApplet | ||
97 | { | ||
98 | public: | ||
99 | NetworkApplet( QWidget* parent = 0, const char* name = 0 ); | ||
100 | ~NetworkApplet(); | ||
101 | |||
102 | static int position(); | ||
103 | protected: | ||
104 | virtual void paintEvent( QPaintEvent* ); | ||
105 | virtual void mousePressEvent( QMouseEvent* ); | ||
106 | |||
107 | private: | ||
108 | NetworkAppletControl* _control; | ||
109 | }; | ||
110 | |||
111 | #endif | ||
112 | |||