Diffstat (limited to 'core/applets/volumeapplet/volume.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 20 |
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 @@ -13,40 +13,36 @@ ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include <stdio.h> - #include "volume.h" +#include "oledbox.h" +#include <opie2/odevice.h> +#include <opie2/otaskbarapplet.h> #include <qpe/resource.h> #include <qpe/applnk.h> #include <qpe/config.h> -#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) #include <qpe/qcopenvelope_qws.h> -#endif #include <qpainter.h> #include <qcheckbox.h> #include <qslider.h> #include <qlayout.h> #include <qvbox.h> #include <qlabel.h> - #include <qpushbutton.h> #include <qtimer.h> -#include <opie/odevice.h> - -#include "oledbox.h" +#include <stdio.h> using namespace Opie; #define RATE_TIMER_INTERVAL 100 // Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time // results in "hanging" buttons on the iPAQ due to quite high CPU consumption. @@ -732,16 +728,20 @@ VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) connect ( qApp, SIGNAL( micChanged ( bool )), m_dialog, SLOT ( micChanged( bool ))); } VolumeApplet::~VolumeApplet() { delete m_pixmap; } +int VolumeApplet::position() +{ + return 6; +} void VolumeApplet::mousePressEvent ( QMouseEvent * ) { if ( m_dialog-> isVisible ( )) m_dialog-> hide ( ); else m_dialog-> show ( true ); } @@ -772,8 +772,12 @@ void VolumeApplet::paintEvent ( QPaintEvent * ) p. drawLine ( 1, 2, width() - 2, height() - 5 ); p. drawLine ( 1, 3, width() - 2, height() - 4 ); p. drawLine ( width() - 2, 2, 1, height() - 5 ); p. drawLine ( width() - 2, 3, 1, height() - 4 ); } } +Q_EXPORT_INTERFACE() +{ + Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VolumeApplet> ); +} |