author | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-24 20:06:38 (UTC) |
commit | 793a63d9cce0502616cad6999643b1a61836a3db (patch) (side-by-side diff) | |
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 @@ +#ifndef __OPIE_OLED_H__ +#define __OPIE_OLED_H__ + +#include <qwidget.h> +#include <qcolor.h> + +class QPixmap; + +#define _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC + +class OLedBox : public QWidget { + Q_OBJECT + +public: + OLedBox ( const QColor &col = red, QWidget *parent = 0, const char *name = 0 ); + virtual ~OLedBox ( ); + + QColor color ( ) const; + bool isOn ( ) const; + + virtual QSize sizeHint ( ) const; + +public slots: + void toggle ( ); + void setOn ( bool on ); + void setColor ( const QColor &col ); + +signals: + void toggled ( bool ); + +protected: + virtual void paintEvent ( QPaintEvent *e ); + virtual void resizeEvent ( QResizeEvent *e ); + + virtual void mousePressEvent ( QMouseEvent *e ); + +private: + void drawLed ( QPixmap *, const QColor &col ); + +private: + QPixmap *m_pix [2]; + + QColor m_color; + bool m_on; + +#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC + static QPixmap *s_border_pix; +#endif +}; + +#endif |