summaryrefslogtreecommitdiff
path: root/core/applets/irdaapplet/irda.cpp
Unidiff
Diffstat (limited to 'core/applets/irdaapplet/irda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/irdaapplet/irda.cpp17
1 files changed, 15 insertions, 2 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
@@ -11,30 +11,33 @@
11** 11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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>
29#include <sys/types.h> 34#include <sys/types.h>
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
37IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) 40IrdaApplet::IrdaApplet ( QWidget *parent, const char *name )
38 : QWidget ( parent, name ) 41 : QWidget ( parent, name )
39{ 42{
40 setFixedHeight ( 18 ); 43 setFixedHeight ( 18 );
@@ -57,12 +60,17 @@ IrdaApplet::IrdaApplet ( QWidget *parent, const char *name )
57 60
58 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); 61 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this );
59 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), 62 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ),
60 this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) ); 63 this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) );
61} 64}
62 65
66int IrdaApplet::position()
67{
68 return 6;
69}
70
63void IrdaApplet::show() 71void IrdaApplet::show()
64{ 72{
65 QWidget::show ( ); 73 QWidget::show ( );
66 startTimer ( 2000 ); 74 startTimer ( 2000 );
67} 75}
68 76
@@ -347,6 +355,11 @@ void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ar ) {
347 for (it = m_devices.begin(); it != m_devices.end(); ++it ) 355 for (it = m_devices.begin(); it != m_devices.end(); ++it )
348 list << (*it); 356 list << (*it);
349 357
350 e << list; 358 e << list;
351 } 359 }
352} 360}
361
362Q_EXPORT_INTERFACE()
363{
364 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<IrdaApplet> );
365}