Diffstat (limited to 'core/applets/irdaapplet/irda.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 | |||
@@ -1,76 +1,77 @@ | |||
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 | ** Robert Griebl sandman@handhelds.org |
4 | ** All rights reserved. | 4 | ** All rights reserved. |
5 | ** | 5 | ** |
6 | ** 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 |
7 | ** GNU General Public License version 2 as published by the Free Software | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef __OPIE_IRDA_APPLET_H__ | 16 | #ifndef __OPIE_IRDA_APPLET_H__ |
17 | #define __OPIE_IRDA_APPLET_H__ | 17 | #define __OPIE_IRDA_APPLET_H__ |
18 | 18 | ||
19 | #include <qwidget.h> | 19 | #include <qwidget.h> |
20 | #include <qpixmap.h> | 20 | #include <qpixmap.h> |
21 | #include <qpopupmenu.h> | 21 | #include <qpopupmenu.h> |
22 | #include <qmap.h> | 22 | #include <qmap.h> |
23 | 23 | ||
24 | class IrdaApplet : public QWidget | 24 | class IrdaApplet : public QWidget |
25 | { | 25 | { |
26 | Q_OBJECT | 26 | Q_OBJECT |
27 | 27 | ||
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 | ||
34 | protected: | 35 | protected: |
35 | virtual void timerEvent ( QTimerEvent * ); | 36 | virtual void timerEvent ( QTimerEvent * ); |
36 | virtual void mousePressEvent ( QMouseEvent * ); | 37 | virtual void mousePressEvent ( QMouseEvent * ); |
37 | virtual void paintEvent ( QPaintEvent* ); | 38 | virtual void paintEvent ( QPaintEvent* ); |
38 | 39 | ||
39 | private slots: | 40 | private slots: |
40 | void popupTimeout ( ); | 41 | void popupTimeout ( ); |
41 | void slotMessage( const QCString& , const QByteArray& ); | 42 | void slotMessage( const QCString& , const QByteArray& ); |
42 | 43 | ||
43 | private: | 44 | private: |
44 | void popup( QString message, QString icon = QString::null ); | 45 | void popup( QString message, QString icon = QString::null ); |
45 | 46 | ||
46 | bool checkIrdaStatus ( ); | 47 | bool checkIrdaStatus ( ); |
47 | bool setIrdaStatus ( bool ); | 48 | bool setIrdaStatus ( bool ); |
48 | bool checkIrdaDiscoveryStatus (); | 49 | bool checkIrdaDiscoveryStatus (); |
49 | bool setIrdaDiscoveryStatus ( bool ); | 50 | bool setIrdaDiscoveryStatus ( bool ); |
50 | bool setIrdaReceiveStatus ( bool ); | 51 | bool setIrdaReceiveStatus ( bool ); |
51 | 52 | ||
52 | void showDiscovered(); | 53 | void showDiscovered(); |
53 | 54 | ||
54 | private: | 55 | private: |
55 | QPixmap m_irdaOnPixmap; | 56 | QPixmap m_irdaOnPixmap; |
56 | QPixmap m_irdaOffPixmap; | 57 | QPixmap m_irdaOffPixmap; |
57 | QPixmap m_irdaDiscoveryOnPixmap; | 58 | QPixmap m_irdaDiscoveryOnPixmap; |
58 | QPixmap m_receiveActivePixmap; | 59 | QPixmap m_receiveActivePixmap; |
59 | 60 | ||
60 | bool m_irda_active; | 61 | bool m_irda_active; |
61 | bool m_irda_discovery_active; | 62 | bool m_irda_discovery_active; |
62 | bool m_receive_active; | 63 | bool m_receive_active; |
63 | bool m_receive_state_changed; | 64 | bool m_receive_state_changed; |
64 | 65 | ||
65 | QPopupMenu *m_popup; | 66 | QPopupMenu *m_popup; |
66 | 67 | ||
67 | int m_sockfd; | 68 | int m_sockfd; |
68 | 69 | ||
69 | QMap <QString, QString> m_devices; | 70 | QMap <QString, QString> m_devices; |
70 | 71 | ||
71 | bool m_wasOn; // if IrDa was enabled | 72 | bool m_wasOn; // if IrDa was enabled |
72 | bool m_wasDiscover; | 73 | bool m_wasDiscover; |
73 | }; | 74 | }; |
74 | 75 | ||
75 | 76 | ||
76 | #endif // __OPIE_IRDA_APPLET_H__ | 77 | #endif // __OPIE_IRDA_APPLET_H__ |