author | erik <erik> | 2007-03-06 01:25:46 (UTC) |
---|---|---|
committer | erik <erik> | 2007-03-06 01:25:46 (UTC) |
commit | f6b4fc71812aa4db9c7209e28667010d1f04d771 (patch) (unidiff) | |
tree | 77bc5b50326ba2d525684eaf46b671b82defcf3c /core/applets/irdaapplet/irda.h | |
parent | 3efe70df6fdaf32a8213ceadbdd1679a0a658934 (diff) | |
download | opie-f6b4fc71812aa4db9c7209e28667010d1f04d771.zip opie-f6b4fc71812aa4db9c7209e28667010d1f04d771.tar.gz opie-f6b4fc71812aa4db9c7209e28667010d1f04d771.tar.bz2 |
Reworked to fit into the Opie style guidelines.
Diffstat (limited to 'core/applets/irdaapplet/irda.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.h | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/core/applets/irdaapplet/irda.h b/core/applets/irdaapplet/irda.h index f713bbe..2cbf4f7 100644 --- a/core/applets/irdaapplet/irda.h +++ b/core/applets/irdaapplet/irda.h | |||
@@ -1,77 +1,75 @@ | |||
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 | static int position(); |
32 | 32 | ||
33 | virtual void show ( ); | 33 | virtual void show ( ); |
34 | 34 | ||
35 | protected: | 35 | protected: |
36 | virtual void timerEvent ( QTimerEvent * ); | 36 | virtual void timerEvent ( QTimerEvent * ); |
37 | virtual void mousePressEvent ( QMouseEvent * ); | 37 | virtual void mousePressEvent ( QMouseEvent * ); |
38 | virtual void paintEvent ( QPaintEvent* ); | 38 | virtual void paintEvent ( QPaintEvent* ); |
39 | 39 | ||
40 | private slots: | 40 | private slots: |
41 | void popupTimeout ( ); | 41 | void popupTimeout ( ); |
42 | void slotMessage( const QCString& , const QByteArray& ); | 42 | void slotMessage( const QCString& , const QByteArray& ); |
43 | 43 | ||
44 | private: | 44 | private: |
45 | void popup( QString message, QString icon = QString::null ); | 45 | void popup( QString message, QString icon = QString::null ); |
46 | 46 | ||
47 | bool checkIrdaStatus ( ); | 47 | bool checkIrdaStatus ( ); |
48 | bool setIrdaStatus ( bool ); | 48 | bool setIrdaStatus ( bool ); |
49 | bool checkIrdaDiscoveryStatus (); | 49 | bool checkIrdaDiscoveryStatus (); |
50 | bool setIrdaDiscoveryStatus ( bool ); | 50 | bool setIrdaDiscoveryStatus ( bool ); |
51 | bool setIrdaReceiveStatus ( bool ); | 51 | bool setIrdaReceiveStatus ( bool ); |
52 | 52 | ||
53 | void showDiscovered(); | 53 | void showDiscovered(); |
54 | 54 | ||
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; | ||
60 | 59 | ||
61 | bool m_irda_active; | 60 | bool m_irda_active; |
62 | bool m_irda_discovery_active; | 61 | bool m_irda_discovery_active; |
63 | bool m_receive_active; | 62 | bool m_receive_active; |
64 | bool m_receive_state_changed; | 63 | bool m_receive_state_changed; |
65 | 64 | ||
66 | QPopupMenu *m_popup; | 65 | QPopupMenu *m_popup; |
67 | 66 | ||
68 | int m_sockfd; | 67 | int m_sockfd; |
69 | 68 | ||
70 | QMap <QString, QString> m_devices; | 69 | QMap <QString, QString> m_devices; |
71 | 70 | ||
72 | bool m_wasOn; // if IrDa was enabled | 71 | bool m_wasOn; ///< If IrDA was enabled this is true |
73 | bool m_wasDiscover; | 72 | bool m_wasDiscover; |
74 | }; | 73 | }; |
75 | |||
76 | |||
77 | #endif // __OPIE_IRDA_APPLET_H__ | 74 | #endif // __OPIE_IRDA_APPLET_H__ |
75 | |||