author | mickeyl <mickeyl> | 2004-09-27 20:56:02 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-09-27 20:56:02 (UTC) |
commit | ba463a1029d1c0ff553a3dc9bf544617289d95f0 (patch) (unidiff) | |
tree | ab5ce458e2aa66525346695780f0f73571125128 /noncore/applets/brightnessapplet/brightnessapplet.h | |
parent | 83bb04664aea3f878b86259aa76846afa617c694 (diff) | |
download | opie-ba463a1029d1c0ff553a3dc9bf544617289d95f0.zip opie-ba463a1029d1c0ff553a3dc9bf544617289d95f0.tar.gz opie-ba463a1029d1c0ff553a3dc9bf544617289d95f0.tar.bz2 |
A brightness applet
Diffstat (limited to 'noncore/applets/brightnessapplet/brightnessapplet.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/brightnessapplet/brightnessapplet.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/noncore/applets/brightnessapplet/brightnessapplet.h b/noncore/applets/brightnessapplet/brightnessapplet.h new file mode 100644 index 0000000..8b88bd1 --- a/dev/null +++ b/noncore/applets/brightnessapplet/brightnessapplet.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | =. (C) 2004 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | .=l. Based on Qtopia 1.7 Brightnessapplet (C) 2003-2004 TrollTech | ||
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 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 | ..}^=.= = ; General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = General Public License along with | ||
24 | -- :-=` this application; 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 | #include <qpixmap.h> | ||
40 | |||
41 | class QShowEvent; | ||
42 | class QHideEvent; | ||
43 | class QSlider; | ||
44 | |||
45 | class BrightnessAppletControl : public QFrame | ||
46 | { | ||
47 | public: | ||
48 | BrightnessAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 ); | ||
49 | ~BrightnessAppletControl(); | ||
50 | |||
51 | QSlider* slider; | ||
52 | }; | ||
53 | |||
54 | class BrightnessApplet : public Opie::Ui::OTaskbarApplet | ||
55 | { | ||
56 | Q_OBJECT | ||
57 | |||
58 | public: | ||
59 | BrightnessApplet( QWidget* parent = 0, const char* name = 0 ); | ||
60 | ~BrightnessApplet(); | ||
61 | |||
62 | void writeSystemBrightness( int brightness ); | ||
63 | int readSystemBrightness(); | ||
64 | int calcBrightnessValue(); | ||
65 | |||
66 | static int position(); | ||
67 | |||
68 | public slots: | ||
69 | void sliderMoved( int value ); | ||
70 | |||
71 | protected: | ||
72 | virtual void paintEvent( QPaintEvent* ); | ||
73 | virtual void mousePressEvent( QMouseEvent* ); | ||
74 | |||
75 | private: | ||
76 | BrightnessAppletControl* _control; | ||
77 | QPixmap _pixmap; | ||
78 | }; | ||
79 | |||
80 | #endif | ||
81 | |||