summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h
index 9fc12d8..3a2da43 100644
--- a/core/applets/volumeapplet/volume.h
+++ b/core/applets/volumeapplet/volume.h
@@ -1,100 +1,101 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of 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
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
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef __VOLUME_APPLET_H__ 21#ifndef __VOLUME_APPLET_H__
22#define __VOLUME_APPLET_H__ 22#define __VOLUME_APPLET_H__
23 23
24 24
25#include <qwidget.h> 25#include <qwidget.h>
26#include <qpushbutton.h>
26#include <qframe.h> 27#include <qframe.h>
27#include <qpixmap.h> 28#include <qpixmap.h>
28#include <qguardedptr.h> 29#include <qguardedptr.h>
29#include <qtimer.h> 30#include <qtimer.h>
30 31
31class QSlider; 32class QSlider;
32class QCheckBox; 33class QCheckBox;
33 34
34class VolumeControl : public QFrame 35class VolumeControl : public QFrame
35{ 36{
36 Q_OBJECT 37 Q_OBJECT
37public: 38public:
38 VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 ); 39 VolumeControl( bool showMic=FALSE, QWidget *parent=0, const char *name=0 );
39 40
40public: 41public:
41 QSlider *slider; 42 QSlider *slider;
42 QSlider *mic; 43 QSlider *mic;
43 QCheckBox *muteBox; 44 QCheckBox *muteBox;
44 45
45private: 46private:
46 QPushButton *upButton; 47 QPushButton *upButton;
47 QPushButton *downButton; 48 QPushButton *downButton;
48 QTimer *rateTimer; 49 QTimer *rateTimer;
49 50
50 void keyPressEvent( QKeyEvent * ); 51 void keyPressEvent( QKeyEvent * );
51 void createView(bool showMic = FALSE); 52 void createView(bool showMic = FALSE);
52private slots: 53private slots:
53 void ButtonChanged(); 54 void ButtonChanged();
54 void rateTimerDone(); 55 void rateTimerDone();
55 56
56}; 57};
57 58
58class VolumeApplet : public QWidget 59class VolumeApplet : public QWidget
59{ 60{
60 Q_OBJECT 61 Q_OBJECT
61public: 62public:
62 VolumeApplet( QWidget *parent = 0, const char *name=0 ); 63 VolumeApplet( QWidget *parent = 0, const char *name=0 );
63 ~VolumeApplet(); 64 ~VolumeApplet();
64 bool isMute( ) { return muted; } 65 bool isMute( ) { return muted; }
65 int percent( ) { return volumePercent; } 66 int percent( ) { return volumePercent; }
66 67
67public slots: 68public slots:
68 void volumeChanged( bool muted ); 69 void volumeChanged( bool muted );
69 void micChanged( bool muted ); 70 void micChanged( bool muted );
70 void sliderMoved( int percent ); 71 void sliderMoved( int percent );
71 void mute( bool ); 72 void mute( bool );
72 73
73 void micMoved( int percent ); 74 void micMoved( int percent );
74 void setVolume( int percent ); 75 void setVolume( int percent );
75 void setMic( int percent ); 76 void setMic( int percent );
76 77
77 void showVolControl(bool showMic = FALSE); 78 void showVolControl(bool showMic = FALSE);
78 void advVolControl(); 79 void advVolControl();
79 80
80private: 81private:
81 int volumePercent, micPercent; 82 int volumePercent, micPercent;
82 bool muted, micMuted; 83 bool muted, micMuted;
83 QPixmap volumePixmap; 84 QPixmap volumePixmap;
84 QTimer *advancedTimer; 85 QTimer *advancedTimer;
85 86
86 void readSystemVolume(); 87 void readSystemVolume();
87 void writeSystemVolume(); 88 void writeSystemVolume();
88 void mousePressEvent( QMouseEvent * ); 89 void mousePressEvent( QMouseEvent * );
89 void paintEvent( QPaintEvent* ); 90 void paintEvent( QPaintEvent* );
90 91
91 void readSystemMic(); 92 void readSystemMic();
92 void keyPressEvent ( QKeyEvent * e ); 93 void keyPressEvent ( QKeyEvent * e );
93 void mouseReleaseEvent( QMouseEvent *); 94 void mouseReleaseEvent( QMouseEvent *);
94 void writeSystemMic(); 95 void writeSystemMic();
95 96
96}; 97};
97 98
98 99
99#endif // __VOLUME_APPLET_H__ 100#endif // __VOLUME_APPLET_H__
100 101