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
@@ -25,6 +25,7 @@
#include <qframe.h>
#include <qpixmap.h>
#include <qguardedptr.h>
+#include <qtimer.h>
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;
};