-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 17 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.h | 1 | ||||
-rw-r--r-- | core/applets/irdaapplet/irdaapplet.pro | 14 | ||||
-rw-r--r-- | core/applets/irdaapplet/irdaappletimpl.cpp | 66 | ||||
-rw-r--r-- | core/applets/irdaapplet/irdaappletimpl.h | 45 |
5 files changed, 23 insertions, 120 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index a47f33d..afc0592 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -14,15 +14,20 @@ | |||
14 | ** | 14 | ** |
15 | **********************************************************************/ | 15 | **********************************************************************/ |
16 | 16 | ||
17 | #include "irda.h" | ||
17 | 18 | ||
19 | /* OPIE */ | ||
20 | #include <opie2/otaskbarapplet.h> | ||
18 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
19 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
20 | 23 | ||
24 | /* QT */ | ||
21 | #include <qpainter.h> | 25 | #include <qpainter.h> |
22 | #include <qfile.h> | 26 | #include <qfile.h> |
23 | #include <qtimer.h> | 27 | #include <qtimer.h> |
24 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
25 | 29 | ||
30 | /* STD */ | ||
26 | #include <unistd.h> | 31 | #include <unistd.h> |
27 | #include <net/if.h> | 32 | #include <net/if.h> |
28 | #include <netinet/in.h> | 33 | #include <netinet/in.h> |
@@ -30,8 +35,6 @@ | |||
30 | #include <sys/socket.h> | 35 | #include <sys/socket.h> |
31 | #include <sys/ioctl.h> | 36 | #include <sys/ioctl.h> |
32 | 37 | ||
33 | #include "irda.h" | ||
34 | |||
35 | //=========================================================================== | 38 | //=========================================================================== |
36 | 39 | ||
37 | IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) | 40 | IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) |
@@ -60,6 +63,11 @@ IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) | |||
60 | this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) ); | 63 | this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) ); |
61 | } | 64 | } |
62 | 65 | ||
66 | int IrdaApplet::position() | ||
67 | { | ||
68 | return 6; | ||
69 | } | ||
70 | |||
63 | void IrdaApplet::show() | 71 | void IrdaApplet::show() |
64 | { | 72 | { |
65 | QWidget::show ( ); | 73 | QWidget::show ( ); |
@@ -350,3 +358,8 @@ void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ar ) { | |||
350 | e << list; | 358 | e << list; |
351 | } | 359 | } |
352 | } | 360 | } |
361 | |||
362 | Q_EXPORT_INTERFACE() | ||
363 | { | ||
364 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<IrdaApplet> ); | ||
365 | } | ||
diff --git a/core/applets/irdaapplet/irda.h b/core/applets/irdaapplet/irda.h index ec1d32c..f713bbe 100644 --- a/core/applets/irdaapplet/irda.h +++ b/core/applets/irdaapplet/irda.h | |||
@@ -28,6 +28,7 @@ class IrdaApplet : public QWidget | |||
28 | public: | 28 | public: |
29 | IrdaApplet( QWidget *parent = 0, const char *name = 0 ); | 29 | IrdaApplet( QWidget *parent = 0, const char *name = 0 ); |
30 | ~IrdaApplet(); | 30 | ~IrdaApplet(); |
31 | static int position(); | ||
31 | 32 | ||
32 | virtual void show ( ); | 33 | virtual void show ( ); |
33 | 34 | ||
diff --git a/core/applets/irdaapplet/irdaapplet.pro b/core/applets/irdaapplet/irdaapplet.pro index 4e94dfb..31e8691 100644 --- a/core/applets/irdaapplet/irdaapplet.pro +++ b/core/applets/irdaapplet/irdaapplet.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 = irda.h irdaappletimpl.h | 3 | HEADERS = irda.h |
4 | SOURCES = irda.cpp irdaappletimpl.cpp | 4 | SOURCES = irda.cpp |
5 | TARGET = irdaapplet | 5 | TARGET = irdaapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include | 8 | DEPENDPATH += ../$(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
diff --git a/core/applets/irdaapplet/irdaappletimpl.cpp b/core/applets/irdaapplet/irdaappletimpl.cpp deleted file mode 100644 index 33d98af..0000000 --- a/core/applets/irdaapplet/irdaappletimpl.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 "irda.h" | ||
21 | #include "irdaappletimpl.h" | ||
22 | |||
23 | |||
24 | IrdaAppletImpl::IrdaAppletImpl() | ||
25 | : irda(0) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | IrdaAppletImpl::~IrdaAppletImpl() | ||
30 | { | ||
31 | delete irda; | ||
32 | } | ||
33 | |||
34 | QWidget *IrdaAppletImpl::applet( QWidget *parent ) | ||
35 | { | ||
36 | if ( !irda ) | ||
37 | irda = new IrdaApplet( parent ); | ||
38 | return irda; | ||
39 | } | ||
40 | |||
41 | int IrdaAppletImpl::position() const | ||
42 | { | ||
43 | return 6; | ||
44 | } | ||
45 | |||
46 | QRESULT IrdaAppletImpl::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 | |||
61 | Q_EXPORT_INTERFACE() | ||
62 | { | ||
63 | Q_CREATE_INSTANCE( IrdaAppletImpl ) | ||
64 | } | ||
65 | |||
66 | |||
diff --git a/core/applets/irdaapplet/irdaappletimpl.h b/core/applets/irdaapplet/irdaappletimpl.h deleted file mode 100644 index 024cc06..0000000 --- a/core/applets/irdaapplet/irdaappletimpl.h +++ b/dev/null | |||
@@ -1,45 +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 IRDAAPPLETIMPL_H | ||
21 | #define IRDAAPPLETIMPL_H | ||
22 | |||
23 | #include <qwidget.h> | ||
24 | |||
25 | #include <qpe/taskbarappletinterface.h> | ||
26 | |||
27 | class IrdaApplet; | ||
28 | |||
29 | class IrdaAppletImpl : public TaskbarAppletInterface | ||
30 | { | ||
31 | public: | ||
32 | IrdaAppletImpl(); | ||
33 | virtual ~IrdaAppletImpl(); | ||
34 | |||
35 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | ||
36 | Q_REFCOUNT | ||
37 | |||
38 | virtual QWidget *applet( QWidget *parent ); | ||
39 | virtual int position() const; | ||
40 | |||
41 | private: | ||
42 | IrdaApplet *irda; | ||
43 | }; | ||
44 | |||
45 | #endif | ||