Diffstat (limited to 'noncore/applets/volumeapplet2/volumeapplet.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/volumeapplet2/volumeapplet.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/noncore/applets/volumeapplet2/volumeapplet.h b/noncore/applets/volumeapplet2/volumeapplet.h index c1f1a3a..953c305 100644 --- a/noncore/applets/volumeapplet2/volumeapplet.h +++ b/noncore/applets/volumeapplet2/volumeapplet.h | |||
@@ -19,85 +19,94 @@ | |||
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef VOLUMEAPPLET_H | 31 | #ifndef VOLUMEAPPLET_H |
32 | #define VOLUMEAPPLET_H | 32 | #define VOLUMEAPPLET_H |
33 | 33 | ||
34 | #include <opie2/otaskbarapplet.h> | 34 | #include <opie2/otaskbarapplet.h> |
35 | #include <opie2/osoundsystem.h> | ||
35 | #include <qframe.h> | 36 | #include <qframe.h> |
36 | #include <qstring.h> | 37 | #include <qstring.h> |
37 | #include <qvbox.h> | 38 | #include <qvbox.h> |
38 | #include <qpixmap.h> | 39 | #include <qpixmap.h> |
40 | //using namespace Opie::MM; | ||
39 | 41 | ||
40 | namespace Opie | 42 | namespace Opie |
41 | { | 43 | { |
42 | namespace Ui { class OLedBox; } | 44 | namespace Ui { class OLedBox; } |
43 | namespace MM { class OMixerInterface; } | 45 | // namespace MM { class OMixerInterface; } |
44 | } | 46 | } |
45 | class QLabel; | 47 | class QLabel; |
46 | class QSlider; | 48 | class QSlider; |
47 | class QShowEvent; | 49 | class QShowEvent; |
48 | class QHideEvent; | 50 | class QHideEvent; |
49 | class QGridLayout; | 51 | class QGridLayout; |
50 | 52 | ||
51 | class Channel : public QVBox | 53 | class Channel : public QVBox |
52 | { | 54 | { |
53 | public: | 55 | public: |
54 | Channel( Opie::MM::OMixerInterface* mixer, QWidget* parent, const char* name ); | 56 | Channel( Opie::MM::OMixerInterface* mixer, QWidget* parent, const char* name ); |
55 | virtual ~Channel(); | 57 | virtual ~Channel(); |
56 | 58 | ||
57 | // public slots: | 59 | // public slots: |
58 | // virtual void clicked(); | 60 | // virtual void clicked(); |
59 | 61 | ||
60 | private: | 62 | private: |
61 | QLabel* _name; | 63 | QLabel* _name; |
62 | QSlider* _volume; | 64 | QSlider* _volume; |
63 | Opie::Ui::OLedBox* _mute; | 65 | Opie::Ui::OLedBox* _mute; |
64 | Opie::MM::OMixerInterface* _mixer; | 66 | Opie::MM::OMixerInterface* _mixer; |
65 | }; | 67 | }; |
66 | 68 | ||
67 | class VolumeAppletControl : public QFrame | 69 | class VolumeAppletControl : public QFrame |
68 | { | 70 | { |
69 | public: | 71 | public: |
70 | VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 ); | 72 | VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 ); |
71 | ~VolumeAppletControl(); | 73 | ~VolumeAppletControl(); |
74 | bool volMuted() const; | ||
75 | int volPercent() const; | ||
76 | |||
77 | int m_vol_percent; | ||
78 | bool m_vol_muted; | ||
79 | |||
80 | Opie::MM::OMixerInterface* mixer; | ||
72 | 81 | ||
73 | virtual QSize sizeHint() const; | 82 | virtual QSize sizeHint() const; |
74 | 83 | ||
75 | protected: | 84 | protected: |
76 | virtual void showEvent( QShowEvent* ); | 85 | virtual void showEvent( QShowEvent* ); |
77 | virtual void hideEvent( QHideEvent* ); | 86 | virtual void hideEvent( QHideEvent* ); |
78 | void build(); | 87 | void build(); |
79 | 88 | ||
80 | private: | 89 | private: |
90 | |||
81 | QGridLayout* l; | 91 | QGridLayout* l; |
82 | |||
83 | }; | 92 | }; |
84 | 93 | ||
85 | 94 | ||
86 | class VolumeApplet : public Opie::Ui::OTaskbarApplet | 95 | class VolumeApplet : public Opie::Ui::OTaskbarApplet |
87 | { | 96 | { |
88 | public: | 97 | public: |
89 | VolumeApplet( QWidget* parent = 0, const char* name = 0 ); | 98 | VolumeApplet( QWidget* parent = 0, const char* name = 0 ); |
90 | ~VolumeApplet(); | 99 | ~VolumeApplet(); |
91 | 100 | ||
92 | static int position(); | 101 | static int position(); |
93 | protected: | 102 | protected: |
94 | virtual void paintEvent( QPaintEvent* ); | 103 | virtual void paintEvent( QPaintEvent* ); |
95 | virtual void mousePressEvent( QMouseEvent* ); | 104 | virtual void mousePressEvent( QMouseEvent* ); |
96 | 105 | ||
97 | private: | 106 | private: |
98 | VolumeAppletControl* _control; | 107 | VolumeAppletControl* _control; |
99 | QPixmap _pixmap; | 108 | QPixmap* _pixmap; |
100 | }; | 109 | }; |
101 | 110 | ||
102 | #endif | 111 | #endif |
103 | 112 | ||