Diffstat (limited to 'core/applets/volumeapplet/volume.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volume.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h index 5704cad..cb0be72 100644 --- a/core/applets/volumeapplet/volume.h +++ b/core/applets/volumeapplet/volume.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <qframe.h> | 25 | #include <qframe.h> |
26 | #include <qpixmap.h> | 26 | #include <qpixmap.h> |
27 | #include <qguardedptr.h> | 27 | #include <qguardedptr.h> |
28 | #include <qtimer.h> | ||
28 | 29 | ||
29 | class QSlider; | 30 | class QSlider; |
30 | class QCheckBox; | 31 | class QCheckBox; |
@@ -33,14 +34,16 @@ class VolumeControl : public QFrame | |||
33 | { | 34 | { |
34 | Q_OBJECT | 35 | Q_OBJECT |
35 | public: | 36 | public: |
36 | VolumeControl( QWidget *parent=0, const char *name=0 ); | 37 | VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 ); |
37 | 38 | ||
38 | public: | 39 | public: |
39 | QSlider *slider; | 40 | QSlider *slider; |
41 | QSlider *mic; | ||
40 | QCheckBox *muteBox; | 42 | QCheckBox *muteBox; |
41 | 43 | ||
42 | private: | 44 | private: |
43 | void keyPressEvent( QKeyEvent * ); | 45 | void keyPressEvent( QKeyEvent * ); |
46 | void createView(bool showMic = FALSE); | ||
44 | }; | 47 | }; |
45 | 48 | ||
46 | class VolumeApplet : public QWidget | 49 | class VolumeApplet : public QWidget |
@@ -54,20 +57,35 @@ public: | |||
54 | 57 | ||
55 | public slots: | 58 | public slots: |
56 | void volumeChanged( bool muted ); | 59 | void volumeChanged( bool muted ); |
60 | void micChanged( bool muted ); | ||
61 | |||
57 | void setVolume( int percent ); | 62 | void setVolume( int percent ); |
63 | void setMic( int percent ); | ||
64 | |||
58 | void sliderMoved( int percent ); | 65 | void sliderMoved( int percent ); |
66 | void micMoved( int percent ); | ||
59 | void mute( bool ); | 67 | void mute( bool ); |
60 | 68 | ||
69 | void showVolControl(bool showMic = FALSE); | ||
70 | void advVolControl(); | ||
71 | |||
61 | private: | 72 | private: |
62 | void readSystemVolume(); | 73 | void readSystemVolume(); |
74 | void readSystemMic(); | ||
75 | |||
63 | void writeSystemVolume(); | 76 | void writeSystemVolume(); |
77 | void writeSystemMic(); | ||
78 | |||
79 | void keyPressEvent ( QKeyEvent * e ); | ||
64 | void mousePressEvent( QMouseEvent * ); | 80 | void mousePressEvent( QMouseEvent * ); |
81 | void mouseReleaseEvent( QMouseEvent *); | ||
65 | void paintEvent( QPaintEvent* ); | 82 | void paintEvent( QPaintEvent* ); |
66 | 83 | ||
67 | private: | 84 | private: |
68 | int volumePercent; | 85 | int volumePercent, micPercent; |
69 | bool muted; | 86 | bool muted, micMuted; |
70 | QPixmap volumePixmap; | 87 | QPixmap volumePixmap; |
88 | QTimer *advancedTimer; | ||
71 | }; | 89 | }; |
72 | 90 | ||
73 | 91 | ||