From d0d626304ffb0de247e22760bc342e72406e301a Mon Sep 17 00:00:00 2001 From: jeremy Date: Sun, 10 Feb 2002 13:20:54 +0000 Subject: Added support for the new setMic and micChange messages in opie-base. Alos modified the volume control and mic control to read the last set position (as recorded in Sound.conf) instead of always defaulting the sound to 50% as before the change. --- (limited to 'core/applets/volumeapplet/volume.h') 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 @@ #include #include #include +#include class QSlider; class QCheckBox; @@ -33,14 +34,16 @@ 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 @@ -54,20 +57,35 @@ public: 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; }; -- cgit v0.9.0.2