summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 19e71c5..d871a35 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -17,65 +17,64 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "volume.h" 22#include "volume.h"
23 23
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 27#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
28#include <qpe/qcopenvelope_qws.h> 28#include <qpe/qcopenvelope_qws.h>
29#endif 29#endif
30 30
31#include <qpainter.h> 31#include <qpainter.h>
32#include <qcheckbox.h> 32#include <qcheckbox.h>
33#include <qslider.h> 33#include <qslider.h>
34#include <qlayout.h> 34#include <qlayout.h>
35#include <qframe.h> 35#include <qframe.h>
36#include <qpixmap.h> 36#include <qpixmap.h>
37#include <qlabel.h> 37#include <qlabel.h>
38 38
39#include <qpushbutton.h> 39#include <qpushbutton.h>
40#include <qtimer.h> 40#include <qtimer.h>
41 41
42#define RATE_TIMER_INTERVAL 100 42#define RATE_TIMER_INTERVAL 100
43// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time 43// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time
44// results in "hanging" buttons on the iPAQ due to quite high CPU consumption. 44// results in "hanging" buttons on the iPAQ due to quite high CPU consumption.
45 45
46VolumeControl::VolumeControl( bool showMic, QWidget *parent, const char *name ) 46VolumeControl::VolumeControl( bool showMic, QWidget *parent, const char *name )
47 : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) 47 : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup )
48{ 48{
49 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute
50 setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); 49 setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
51 createView(showMic); 50 createView(showMic);
52} 51}
53 52
54void VolumeControl::createView(bool showMic) 53void VolumeControl::createView(bool showMic)
55{ 54{
56 Config cfg("qpe"); 55 Config cfg("qpe");
57 cfg.setGroup("Volume"); 56 cfg.setGroup("Volume");
58//showMic = TRUE; 57//showMic = TRUE;
59 QHBoxLayout *hboxLayout = new QHBoxLayout(this); 58 QHBoxLayout *hboxLayout = new QHBoxLayout(this);
60 hboxLayout->setMargin( 3 ); 59 hboxLayout->setMargin( 3 );
61 hboxLayout->setSpacing( 0); 60 hboxLayout->setSpacing( 0);
62 61
63 QVBoxLayout *vboxButtons = new QVBoxLayout(this); 62 QVBoxLayout *vboxButtons = new QVBoxLayout(this);
64 upButton = new QPushButton( this ); 63 upButton = new QPushButton( this );
65 upButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 64 upButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
66 upButton->setPixmap( Resource::loadPixmap( "up" ) ); 65 upButton->setPixmap( Resource::loadPixmap( "up" ) );
67 downButton = new QPushButton( this ); 66 downButton = new QPushButton( this );
68 downButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 67 downButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
69 downButton->setPixmap( Resource::loadPixmap( "down" ) ); 68 downButton->setPixmap( Resource::loadPixmap( "down" ) );
70 vboxButtons->setSpacing( 2 ); 69 vboxButtons->setSpacing( 2 );
71 70
72 upButton->setFixedHeight(26); 71 upButton->setFixedHeight(26);
73 downButton->setFixedHeight(26); 72 downButton->setFixedHeight(26);
74 73
75 vboxButtons->addWidget( upButton ); 74 vboxButtons->addWidget( upButton );
76 vboxButtons->addWidget( downButton ); 75 vboxButtons->addWidget( downButton );
77 76
78 QVBoxLayout *vbox = new QVBoxLayout( this ); 77 QVBoxLayout *vbox = new QVBoxLayout( this );
79 QHBoxLayout *hbox = NULL; 78 QHBoxLayout *hbox = NULL;
80 79
81 slider = new QSlider( this ); 80 slider = new QSlider( this );