Diffstat (limited to 'noncore/settings/networksettings2/opietooth2_applet/opietoothapplet.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2_applet/opietoothapplet.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/opietooth2_applet/opietoothapplet.h b/noncore/settings/networksettings2/opietooth2_applet/opietoothapplet.h new file mode 100644 index 0000000..92ae612 --- a/dev/null +++ b/noncore/settings/networksettings2/opietooth2_applet/opietoothapplet.h | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Maximilian Reiss <max.reiss@gmx.de> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This library is free software; you can | ||
6 | .> <, > . <= redistribute it and/or modify it under | ||
7 | :=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%+i> _;_. | ||
12 | .i_,=:_. -<s. This library is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=| MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. . .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-= this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef __OPIETOOTH2APPLET_H__ | ||
30 | #define __OPIETOOTH2APPLET_H__ | ||
31 | |||
32 | #include <qwidget.h> | ||
33 | #include <qpixmap.h> | ||
34 | #include <qlabel.h> | ||
35 | #include <qtimer.h> | ||
36 | |||
37 | namespace Opietooth2 { | ||
38 | |||
39 | class OTGateway; | ||
40 | |||
41 | class MessagePanel : public QLabel { | ||
42 | |||
43 | Q_OBJECT | ||
44 | |||
45 | public: | ||
46 | |||
47 | MessagePanel( const QString & Msg, | ||
48 | QWidget* parent = 0, | ||
49 | const char* name=0); | ||
50 | |||
51 | void popup( QWidget* parent = 0); | ||
52 | |||
53 | protected: | ||
54 | |||
55 | virtual void mouseReleaseEvent( QMouseEvent * ); | ||
56 | virtual void closeEvent( QCloseEvent * ); | ||
57 | |||
58 | private: | ||
59 | |||
60 | QWidget* popupParent; | ||
61 | int moves; | ||
62 | |||
63 | }; | ||
64 | |||
65 | class Opietooth2Applet : public QWidget { | ||
66 | |||
67 | Q_OBJECT | ||
68 | |||
69 | public: | ||
70 | |||
71 | Opietooth2Applet( QWidget *parent = 0, const char *name=0 ); | ||
72 | ~Opietooth2Applet(); | ||
73 | |||
74 | public slots: | ||
75 | |||
76 | // sent when device changes state | ||
77 | void SLOT_StateChange( bool ); | ||
78 | void SLOT_Error( const QString & ); | ||
79 | |||
80 | private: | ||
81 | |||
82 | void mousePressEvent( QMouseEvent * ); | ||
83 | void paintEvent( QPaintEvent* ); | ||
84 | |||
85 | void launchManager(); | ||
86 | |||
87 | private: | ||
88 | |||
89 | OTGateway * OT; | ||
90 | QPixmap OnP; | ||
91 | QPixmap OffP; | ||
92 | |||
93 | }; | ||
94 | |||
95 | }; | ||
96 | |||
97 | |||
98 | #endif | ||
99 | |||