summaryrefslogtreecommitdiff
path: root/core/applets/irdaapplet/irda.h
authorsandman <sandman>2002-06-27 12:56:22 (UTC)
committer sandman <sandman>2002-06-27 12:56:22 (UTC)
commit56d22ac17fdc194a20fd0deba673943f85e940ea (patch) (unidiff)
tree564c333bfa77e1dbae9a553e2c208eecefdeea1e /core/applets/irdaapplet/irda.h
parent88b644d1c106008fc15f6a3c496e40296e9029d4 (diff)
downloadopie-56d22ac17fdc194a20fd0deba673943f85e940ea.zip
opie-56d22ac17fdc194a20fd0deba673943f85e940ea.tar.gz
opie-56d22ac17fdc194a20fd0deba673943f85e940ea.tar.bz2
Fix an endless loop error when device is lost.
Diffstat (limited to 'core/applets/irdaapplet/irda.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/irdaapplet/irda.h81
1 files changed, 41 insertions, 40 deletions
diff --git a/core/applets/irdaapplet/irda.h b/core/applets/irdaapplet/irda.h
index e878946..1b5faa6 100644
--- a/core/applets/irdaapplet/irda.h
+++ b/core/applets/irdaapplet/irda.h
@@ -1,5 +1,6 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com 2** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com,
3** Robert Griebl sandman@handhelds.org
3** All rights reserved. 4** All rights reserved.
4** 5**
5** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
@@ -12,60 +13,60 @@
12** 13**
13**********************************************************************/ 14**********************************************************************/
14 15
15#ifndef SCREENSHOT_APPLET_H__ 16#ifndef __OPIE_IRDA_APPLET_H__
16#define SCREENSHOT_APPLET_H__ 17#define __OPIE_IRDA_APPLET_H__
17
18
19 18
20#include <qwidget.h> 19#include <qwidget.h>
21#include <qframe.h>
22#include <qpixmap.h> 20#include <qpixmap.h>
23#include <qguardedptr.h>
24#include <qtimer.h>
25#include <qfile.h>
26#include <qpopupmenu.h> 21#include <qpopupmenu.h>
27#include <qdict.h> 22#include <qmap.h>
28 23
29class IrdaApplet : public QWidget 24class IrdaApplet : public QWidget
30{ 25{
31 Q_OBJECT 26 Q_OBJECT
27
32public: 28public:
33 IrdaApplet( QWidget *parent = 0, const char *name=0 ); 29 IrdaApplet( QWidget *parent = 0, const char *name = 0 );
34 ~IrdaApplet(); 30 ~IrdaApplet();
31
32 virtual void show ( );
35 33
36protected: 34protected:
37 void timerEvent(QTimerEvent *te ); 35 virtual void timerEvent ( QTimerEvent * );
36 virtual void mousePressEvent ( QMouseEvent * );
37 virtual void paintEvent ( QPaintEvent* );
38
39private slots:
40 void popupTimeout ( );
38 41
39private: 42private:
40 void mousePressEvent( QMouseEvent * ); 43 void popup( QString message, QString icon = QString::null );
41 void paintEvent( QPaintEvent* );
42 int checkIrdaStatus();
43 int setIrdaStatus(int);
44 int checkIrdaDiscoveryStatus();
45 int setIrdaDiscoveryStatus(int);
46 int setIrdaReceiveStatus(int);
47 void showDiscovered();
48 int sockfd;
49 44
50public slots: 45 bool checkIrdaStatus ( );
51 void show(); 46 bool setIrdaStatus ( bool );
52 47 bool checkIrdaDiscoveryStatus ();
53private slots: 48 bool setIrdaDiscoveryStatus ( bool );
54 void popupTimeout(); 49 bool setIrdaReceiveStatus ( bool );
55 50
51 void showDiscovered();
52
56private: 53private:
57 QPixmap irdaOnPixmap; 54 QPixmap m_irdaOnPixmap;
58 QPixmap irdaOffPixmap; 55 QPixmap m_irdaOffPixmap;
59 QPixmap irdaDiscoveryOnPixmap; 56 QPixmap m_irdaDiscoveryOnPixmap;
60 QPixmap receiveActivePixmap; 57 QPixmap m_receiveActivePixmap;
61 int irdaactive; // bool and bitfields later bool irdaactive :1 ; 58
62 int irdaDiscoveryActive; 59 bool m_irda_active;
63 bool receiveActive : 1; 60 bool m_irda_discovery_active;
64 bool receiveStateChanged; 61 bool m_receive_active;
65 QPopupMenu *popupMenu; 62 bool m_receive_state_changed;
66 void popup(QString message, QString icon=""); 63
67 QDict<QString> devicesAvailable; 64 QPopupMenu *m_popup;
65
66 int m_sockfd;
67
68 QMap <QString, QString> m_devices;
68}; 69};
69 70
70 71
71#endif // __SCREENSHOT_APPLET_H__ 72#endif // __OPIE_IRDA_APPLET_H__