Diffstat (limited to 'core/applets/irdaapplet/irda.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.h | 73 |
1 files changed, 37 insertions, 36 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,4 +1,5 @@ | |||
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 | ** |
@@ -13,59 +14,59 @@ | |||
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 | ||
29 | class IrdaApplet : public QWidget | 24 | class IrdaApplet : public QWidget |
30 | { | 25 | { |
31 | Q_OBJECT | 26 | Q_OBJECT |
27 | |||
32 | public: | 28 | public: |
33 | IrdaApplet( QWidget *parent = 0, const char *name=0 ); | 29 | IrdaApplet( QWidget *parent = 0, const char *name=0 ); |
34 | ~IrdaApplet(); | 30 | ~IrdaApplet(); |
35 | 31 | ||
32 | virtual void show ( ); | ||
33 | |||
36 | protected: | 34 | protected: |
37 | void timerEvent(QTimerEvent *te ); | 35 | virtual void timerEvent ( QTimerEvent * ); |
36 | virtual void mousePressEvent ( QMouseEvent * ); | ||
37 | virtual void paintEvent ( QPaintEvent* ); | ||
38 | |||
39 | private slots: | ||
40 | void popupTimeout ( ); | ||
38 | 41 | ||
39 | private: | 42 | private: |
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 | ||
50 | public slots: | 45 | bool checkIrdaStatus ( ); |
51 | void show(); | 46 | bool setIrdaStatus ( bool ); |
47 | bool checkIrdaDiscoveryStatus (); | ||
48 | bool setIrdaDiscoveryStatus ( bool ); | ||
49 | bool setIrdaReceiveStatus ( bool ); | ||
52 | 50 | ||
53 | private slots: | 51 | void showDiscovered(); |
54 | void popupTimeout(); | ||
55 | 52 | ||
56 | private: | 53 | private: |
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__ |