summaryrefslogtreecommitdiff
path: root/core/applets/volumeapplet
Unidiff
Diffstat (limited to 'core/applets/volumeapplet') (more/less context) (show whitespace changes)
-rw-r--r--core/applets/volumeapplet/config.in2
-rw-r--r--core/applets/volumeapplet/volume.cpp8
-rw-r--r--core/applets/volumeapplet/volumeapplet.pro2
3 files changed, 5 insertions, 7 deletions
diff --git a/core/applets/volumeapplet/config.in b/core/applets/volumeapplet/config.in
index 1233d9f..f097591 100644
--- a/core/applets/volumeapplet/config.in
+++ b/core/applets/volumeapplet/config.in
@@ -1,4 +1,4 @@
1 config VOLUMEAPPLET 1 config VOLUMEAPPLET
2 boolean "opie-volumeapplet (set volume for microphone and speaker)" 2 boolean "opie-volumeapplet (set volume for microphone and speaker)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 942cebb..276f47f 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -30,32 +30,33 @@
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 <qvbox.h> 35#include <qvbox.h>
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qtimer.h> 38#include <qtimer.h>
39 39
40#include <stdio.h> 40#include <stdio.h>
41 41
42using namespace Opie; 42using namespace Opie::Core;
43 43
44#define RATE_TIMER_INTERVAL 100 44#define RATE_TIMER_INTERVAL 100
45// 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
46// 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.
47 47
48 48
49/* XPM */ 49/* XPM */
50using namespace Opie::Ui;
50static const char * vol_xpm[] = { 51static const char * vol_xpm[] = {
51"20 20 3 1", 52"20 20 3 1",
52" c None", 53" c None",
53". c #0000FF", 54". c #0000FF",
54"+ c #000000", 55"+ c #000000",
55" ", 56" ",
56" . ", 57" . ",
57" . . . . ", 58" . . . . ",
58" . . . . . . ", 59" . . . . . . ",
59" . . . . . . . ", 60" . . . . . . . ",
60" . . ..... . . ", 61" . . ..... . . ",
61" . ... ..... ... ", 62" . ... ..... ... ",
@@ -768,16 +769,13 @@ void VolumeApplet::paintEvent ( QPaintEvent * )
768 p. fillRect ( pixelsWide + 2, height() - 3, width() - 4 - pixelsWide, 2, lightGray ); 769 p. fillRect ( pixelsWide + 2, height() - 3, width() - 4 - pixelsWide, 2, lightGray );
769 770
770 if ( m_dialog-> volMuted ( )) { 771 if ( m_dialog-> volMuted ( )) {
771 p. setPen ( red ); 772 p. setPen ( red );
772 p. drawLine ( 1, 2, width() - 2, height() - 5 ); 773 p. drawLine ( 1, 2, width() - 2, height() - 5 );
773 p. drawLine ( 1, 3, width() - 2, height() - 4 ); 774 p. drawLine ( 1, 3, width() - 2, height() - 4 );
774 p. drawLine ( width() - 2, 2, 1, height() - 5 ); 775 p. drawLine ( width() - 2, 2, 1, height() - 5 );
775 p. drawLine ( width() - 2, 3, 1, height() - 4 ); 776 p. drawLine ( width() - 2, 3, 1, height() - 4 );
776 } 777 }
777} 778}
778 779
779 780
780Q_EXPORT_INTERFACE() 781EXPORT_OPIE_APPLET_v1( VolumeApplet )
781{
782 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VolumeApplet> );
783}
diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro
index b14956e..b478ed1 100644
--- a/core/applets/volumeapplet/volumeapplet.pro
+++ b/core/applets/volumeapplet/volumeapplet.pro
@@ -1,13 +1,13 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt plugin warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS = volume.h oledbox.h 3 HEADERS = volume.h oledbox.h
4 SOURCES = volume.cpp oledbox.cpp 4 SOURCES = volume.cpp oledbox.cpp
5 TARGET = volumeapplet 5 TARGET = volumeapplet
6 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += ../$(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe -lopiecore2
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12include ( $(OPIEDIR)/include.pro ) 12include ( $(OPIEDIR)/include.pro )
13target.path = $$prefix/plugins/applets 13target.path = $$prefix/plugins/applets