summaryrefslogtreecommitdiff
path: root/core/applets/clipboardapplet
Unidiff
Diffstat (limited to 'core/applets/clipboardapplet') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/clipboardapplet/clipboard.cpp11
-rw-r--r--core/applets/clipboardapplet/clipboard.h1
-rw-r--r--core/applets/clipboardapplet/clipboardapplet.pro4
-rw-r--r--core/applets/clipboardapplet/clipboardappletimpl.cpp66
-rw-r--r--core/applets/clipboardapplet/clipboardappletimpl.h43
5 files changed, 14 insertions, 111 deletions
diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp
index bb0db9b..34d151e 100644
--- a/core/applets/clipboardapplet/clipboard.cpp
+++ b/core/applets/clipboardapplet/clipboard.cpp
@@ -17,12 +17,13 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "clipboard.h" 21#include "clipboard.h"
22 22
23#include <opie2/otaskbarapplet.h>
23#include <qpe/resource.h> 24#include <qpe/resource.h>
24#include <qpe/applnk.h> 25#include <qpe/applnk.h>
25 26
26#include <qpainter.h> 27#include <qpainter.h>
27#include <qpopupmenu.h> 28#include <qpopupmenu.h>
28#include <qwindowsystem_qws.h> 29#include <qwindowsystem_qws.h>
@@ -57,12 +58,17 @@ ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget(
57} 58}
58 59
59ClipboardApplet::~ClipboardApplet ( ) 60ClipboardApplet::~ClipboardApplet ( )
60{ 61{
61} 62}
62 63
64int ClipboardApplet::position()
65{
66 return 6;
67}
68
63void ClipboardApplet::shutdown ( ) 69void ClipboardApplet::shutdown ( )
64{ 70{
65 // the timer has to be stopped, or Qt/E will hang on quit() 71 // the timer has to be stopped, or Qt/E will hang on quit()
66 // see launcher/desktop.cpp 72 // see launcher/desktop.cpp
67 73
68 m_timer-> stop ( ); 74 m_timer-> stop ( );
@@ -173,6 +179,11 @@ void ClipboardApplet::newData ( )
173 } 179 }
174 180
175 m_timer-> start ( 1500, true ); 181 m_timer-> start ( 1500, true );
176 182
177 excllock = false; 183 excllock = false;
178} 184}
185
186Q_EXPORT_INTERFACE()
187{
188 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ClipboardApplet> );
189}
diff --git a/core/applets/clipboardapplet/clipboard.h b/core/applets/clipboardapplet/clipboard.h
index ec87d39..bbda0ff 100644
--- a/core/applets/clipboardapplet/clipboard.h
+++ b/core/applets/clipboardapplet/clipboard.h
@@ -29,12 +29,13 @@ class QTimer;
29class ClipboardApplet : public QWidget 29class ClipboardApplet : public QWidget
30{ 30{
31 Q_OBJECT 31 Q_OBJECT
32public: 32public:
33 ClipboardApplet ( QWidget *parent = 0, const char *name=0 ); 33 ClipboardApplet ( QWidget *parent = 0, const char *name=0 );
34 ~ClipboardApplet ( ); 34 ~ClipboardApplet ( );
35 static int position();
35 36
36protected: 37protected:
37 void mousePressEvent ( QMouseEvent *); 38 void mousePressEvent ( QMouseEvent *);
38 void paintEvent ( QPaintEvent* ); 39 void paintEvent ( QPaintEvent* );
39 40
40private slots: 41private slots:
diff --git a/core/applets/clipboardapplet/clipboardapplet.pro b/core/applets/clipboardapplet/clipboardapplet.pro
index f6842a2..74cf48c 100644
--- a/core/applets/clipboardapplet/clipboardapplet.pro
+++ b/core/applets/clipboardapplet/clipboardapplet.pro
@@ -1,10 +1,10 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt plugin warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS= clipboard.h clipboardappletimpl.h 3 HEADERS = clipboard.h
4 SOURCES= clipboard.cpp clipboardappletimpl.cpp 4 SOURCES = clipboard.cpp
5 TARGET = clipboardapplet 5 TARGET = clipboardapplet
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
10 VERSION = 1.0.0 10 VERSION = 1.0.0
diff --git a/core/applets/clipboardapplet/clipboardappletimpl.cpp b/core/applets/clipboardapplet/clipboardappletimpl.cpp
deleted file mode 100644
index f454529..0000000
--- a/core/applets/clipboardapplet/clipboardappletimpl.cpp
+++ b/dev/null
@@ -1,66 +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 "clipboard.h"
21#include "clipboardappletimpl.h"
22
23
24ClipboardAppletImpl::ClipboardAppletImpl()
25 : clipboard(0)
26{
27}
28
29ClipboardAppletImpl::~ClipboardAppletImpl()
30{
31 delete clipboard;
32}
33
34QWidget *ClipboardAppletImpl::applet( QWidget *parent )
35{
36 if ( !clipboard )
37 clipboard = new ClipboardApplet( parent );
38 return clipboard;
39}
40
41int ClipboardAppletImpl::position() const
42{
43 return 6;
44}
45
46QRESULT ClipboardAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{
48 *iface = 0;
49 if ( uuid == IID_QUnknown )
50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this;
53 else
54 return QS_FALSE;
55
56 if ( *iface )
57 (*iface)->addRef();
58 return QS_OK;
59}
60
61Q_EXPORT_INTERFACE()
62{
63 Q_CREATE_INSTANCE( ClipboardAppletImpl )
64}
65
66
diff --git a/core/applets/clipboardapplet/clipboardappletimpl.h b/core/applets/clipboardapplet/clipboardappletimpl.h
deleted file mode 100644
index 497360c..0000000
--- a/core/applets/clipboardapplet/clipboardappletimpl.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 CLIPBOARDAPPLETIMPL_H
21#define CLIPBOARDAPPLETIMPL_H
22
23#include <qpe/taskbarappletinterface.h>
24
25class ClipboardApplet;
26
27class ClipboardAppletImpl : public TaskbarAppletInterface
28{
29public:
30 ClipboardAppletImpl();
31 virtual ~ClipboardAppletImpl();
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 ClipboardApplet *clipboard;
41};
42
43#endif