-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 @@ -15,8 +15,12 @@ **********************************************************************/ +#include "irda.h" +/* OPIE */ +#include <opie2/otaskbarapplet.h> #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> +/* QT */ #include <qpainter.h> #include <qfile.h> @@ -24,4 +28,5 @@ #include <qtextstream.h> +/* STD */ #include <unistd.h> #include <net/if.h> @@ -31,6 +36,4 @@ #include <sys/ioctl.h> -#include "irda.h" - //=========================================================================== @@ -61,4 +64,9 @@ IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) } +int IrdaApplet::position() +{ + return 6; +} + void IrdaApplet::show() { @@ -351,2 +359,7 @@ void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ar ) { } } + +Q_EXPORT_INTERFACE() +{ + Q_CREATE_INSTANCE( OTaskbarAppletWrapper<IrdaApplet> ); +} 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 @@ -29,4 +29,5 @@ public: IrdaApplet( QWidget *parent = 0, const char *name = 0 ); ~IrdaApplet(); + static int position(); virtual void show ( ); 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,9 +1,9 @@ -TEMPLATE = lib -CONFIG += qt plugin warn_on release -HEADERS = irda.h irdaappletimpl.h -SOURCES = irda.cpp irdaappletimpl.cpp -TARGET = irdaapplet -DESTDIR = $(OPIEDIR)/plugins/applets -INCLUDEPATH += $(OPIEDIR)/include +TEMPLATE = lib +CONFIG += qt plugin warn_on release +HEADERS = irda.h +SOURCES = irda.cpp +TARGET = irdaapplet +DESTDIR = $(OPIEDIR)/plugins/applets +INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe 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 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** 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 "irda.h" -#include "irdaappletimpl.h" - - -IrdaAppletImpl::IrdaAppletImpl() - : irda(0) -{ -} - -IrdaAppletImpl::~IrdaAppletImpl() -{ - delete irda; -} - -QWidget *IrdaAppletImpl::applet( QWidget *parent ) -{ - if ( !irda ) - irda = new IrdaApplet( parent ); - return irda; -} - -int IrdaAppletImpl::position() const -{ - return 6; -} - -QRESULT IrdaAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) -{ - *iface = 0; - if ( uuid == IID_QUnknown ) - *iface = this; - else if ( uuid == IID_TaskbarApplet ) - *iface = this; - else - return QS_FALSE; - - if ( *iface ) - (*iface)->addRef(); - return QS_OK; -} - -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( IrdaAppletImpl ) -} - - 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 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** 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. -** -**********************************************************************/ -#ifndef IRDAAPPLETIMPL_H -#define IRDAAPPLETIMPL_H - -#include <qwidget.h> - -#include <qpe/taskbarappletinterface.h> - -class IrdaApplet; - -class IrdaAppletImpl : public TaskbarAppletInterface -{ -public: - IrdaAppletImpl(); - virtual ~IrdaAppletImpl(); - - QRESULT queryInterface( const QUuid&, QUnknownInterface** ); - Q_REFCOUNT - - virtual QWidget *applet( QWidget *parent ); - virtual int position() const; - -private: - IrdaApplet *irda; -}; - -#endif |