From 793a63d9cce0502616cad6999643b1a61836a3db Mon Sep 17 00:00:00 2001 From: sandman Date: Mon, 24 Jun 2002 20:06:38 +0000 Subject: 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 --- (limited to 'core/applets/volumeapplet/oledbox.h') 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 +#include + +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 -- cgit v0.9.0.2