author | llornkcor <llornkcor> | 2002-04-07 00:46:35 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-07 00:46:35 (UTC) |
commit | e237c0758206c34f96c11870e033412b89e37463 (patch) (unidiff) | |
tree | ff61337aafa002a494a134cb61daaeda10aa0a44 /core/applets/volumeapplet/volume.h | |
parent | 014a5c29fc8a1b2e6bc2ec550134163bea86443c (diff) | |
download | opie-e237c0758206c34f96c11870e033412b89e37463.zip opie-e237c0758206c34f96c11870e033412b89e37463.tar.gz opie-e237c0758206c34f96c11870e033412b89e37463.tar.bz2 |
re-commit buttons
Diffstat (limited to 'core/applets/volumeapplet/volume.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volume.h | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h index a982f53..9fc12d8 100644 --- a/core/applets/volumeapplet/volume.h +++ b/core/applets/volumeapplet/volume.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
@@ -18,4 +18,5 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
20 | #ifndef __VOLUME_APPLET_H__ | 21 | #ifndef __VOLUME_APPLET_H__ |
21 | #define __VOLUME_APPLET_H__ | 22 | #define __VOLUME_APPLET_H__ |
@@ -26,9 +27,8 @@ | |||
26 | #include <qpixmap.h> | 27 | #include <qpixmap.h> |
27 | #include <qguardedptr.h> | 28 | #include <qguardedptr.h> |
29 | #include <qtimer.h> | ||
28 | 30 | ||
29 | class QSlider; | 31 | class QSlider; |
30 | class QCheckBox; | 32 | class QCheckBox; |
31 | class QPushButton; | ||
32 | class QTimer; | ||
33 | 33 | ||
34 | class VolumeControl : public QFrame | 34 | class VolumeControl : public QFrame |
@@ -36,21 +36,22 @@ class VolumeControl : public QFrame | |||
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | VolumeControl( QWidget *parent=0, const char *name=0 ); | 38 | VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 ); |
39 | 39 | ||
40 | public: | 40 | public: |
41 | QSlider *slider; | 41 | QSlider *slider; |
42 | QSlider *mic; | ||
42 | QCheckBox *muteBox; | 43 | QCheckBox *muteBox; |
43 | 44 | ||
44 | private: | 45 | private: |
45 | void keyPressEvent( QKeyEvent * ); | 46 | QPushButton *upButton; |
47 | QPushButton *downButton; | ||
48 | QTimer *rateTimer; | ||
46 | 49 | ||
50 | void keyPressEvent( QKeyEvent * ); | ||
51 | void createView(bool showMic = FALSE); | ||
47 | private slots: | 52 | private slots: |
48 | void ButtonChanged(); | 53 | void ButtonChanged(); |
49 | void rateTimerDone(); | 54 | void rateTimerDone(); |
50 | 55 | ||
51 | private: | ||
52 | QPushButton *upButton; | ||
53 | QPushButton *downButton; | ||
54 | QTimer *rateTimer; | ||
55 | }; | 56 | }; |
56 | 57 | ||
@@ -66,9 +67,21 @@ public: | |||
66 | public slots: | 67 | public slots: |
67 | void volumeChanged( bool muted ); | 68 | void volumeChanged( bool muted ); |
68 | void setVolume( int percent ); | 69 | void micChanged( bool muted ); |
69 | void sliderMoved( int percent ); | 70 | void sliderMoved( int percent ); |
70 | void mute( bool ); | 71 | void mute( bool ); |
71 | 72 | ||
73 | void micMoved( int percent ); | ||
74 | void setVolume( int percent ); | ||
75 | void setMic( int percent ); | ||
76 | |||
77 | void showVolControl(bool showMic = FALSE); | ||
78 | void advVolControl(); | ||
79 | |||
72 | private: | 80 | private: |
81 | int volumePercent, micPercent; | ||
82 | bool muted, micMuted; | ||
83 | QPixmap volumePixmap; | ||
84 | QTimer *advancedTimer; | ||
85 | |||
73 | void readSystemVolume(); | 86 | void readSystemVolume(); |
74 | void writeSystemVolume(); | 87 | void writeSystemVolume(); |
@@ -76,10 +89,12 @@ private: | |||
76 | void paintEvent( QPaintEvent* ); | 89 | void paintEvent( QPaintEvent* ); |
77 | 90 | ||
78 | private: | 91 | void readSystemMic(); |
79 | int volumePercent; | 92 | void keyPressEvent ( QKeyEvent * e ); |
80 | bool muted; | 93 | void mouseReleaseEvent( QMouseEvent *); |
81 | QPixmap volumePixmap; | 94 | void writeSystemMic(); |
95 | |||
82 | }; | 96 | }; |
83 | 97 | ||
84 | 98 | ||
85 | #endif // __VOLUME_APPLET_H__ | 99 | #endif // __VOLUME_APPLET_H__ |
100 | |||