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 @@ -24,24 +24,27 @@ #include <qwidget.h> #include <qframe.h> #include <qpixmap.h> #include <qguardedptr.h> +#include <qtimer.h> class QSlider; class QCheckBox; class VolumeControl : public QFrame { Q_OBJECT public: - VolumeControl( QWidget *parent=0, const char *name=0 ); + VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 ); public: QSlider *slider; + QSlider *mic; QCheckBox *muteBox; private: void keyPressEvent( QKeyEvent * ); + void createView(bool showMic = FALSE); }; class VolumeApplet : public QWidget { @@ -53,22 +56,37 @@ public: int percent( ) { return volumePercent; } public slots: void volumeChanged( bool muted ); + void micChanged( bool muted ); + void setVolume( int percent ); + void setMic( int percent ); + void sliderMoved( int percent ); + void micMoved( int percent ); void mute( bool ); + void showVolControl(bool showMic = FALSE); + void advVolControl(); + private: void readSystemVolume(); + void readSystemMic(); + void writeSystemVolume(); + void writeSystemMic(); + + void keyPressEvent ( QKeyEvent * e ); void mousePressEvent( QMouseEvent * ); + void mouseReleaseEvent( QMouseEvent *); void paintEvent( QPaintEvent* ); private: - int volumePercent; - bool muted; + int volumePercent, micPercent; + bool muted, micMuted; QPixmap volumePixmap; + QTimer *advancedTimer; }; #endif // __VOLUME_APPLET_H__ |