author | llornkcor <llornkcor> | 2002-03-24 14:17:54 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-24 14:17:54 (UTC) |
commit | 032a2e2e88b60b8ef06f247709c117195fcab09a (patch) (unidiff) | |
tree | bd1cd69bb5418059f6830fc633f6cf23343f696d /core/applets/volumeapplet/volume.h | |
parent | 927d5f33cc4c36541d7fb7dde036bdd22f5d7253 (diff) | |
download | opie-032a2e2e88b60b8ef06f247709c117195fcab09a.zip opie-032a2e2e88b60b8ef06f247709c117195fcab09a.tar.gz opie-032a2e2e88b60b8ef06f247709c117195fcab09a.tar.bz2 |
added buttons from Markus (list)
Diffstat (limited to 'core/applets/volumeapplet/volume.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volume.h | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h index cb0be72..a982f53 100644 --- a/core/applets/volumeapplet/volume.h +++ b/core/applets/volumeapplet/volume.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the 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 |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
@@ -25,25 +25,33 @@ | |||
25 | #include <qframe.h> | 25 | #include <qframe.h> |
26 | #include <qpixmap.h> | 26 | #include <qpixmap.h> |
27 | #include <qguardedptr.h> | 27 | #include <qguardedptr.h> |
28 | #include <qtimer.h> | ||
29 | 28 | ||
30 | class QSlider; | 29 | class QSlider; |
31 | class QCheckBox; | 30 | class QCheckBox; |
31 | class QPushButton; | ||
32 | class QTimer; | ||
32 | 33 | ||
33 | class VolumeControl : public QFrame | 34 | class VolumeControl : public QFrame |
34 | { | 35 | { |
35 | Q_OBJECT | 36 | Q_OBJECT |
36 | public: | 37 | public: |
37 | VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 ); | 38 | VolumeControl( QWidget *parent=0, const char *name=0 ); |
38 | 39 | ||
39 | public: | 40 | public: |
40 | QSlider *slider; | 41 | QSlider *slider; |
41 | QSlider *mic; | ||
42 | QCheckBox *muteBox; | 42 | QCheckBox *muteBox; |
43 | 43 | ||
44 | private: | 44 | private: |
45 | void keyPressEvent( QKeyEvent * ); | 45 | void keyPressEvent( QKeyEvent * ); |
46 | void createView(bool showMic = FALSE); | 46 | |
47 | private slots: | ||
48 | void ButtonChanged(); | ||
49 | void rateTimerDone(); | ||
50 | |||
51 | private: | ||
52 | QPushButton *upButton; | ||
53 | QPushButton *downButton; | ||
54 | QTimer *rateTimer; | ||
47 | }; | 55 | }; |
48 | 56 | ||
49 | class VolumeApplet : public QWidget | 57 | class VolumeApplet : public QWidget |
@@ -57,37 +65,21 @@ public: | |||
57 | 65 | ||
58 | public slots: | 66 | public slots: |
59 | void volumeChanged( bool muted ); | 67 | void volumeChanged( bool muted ); |
60 | void micChanged( bool muted ); | ||
61 | |||
62 | void setVolume( int percent ); | 68 | void setVolume( int percent ); |
63 | void setMic( int percent ); | ||
64 | |||
65 | void sliderMoved( int percent ); | 69 | void sliderMoved( int percent ); |
66 | void micMoved( int percent ); | ||
67 | void mute( bool ); | 70 | void mute( bool ); |
68 | 71 | ||
69 | void showVolControl(bool showMic = FALSE); | ||
70 | void advVolControl(); | ||
71 | |||
72 | private: | 72 | private: |
73 | void readSystemVolume(); | 73 | void readSystemVolume(); |
74 | void readSystemMic(); | ||
75 | |||
76 | void writeSystemVolume(); | 74 | void writeSystemVolume(); |
77 | void writeSystemMic(); | ||
78 | |||
79 | void keyPressEvent ( QKeyEvent * e ); | ||
80 | void mousePressEvent( QMouseEvent * ); | 75 | void mousePressEvent( QMouseEvent * ); |
81 | void mouseReleaseEvent( QMouseEvent *); | ||
82 | void paintEvent( QPaintEvent* ); | 76 | void paintEvent( QPaintEvent* ); |
83 | 77 | ||
84 | private: | 78 | private: |
85 | int volumePercent, micPercent; | 79 | int volumePercent; |
86 | bool muted, micMuted; | 80 | bool muted; |
87 | QPixmap volumePixmap; | 81 | QPixmap volumePixmap; |
88 | QTimer *advancedTimer; | ||
89 | }; | 82 | }; |
90 | 83 | ||
91 | 84 | ||
92 | #endif // __VOLUME_APPLET_H__ | 85 | #endif // __VOLUME_APPLET_H__ |
93 | |||