author | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
commit | 793a63d9cce0502616cad6999643b1a61836a3db (patch) (unidiff) | |
tree | 3ea020afd5a06236e5e889f3acae429d87171488 /core/applets/volumeapplet/oledbox.h | |
parent | fe4cb014e959518e4835d15593f2c392174af55b (diff) | |
download | opie-793a63d9cce0502616cad6999643b1a61836a3db.zip opie-793a63d9cce0502616cad6999643b1a61836a3db.tar.gz opie-793a63d9cce0502616cad6999643b1a61836a3db.tar.bz2 |
Started as a bug fix this is a near complete restructuring/rewrite:
- Added a alarm volume slider on iPAQs
- Made mic mutable
- Correctly inform the launcher about tap/key sounds
Diffstat (limited to 'core/applets/volumeapplet/oledbox.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/oledbox.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/core/applets/volumeapplet/oledbox.h b/core/applets/volumeapplet/oledbox.h new file mode 100644 index 0000000..4371a22 --- a/dev/null +++ b/core/applets/volumeapplet/oledbox.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef __OPIE_OLED_H__ | ||
2 | #define __OPIE_OLED_H__ | ||
3 | |||
4 | #include <qwidget.h> | ||
5 | #include <qcolor.h> | ||
6 | |||
7 | class QPixmap; | ||
8 | |||
9 | #define _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC | ||
10 | |||
11 | class OLedBox : public QWidget { | ||
12 | Q_OBJECT | ||
13 | |||
14 | public: | ||
15 | OLedBox ( const QColor &col = red, QWidget *parent = 0, const char *name = 0 ); | ||
16 | virtual ~OLedBox ( ); | ||
17 | |||
18 | QColor color ( ) const; | ||
19 | bool isOn ( ) const; | ||
20 | |||
21 | virtual QSize sizeHint ( ) const; | ||
22 | |||
23 | public slots: | ||
24 | void toggle ( ); | ||
25 | void setOn ( bool on ); | ||
26 | void setColor ( const QColor &col ); | ||
27 | |||
28 | signals: | ||
29 | void toggled ( bool ); | ||
30 | |||
31 | protected: | ||
32 | virtual void paintEvent ( QPaintEvent *e ); | ||
33 | virtual void resizeEvent ( QResizeEvent *e ); | ||
34 | |||
35 | virtual void mousePressEvent ( QMouseEvent *e ); | ||
36 | |||
37 | private: | ||
38 | void drawLed ( QPixmap *, const QColor &col ); | ||
39 | |||
40 | private: | ||
41 | QPixmap *m_pix [2]; | ||
42 | |||
43 | QColor m_color; | ||
44 | bool m_on; | ||
45 | |||
46 | #ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC | ||
47 | static QPixmap *s_border_pix; | ||
48 | #endif | ||
49 | }; | ||
50 | |||
51 | #endif | ||