summaryrefslogtreecommitdiff
path: root/core/applets/volumeapplet
Unidiff
Diffstat (limited to 'core/applets/volumeapplet') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp20
-rw-r--r--core/applets/volumeapplet/volume.h1
-rw-r--r--core/applets/volumeapplet/volumeapplet.pro4
-rw-r--r--core/applets/volumeapplet/volumeappletimpl.cpp65
-rw-r--r--core/applets/volumeapplet/volumeappletimpl.h43
5 files changed, 15 insertions, 118 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
@@ -18,16 +18,15 @@
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>
@@ -35,13 +34,10 @@
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
@@ -737,6 +733,10 @@ VolumeApplet::~VolumeApplet()
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{
@@ -777,3 +777,7 @@ void VolumeApplet::paintEvent ( QPaintEvent * )
777} 777}
778 778
779 779
780Q_EXPORT_INTERFACE()
781{
782 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VolumeApplet> );
783}
diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h
index d2345b5..454a688 100644
--- a/core/applets/volumeapplet/volume.h
+++ b/core/applets/volumeapplet/volume.h
@@ -117,6 +117,7 @@ class VolumeApplet : public QWidget {
117public: 117public:
118 VolumeApplet ( QWidget *parent = 0, const char *name=0 ); 118 VolumeApplet ( QWidget *parent = 0, const char *name=0 );
119 ~VolumeApplet ( ); 119 ~VolumeApplet ( );
120 static int position();
120 121
121 void redraw ( bool all = true ); 122 void redraw ( bool all = true );
122 123
diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro
index 92c6b0a..b14956e 100644
--- a/core/applets/volumeapplet/volumeapplet.pro
+++ b/core/applets/volumeapplet/volumeapplet.pro
@@ -1,7 +1,7 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt plugin warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS= volume.h volumeappletimpl.h oledbox.h 3 HEADERS = volume.h oledbox.h
4 SOURCES= volume.cpp volumeappletimpl.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
diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp
deleted file mode 100644
index 9c7dea3..0000000
--- a/core/applets/volumeapplet/volumeappletimpl.cpp
+++ b/dev/null
@@ -1,65 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "volume.h"
21#include "volumeappletimpl.h"
22
23VolumeAppletImpl::VolumeAppletImpl()
24 : volume(0)
25{
26}
27
28VolumeAppletImpl::~VolumeAppletImpl()
29{
30 delete volume;
31}
32
33QWidget *VolumeAppletImpl::applet( QWidget *parent )
34{
35 if ( !volume )
36 volume = new VolumeApplet( parent );
37 return volume;
38}
39
40int VolumeAppletImpl::position() const
41{
42 return 6;
43}
44
45QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
46{
47 *iface = 0;
48 if ( uuid == IID_QUnknown )
49 *iface = this;
50 else if ( uuid == IID_TaskbarApplet )
51 *iface = this;
52 else
53 return QS_FALSE;
54
55 if ( *iface )
56 (*iface)->addRef();
57 return QS_OK;
58}
59
60Q_EXPORT_INTERFACE()
61{
62 Q_CREATE_INSTANCE( VolumeAppletImpl )
63}
64
65
diff --git a/core/applets/volumeapplet/volumeappletimpl.h b/core/applets/volumeapplet/volumeappletimpl.h
deleted file mode 100644
index a9221c6..0000000
--- a/core/applets/volumeapplet/volumeappletimpl.h
+++ b/dev/null
@@ -1,43 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef VOLUMEAPPLETIMPL_H
21#define VOLUMEAPPLETIMPL_H
22
23#include <qpe/taskbarappletinterface.h>
24
25class VolumeApplet;
26
27class VolumeAppletImpl : public TaskbarAppletInterface
28{
29public:
30 VolumeAppletImpl();
31 virtual ~VolumeAppletImpl();
32
33 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
34 Q_REFCOUNT
35
36 virtual QWidget *applet( QWidget *parent );
37 virtual int position() const;
38
39private:
40 VolumeApplet *volume;
41};
42
43#endif