-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 12 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.h | 1 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.pro | 4 | ||||
-rw-r--r-- | core/applets/vmemo/vmemoimpl.cpp | 61 | ||||
-rw-r--r-- | core/applets/vmemo/vmemoimpl.h | 40 |
5 files changed, 15 insertions, 103 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index fe8ebfd..563d110 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -62,4 +62,5 @@ struct adpcm_state encoder_state; | |||
62 | #include "vmemo.h" | 62 | #include "vmemo.h" |
63 | 63 | ||
64 | #include <opie2/otaskbarapplet.h> | ||
64 | #include <qpe/qpeapplication.h> | 65 | #include <qpe/qpeapplication.h> |
65 | #include <qpe/config.h> | 66 | #include <qpe/config.h> |
@@ -238,4 +239,9 @@ VMemo::~VMemo() { | |||
238 | } | 239 | } |
239 | 240 | ||
241 | int VMemo::position() | ||
242 | { | ||
243 | return 6; | ||
244 | } | ||
245 | |||
240 | void VMemo::receive( const QCString &msg, const QByteArray &data ) { | 246 | void VMemo::receive( const QCString &msg, const QByteArray &data ) { |
241 | qDebug("receive"); | 247 | qDebug("receive"); |
@@ -632,2 +638,8 @@ void VMemo::timerBreak() { | |||
632 | QMessageBox::message("Vmemo","Vmemo recording has ended"); | 638 | QMessageBox::message("Vmemo","Vmemo recording has ended"); |
633 | } | 639 | } |
640 | |||
641 | Q_EXPORT_INTERFACE() | ||
642 | { | ||
643 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VMemo> ); | ||
644 | } | ||
645 | |||
diff --git a/core/applets/vmemo/vmemo.h b/core/applets/vmemo/vmemo.h index 31d0a25..1bd735f 100644 --- a/core/applets/vmemo/vmemo.h +++ b/core/applets/vmemo/vmemo.h | |||
@@ -33,4 +33,5 @@ public: | |||
33 | VMemo( QWidget *parent, const char *name = NULL); | 33 | VMemo( QWidget *parent, const char *name = NULL); |
34 | ~VMemo(); | 34 | ~VMemo(); |
35 | static int position(); | ||
35 | QFile track; | 36 | QFile track; |
36 | int length; | 37 | int length; |
diff --git a/core/applets/vmemo/vmemo.pro b/core/applets/vmemo/vmemo.pro index f83a53f..2deedfd 100644 --- a/core/applets/vmemo/vmemo.pro +++ b/core/applets/vmemo/vmemo.pro | |||
@@ -1,6 +1,6 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt plugin warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = vmemo.h vmemoimpl.h adpcm.h | 3 | HEADERS = vmemo.h adpcm.h |
4 | SOURCES = vmemo.cpp vmemoimpl.cpp adpcm.c | 4 | SOURCES = vmemo.cpp adpcm.c |
5 | TARGET = vmemoapplet | 5 | TARGET = vmemoapplet |
6 | DESTDIR =$(OPIEDIR)/plugins/applets | 6 | DESTDIR =$(OPIEDIR)/plugins/applets |
diff --git a/core/applets/vmemo/vmemoimpl.cpp b/core/applets/vmemo/vmemoimpl.cpp deleted file mode 100644 index 7779b83..0000000 --- a/core/applets/vmemo/vmemoimpl.cpp +++ b/dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /**************************************************************************************94x78** | ||
2 | ** | ||
3 | ** This file may be distributed and/or modified under the terms of the | ||
4 | ** GNU General Public License version 2 as published by the Free Software | ||
5 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
6 | ** packaging of this file. | ||
7 | ** | ||
8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
10 | ** | ||
11 | *********************************************************************************************/ | ||
12 | |||
13 | /* | ||
14 | * $Id$ | ||
15 | */ | ||
16 | |||
17 | #include "vmemo.h" | ||
18 | #include "vmemoimpl.h" | ||
19 | |||
20 | |||
21 | VMemoAppletImpl::VMemoAppletImpl() | ||
22 | : vmemo(0) | ||
23 | { | ||
24 | } | ||
25 | |||
26 | VMemoAppletImpl::~VMemoAppletImpl() | ||
27 | { | ||
28 | delete vmemo; | ||
29 | } | ||
30 | |||
31 | QWidget *VMemoAppletImpl::applet( QWidget *parent ) | ||
32 | { | ||
33 | if ( !vmemo ) | ||
34 | vmemo = new VMemo( parent ); | ||
35 | return vmemo; | ||
36 | } | ||
37 | |||
38 | int VMemoAppletImpl::position() const | ||
39 | { | ||
40 | return 6; | ||
41 | } | ||
42 | |||
43 | QRESULT VMemoAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | ||
44 | { | ||
45 | *iface = 0; | ||
46 | if ( uuid == IID_QUnknown ) | ||
47 | *iface = this; | ||
48 | else if ( uuid == IID_TaskbarApplet ) | ||
49 | *iface = this; | ||
50 | else | ||
51 | return QS_FALSE; | ||
52 | |||
53 | if ( *iface ) | ||
54 | (*iface)->addRef(); | ||
55 | return QS_OK; | ||
56 | } | ||
57 | |||
58 | Q_EXPORT_INTERFACE() | ||
59 | { | ||
60 | Q_CREATE_INSTANCE( VMemoAppletImpl ) | ||
61 | } | ||
diff --git a/core/applets/vmemo/vmemoimpl.h b/core/applets/vmemo/vmemoimpl.h deleted file mode 100644 index 985138b..0000000 --- a/core/applets/vmemo/vmemoimpl.h +++ b/dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /**************************************************************************************94x78** | ||
2 | ** | ||
3 | ** This file may be distributed and/or modified under the terms of the | ||
4 | ** GNU General Public License version 2 as published by the Free Software | ||
5 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
6 | ** packaging of this file. | ||
7 | ** | ||
8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
10 | ** | ||
11 | *********************************************************************************************/ | ||
12 | |||
13 | /* | ||
14 | * $Id$ | ||
15 | */ | ||
16 | |||
17 | #ifndef __VMEMOIMPLAPPLETIMPL_H__ | ||
18 | #define __VMEMOIMPLAPPLETIMPL_H__ | ||
19 | |||
20 | #include <qpe/taskbarappletinterface.h> | ||
21 | |||
22 | class VMemo; | ||
23 | |||
24 | class VMemoAppletImpl : public TaskbarAppletInterface | ||
25 | { | ||
26 | public: | ||
27 | VMemoAppletImpl(); | ||
28 | virtual ~VMemoAppletImpl(); | ||
29 | |||
30 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | ||
31 | Q_REFCOUNT | ||
32 | |||
33 | virtual QWidget *applet( QWidget *parent ); | ||
34 | virtual int position() const; | ||
35 | |||
36 | private: | ||
37 | VMemo *vmemo; | ||
38 | }; | ||
39 | |||
40 | #endif | ||