summaryrefslogtreecommitdiff
path: root/core/applets/volumeapplet/volume.h
authorjeremy <jeremy>2002-02-10 13:20:54 (UTC)
committer jeremy <jeremy>2002-02-10 13:20:54 (UTC)
commitd0d626304ffb0de247e22760bc342e72406e301a (patch) (side-by-side diff)
treef547ac0cfc33f1d55da1f0743df72f2f7498efa1 /core/applets/volumeapplet/volume.h
parent16db9b9928f9111f384c202c43a95fac88279b3d (diff)
downloadopie-d0d626304ffb0de247e22760bc342e72406e301a.zip
opie-d0d626304ffb0de247e22760bc342e72406e301a.tar.gz
opie-d0d626304ffb0de247e22760bc342e72406e301a.tar.bz2
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.
Diffstat (limited to 'core/applets/volumeapplet/volume.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.h24
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
@@ -27,2 +27,3 @@
#include <qguardedptr.h>
+#include <qtimer.h>
@@ -35,3 +36,3 @@ class VolumeControl : public QFrame
public:
- VolumeControl( QWidget *parent=0, const char *name=0 );
+ VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 );
@@ -39,2 +40,3 @@ public:
QSlider *slider;
+ QSlider *mic;
QCheckBox *muteBox;
@@ -43,2 +45,3 @@ private:
void keyPressEvent( QKeyEvent * );
+ void createView(bool showMic = FALSE);
};
@@ -56,10 +59,24 @@ 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* );
@@ -67,5 +84,6 @@ private:
private:
- int volumePercent;
- bool muted;
+ int volumePercent, micPercent;
+ bool muted, micMuted;
QPixmap volumePixmap;
+ QTimer *advancedTimer;
};