summaryrefslogtreecommitdiff
path: root/core/applets/volumeapplet/volume.cpp
Unidiff
Diffstat (limited to 'core/applets/volumeapplet/volume.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index c736437..8fd88f6 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -15,36 +15,32 @@
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#include <stdio.h>
22
23#include "volume.h" 21#include "volume.h"
22#include "oledbox.h"
24 23
24#include <opie2/odevice.h>
25#include <opie2/otaskbarapplet.h>
25#include <qpe/resource.h> 26#include <qpe/resource.h>
26#include <qpe/applnk.h> 27#include <qpe/applnk.h>
27#include <qpe/config.h> 28#include <qpe/config.h>
28#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
29#include <qpe/qcopenvelope_qws.h> 29#include <qpe/qcopenvelope_qws.h>
30#endif
31 30
32#include <qpainter.h> 31#include <qpainter.h>
33#include <qcheckbox.h> 32#include <qcheckbox.h>
34#include <qslider.h> 33#include <qslider.h>
35#include <qlayout.h> 34#include <qlayout.h>
36#include <qvbox.h> 35#include <qvbox.h>
37#include <qlabel.h> 36#include <qlabel.h>
38
39#include <qpushbutton.h> 37#include <qpushbutton.h>
40#include <qtimer.h> 38#include <qtimer.h>
41 39
42#include <opie/odevice.h> 40#include <stdio.h>
43
44#include "oledbox.h"
45 41
46using namespace Opie; 42using namespace Opie;
47 43
48#define RATE_TIMER_INTERVAL 100 44#define RATE_TIMER_INTERVAL 100
49// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time 45// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time
50// results in "hanging" buttons on the iPAQ due to quite high CPU consumption. 46// results in "hanging" buttons on the iPAQ due to quite high CPU consumption.
@@ -734,12 +730,16 @@ VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
734 730
735VolumeApplet::~VolumeApplet() 731VolumeApplet::~VolumeApplet()
736{ 732{
737 delete m_pixmap; 733 delete m_pixmap;
738} 734}
739 735
736int VolumeApplet::position()
737{
738 return 6;
739}
740 740
741void VolumeApplet::mousePressEvent ( QMouseEvent * ) 741void VolumeApplet::mousePressEvent ( QMouseEvent * )
742{ 742{
743 if ( m_dialog-> isVisible ( )) 743 if ( m_dialog-> isVisible ( ))
744 m_dialog-> hide ( ); 744 m_dialog-> hide ( );
745 else 745 else
@@ -774,6 +774,10 @@ void VolumeApplet::paintEvent ( QPaintEvent * )
774 p. drawLine ( width() - 2, 2, 1, height() - 5 ); 774 p. drawLine ( width() - 2, 2, 1, height() - 5 );
775 p. drawLine ( width() - 2, 3, 1, height() - 4 ); 775 p. drawLine ( width() - 2, 3, 1, height() - 4 );
776 } 776 }
777} 777}
778 778
779 779
780Q_EXPORT_INTERFACE()
781{
782 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VolumeApplet> );
783}