-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 44 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.h | 2 |
2 files changed, 42 insertions, 4 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index 28a79d1..e21f191 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -1,239 +1,275 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 David Woodhouse <dwmw2@infradead.org> | 2 | ** Copyright (C) 2002 David Woodhouse <dwmw2@infradead.org> |
3 | ** Heavily based on volumeapplet, (C) 2002 L.J. Potter ljp@llornkcor.com | 3 | ** Heavily based on volumeapplet, (C) 2002 L.J. Potter ljp@llornkcor.com |
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 | #include "irda.h" | 16 | #include "irda.h" |
17 | #include <qapplication.h> | 17 | #include <qapplication.h> |
18 | #include <stdlib.h> | 18 | #include <stdlib.h> |
19 | 19 | ||
20 | 20 | ||
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/timestring.h> | 23 | #include <qpe/timestring.h> |
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
26 | #include <qpe/applnk.h> | 26 | #include <qpe/applnk.h> |
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #include <qpe/ir.h> | 28 | #include <qpe/ir.h> |
29 | #include <qpe/qcopenvelope_qws.h> | 29 | #include <qpe/qcopenvelope_qws.h> |
30 | 30 | ||
31 | #include <qdir.h> | 31 | #include <qdir.h> |
32 | #include <qfileinfo.h> | 32 | #include <qfileinfo.h> |
33 | #include <qpoint.h> | 33 | #include <qpoint.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #include <qpainter.h> | 35 | #include <qpainter.h> |
36 | #include <qcombobox.h> | 36 | #include <qcombobox.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qslider.h> | 38 | #include <qslider.h> |
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | #include <qframe.h> | 40 | #include <qframe.h> |
41 | #include <qpixmap.h> | 41 | #include <qpixmap.h> |
42 | #include <qstring.h> | 42 | #include <qstring.h> |
43 | #include <qfile.h> | 43 | #include <qfile.h> |
44 | #include <qtimer.h> | 44 | #include <qtimer.h> |
45 | #include <qtextstream.h> | ||
45 | #include <qpopupmenu.h> | 46 | #include <qpopupmenu.h> |
46 | 47 | ||
47 | #include <net/if.h> | 48 | #include <net/if.h> |
48 | #include <netinet/in.h> | 49 | #include <netinet/in.h> |
49 | #include <sys/types.h> | 50 | #include <sys/types.h> |
50 | #include <sys/socket.h> | 51 | #include <sys/socket.h> |
51 | #include <sys/ioctl.h> | 52 | #include <sys/ioctl.h> |
52 | 53 | ||
53 | 54 | ||
54 | //=========================================================================== | 55 | //=========================================================================== |
55 | 56 | ||
56 | IrdaApplet::IrdaApplet( QWidget *parent, const char *name ) | 57 | IrdaApplet::IrdaApplet( QWidget *parent, const char *name ) |
57 | : QWidget( parent, name ) { | 58 | : QWidget( parent, name ) { |
58 | setFixedHeight( 18 ); | 59 | setFixedHeight( 18 ); |
59 | setFixedWidth( 14 ); | 60 | setFixedWidth( 14 ); |
60 | sockfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); | 61 | sockfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); |
61 | irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); | 62 | irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); |
62 | irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); | 63 | irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); |
63 | irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); | 64 | irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); |
64 | receiveActivePixmap = Resource::loadPixmap("irdaapplet/receive"); | 65 | receiveActivePixmap = Resource::loadPixmap("irdaapplet/receive"); |
65 | receiveActive = false; | 66 | receiveActive = false; |
66 | startTimer(5000); | 67 | startTimer(5000); |
67 | timerEvent(NULL); | 68 | timerEvent(NULL); |
68 | } | 69 | } |
69 | 70 | ||
70 | IrdaApplet::~IrdaApplet() { | 71 | IrdaApplet::~IrdaApplet() { |
71 | close(sockfd); | 72 | close(sockfd); |
72 | } | 73 | } |
73 | 74 | ||
74 | int IrdaApplet::checkIrdaStatus() { | 75 | int IrdaApplet::checkIrdaStatus() { |
75 | struct ifreq ifr; | 76 | struct ifreq ifr; |
76 | 77 | ||
77 | strcpy(ifr.ifr_name, "irda0"); | 78 | strcpy(ifr.ifr_name, "irda0"); |
78 | 79 | ||
79 | if (ioctl(sockfd, SIOCGIFFLAGS, &ifr)) | 80 | if (ioctl(sockfd, SIOCGIFFLAGS, &ifr)) |
80 | return -1; | 81 | return -1; |
81 | 82 | ||
82 | return (ifr.ifr_flags & IFF_UP)?1:0; | 83 | return (ifr.ifr_flags & IFF_UP)?1:0; |
83 | } | 84 | } |
84 | 85 | ||
85 | int IrdaApplet::setIrdaStatus(int c) { | 86 | int IrdaApplet::setIrdaStatus(int c) { |
86 | struct ifreq ifr; | 87 | struct ifreq ifr; |
87 | 88 | ||
88 | strcpy(ifr.ifr_name, "irda0"); | 89 | strcpy(ifr.ifr_name, "irda0"); |
89 | 90 | ||
90 | if (ioctl(sockfd, SIOCGIFFLAGS, &ifr)) | 91 | if (ioctl(sockfd, SIOCGIFFLAGS, &ifr)) |
91 | return -1; | 92 | return -1; |
92 | 93 | ||
93 | if (c) | 94 | if (c) |
94 | ifr.ifr_flags |= IFF_UP; | 95 | ifr.ifr_flags |= IFF_UP; |
95 | else | 96 | else |
96 | ifr.ifr_flags &= ~IFF_UP; | 97 | ifr.ifr_flags &= ~IFF_UP; |
97 | 98 | ||
98 | if (ioctl(sockfd, SIOCSIFFLAGS, &ifr)) | 99 | if (ioctl(sockfd, SIOCSIFFLAGS, &ifr)) |
99 | return -1; | 100 | return -1; |
100 | 101 | ||
101 | return 0; | 102 | return 0; |
102 | } | 103 | } |
103 | 104 | ||
104 | int IrdaApplet::checkIrdaDiscoveryStatus() { | 105 | int IrdaApplet::checkIrdaDiscoveryStatus() { |
105 | QFile discovery("/proc/sys/net/irda/discovery"); | 106 | QFile discovery("/proc/sys/net/irda/discovery"); |
106 | char status; | 107 | char status; |
107 | 108 | ||
108 | discovery.open( IO_ReadOnly|IO_Raw ); | 109 | discovery.open( IO_ReadOnly|IO_Raw ); |
109 | discovery.readBlock (&status, 1); | 110 | discovery.readBlock (&status, 1); |
110 | discovery.close(); | 111 | discovery.close(); |
111 | 112 | ||
112 | return atoi(&status); | 113 | return atoi(&status); |
113 | } | 114 | } |
114 | 115 | ||
115 | int IrdaApplet::setIrdaDiscoveryStatus(int d) { | 116 | int IrdaApplet::setIrdaDiscoveryStatus(int d) { |
116 | QFile discovery("/proc/sys/net/irda/discovery"); | 117 | QFile discovery("/proc/sys/net/irda/discovery"); |
117 | 118 | ||
118 | discovery.open( IO_WriteOnly|IO_Raw ); | 119 | discovery.open( IO_WriteOnly|IO_Raw ); |
119 | 120 | ||
120 | if (d) | 121 | if (d) |
121 | discovery.putch('1'); | 122 | discovery.putch('1'); |
122 | else | 123 | else |
123 | discovery.putch('0'); | 124 | discovery.putch('0'); |
124 | 125 | ||
125 | discovery.close(); | 126 | discovery.close(); |
126 | 127 | ||
127 | return 0; | 128 | return 0; |
128 | } | 129 | } |
129 | 130 | ||
130 | 131 | ||
132 | void IrdaApplet::showDiscovered() { | ||
133 | QFile discovery("/proc/net/irda/discovery"); | ||
134 | |||
135 | if (discovery.open(IO_ReadOnly) ) { | ||
136 | QStringList list; | ||
137 | // since it is /proc we _must_ use QTextStream | ||
138 | QTextStream stream ( &discovery); | ||
139 | QString streamIn; | ||
140 | streamIn = stream.read(); | ||
141 | list = QStringList::split("\n", streamIn); | ||
142 | |||
143 | for(QStringList::Iterator line=list.begin(); line!=list.end(); line++) { | ||
144 | if( (*line).startsWith("nickname:") ){ | ||
145 | discoveredDevice = (*line).mid(((*line).find(':'))+1,(*line).find(',')-(*line).find(':')-1); | ||
146 | qDebug(discoveredDevice); | ||
147 | } | ||
148 | } | ||
149 | } | ||
150 | |||
151 | } | ||
152 | |||
131 | void IrdaApplet::mousePressEvent( QMouseEvent *) { | 153 | void IrdaApplet::mousePressEvent( QMouseEvent *) { |
132 | QPopupMenu *menu = new QPopupMenu(); | 154 | QPopupMenu *menu = new QPopupMenu(); |
133 | QString cmd; | 155 | QString cmd; |
134 | int ret=0; | 156 | int ret=0; |
157 | showDiscovered(); | ||
135 | 158 | ||
136 | /* Refresh active state */ | 159 | /* Refresh active state */ |
137 | timerEvent(NULL); | 160 | timerEvent(NULL); |
138 | 161 | ||
139 | //menu->insertItem( tr("More..."), 4 ); | 162 | //menu->insertItem( tr("More..."), 4 ); |
140 | if (irdaactive) | 163 | |
164 | menu->insertItem( tr("Discovered Device:"), 9); | ||
165 | |||
166 | if ( !discoveredDevice.isEmpty() ) { | ||
167 | menu->insertItem( discoveredDevice ,7 ); | ||
168 | } else { | ||
169 | menu->insertItem( tr("None"), 8); | ||
170 | } | ||
171 | |||
172 | menu->insertSeparator(); | ||
173 | |||
174 | if (irdaactive) { | ||
141 | menu->insertItem( tr("Disable IrDA"), 0 ); | 175 | menu->insertItem( tr("Disable IrDA"), 0 ); |
142 | else | 176 | } else { |
143 | menu->insertItem( tr("Enable IrDA"), 1 ); | 177 | menu->insertItem( tr("Enable IrDA"), 1 ); |
178 | } | ||
144 | 179 | ||
145 | if (irdaDiscoveryActive) | 180 | if (irdaDiscoveryActive) { |
146 | menu->insertItem( tr("Disable Discovery"), 2 ); | 181 | menu->insertItem( tr("Disable Discovery"), 2 ); |
147 | else | 182 | } else { |
148 | menu->insertItem( tr("Enable Discovery"), 3 ); | 183 | menu->insertItem( tr("Enable Discovery"), 3 ); |
184 | } | ||
149 | 185 | ||
150 | if( receiveActive ){ | 186 | if( receiveActive ){ |
151 | menu->insertItem( tr("Disable Receive"), 5 ); | 187 | menu->insertItem( tr("Disable Receive"), 5 ); |
152 | } else { | 188 | } else { |
153 | menu->insertItem( tr("Enable Receive"), 4 ); | 189 | menu->insertItem( tr("Enable Receive"), 4 ); |
154 | } | 190 | } |
155 | 191 | ||
156 | QPoint p = mapToGlobal( QPoint(1, menu->sizeHint().height()-1) ); | 192 | QPoint p = mapToGlobal( QPoint(1, menu->sizeHint().height()-1) ); |
157 | ret = menu->exec(p, 2); | 193 | ret = menu->exec(p, 2); |
158 | 194 | ||
159 | qDebug("ret was %d\n", ret); | 195 | qDebug("ret was %d\n", ret); |
160 | 196 | ||
161 | switch(ret) { | 197 | switch(ret) { |
162 | case 0: | 198 | case 0: |
163 | setIrdaStatus(0); | 199 | setIrdaStatus(0); |
164 | timerEvent(NULL); | 200 | timerEvent(NULL); |
165 | break; | 201 | break; |
166 | case 1: | 202 | case 1: |
167 | setIrdaStatus(1); | 203 | setIrdaStatus(1); |
168 | timerEvent(NULL); | 204 | timerEvent(NULL); |
169 | break; | 205 | break; |
170 | case 2: | 206 | case 2: |
171 | setIrdaDiscoveryStatus(0); | 207 | setIrdaDiscoveryStatus(0); |
172 | timerEvent(NULL); | 208 | timerEvent(NULL); |
173 | break; | 209 | break; |
174 | case 3: | 210 | case 3: |
175 | setIrdaDiscoveryStatus(1); | 211 | setIrdaDiscoveryStatus(1); |
176 | timerEvent(NULL); // NULL is undefined in c++ use 0 or 0l | 212 | timerEvent(NULL); // NULL is undefined in c++ use 0 or 0l |
177 | break; | 213 | break; |
178 | case 4: { // enable receive | 214 | case 4: { // enable receive |
179 | qWarning("Enable receive" ); | 215 | qWarning("Enable receive" ); |
180 | QCopEnvelope e("QPE/Obex", "receive(int)" ); | 216 | QCopEnvelope e("QPE/Obex", "receive(int)" ); |
181 | e << 1; | 217 | e << 1; |
182 | receiveActive = true; | 218 | receiveActive = true; |
183 | receiveStateChanged = true; | 219 | receiveStateChanged = true; |
184 | timerEvent(NULL); | 220 | timerEvent(NULL); |
185 | break; | 221 | break; |
186 | } | 222 | } |
187 | case 5: { // disable receive | 223 | case 5: { // disable receive |
188 | qWarning("Disable receive" ); | 224 | qWarning("Disable receive" ); |
189 | QCopEnvelope e("QPE/Obex", "receive(int)" ); | 225 | QCopEnvelope e("QPE/Obex", "receive(int)" ); |
190 | e << 0; | 226 | e << 0; |
191 | receiveActive = false; | 227 | receiveActive = false; |
192 | receiveStateChanged = true; | 228 | receiveStateChanged = true; |
193 | timerEvent(NULL); | 229 | timerEvent(NULL); |
194 | break; | 230 | break; |
195 | } | 231 | } |
196 | case 6: | 232 | case 6: |
197 | qDebug("FIXME: Bring up pretty menu...\n"); | 233 | qDebug("FIXME: Bring up pretty menu...\n"); |
198 | // With table of currently-detected devices. | 234 | // With table of currently-detected devices. |
199 | } | 235 | } |
200 | delete menu; // Can somebody explain why use a QPopupMenu* and not QPopupMenu nor QAction. with out delete we will leak cause QPopupMenu doesn't have a parent in this case | 236 | delete menu; // Can somebody explain why use a QPopupMenu* and not QPopupMenu nor QAction. with out delete we will leak cause QPopupMenu doesn't have a parent in this case |
201 | } | 237 | } |
202 | 238 | ||
203 | void IrdaApplet::timerEvent( QTimerEvent * ) { | 239 | void IrdaApplet::timerEvent( QTimerEvent * ) { |
204 | int oldactive = irdaactive; | 240 | int oldactive = irdaactive; |
205 | int olddiscovery = irdaDiscoveryActive; | 241 | int olddiscovery = irdaDiscoveryActive; |
206 | bool receiveUpdate = false; | 242 | bool receiveUpdate = false; |
207 | 243 | ||
208 | if (receiveStateChanged) { | 244 | if (receiveStateChanged) { |
209 | receiveUpdate = true; | 245 | receiveUpdate = true; |
210 | receiveStateChanged = false; | 246 | receiveStateChanged = false; |
211 | } | 247 | } |
212 | 248 | ||
213 | irdaactive = checkIrdaStatus(); | 249 | irdaactive = checkIrdaStatus(); |
214 | irdaDiscoveryActive = checkIrdaDiscoveryStatus(); | 250 | irdaDiscoveryActive = checkIrdaDiscoveryStatus(); |
215 | 251 | ||
216 | if ((irdaactive != oldactive) || (irdaDiscoveryActive != olddiscovery) || receiveUpdate ) { | 252 | if ((irdaactive != oldactive) || (irdaDiscoveryActive != olddiscovery) || receiveUpdate ) { |
217 | paintEvent(NULL); | 253 | paintEvent(NULL); |
218 | } | 254 | } |
219 | 255 | ||
220 | } | 256 | } |
221 | 257 | ||
222 | void IrdaApplet::paintEvent( QPaintEvent* ) { | 258 | void IrdaApplet::paintEvent( QPaintEvent* ) { |
223 | QPainter p(this); | 259 | QPainter p(this); |
224 | qDebug("paint irda pixmap"); | 260 | qDebug("paint irda pixmap"); |
225 | 261 | ||
226 | p.eraseRect ( 0, 0, this->width(), this->height() ); | 262 | p.eraseRect ( 0, 0, this->width(), this->height() ); |
227 | if (irdaactive > 0) { | 263 | if (irdaactive > 0) { |
228 | p.drawPixmap( 0, 1, irdaOnPixmap ); | 264 | p.drawPixmap( 0, 1, irdaOnPixmap ); |
229 | } else { | 265 | } else { |
230 | p.drawPixmap( 0, 1, irdaOffPixmap ); | 266 | p.drawPixmap( 0, 1, irdaOffPixmap ); |
231 | } | 267 | } |
232 | 268 | ||
233 | if (irdaDiscoveryActive > 0) { | 269 | if (irdaDiscoveryActive > 0) { |
234 | p.drawPixmap( 0, 1, irdaDiscoveryOnPixmap ); | 270 | p.drawPixmap( 0, 1, irdaDiscoveryOnPixmap ); |
235 | } | 271 | } |
236 | if (receiveActive) { | 272 | if (receiveActive) { |
237 | p.drawPixmap( 0, 1, receiveActivePixmap); | 273 | p.drawPixmap( 0, 1, receiveActivePixmap); |
238 | } | 274 | } |
239 | } | 275 | } |
diff --git a/core/applets/irdaapplet/irda.h b/core/applets/irdaapplet/irda.h index 002d295..5822afe 100644 --- a/core/applets/irdaapplet/irda.h +++ b/core/applets/irdaapplet/irda.h | |||
@@ -1,63 +1,65 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com | 2 | ** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com |
3 | ** All rights reserved. | 3 | ** All rights reserved. |
4 | ** | 4 | ** |
5 | ** This file may be distributed and/or modified under the terms of the | 5 | ** This file may be distributed and/or modified under the terms of the |
6 | ** GNU General Public License version 2 as published by the Free Software | 6 | ** GNU General Public License version 2 as published by the Free Software |
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | 7 | ** Foundation and appearing in the file LICENSE.GPL included in the |
8 | ** packaging of this file. | 8 | ** packaging of this file. |
9 | ** | 9 | ** |
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
12 | ** | 12 | ** |
13 | **********************************************************************/ | 13 | **********************************************************************/ |
14 | 14 | ||
15 | #ifndef SCREENSHOT_APPLET_H__ | 15 | #ifndef SCREENSHOT_APPLET_H__ |
16 | #define SCREENSHOT_APPLET_H__ | 16 | #define SCREENSHOT_APPLET_H__ |
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | #include <qwidget.h> | 20 | #include <qwidget.h> |
21 | #include <qframe.h> | 21 | #include <qframe.h> |
22 | #include <qpixmap.h> | 22 | #include <qpixmap.h> |
23 | #include <qguardedptr.h> | 23 | #include <qguardedptr.h> |
24 | #include <qtimer.h> | 24 | #include <qtimer.h> |
25 | #include <qfile.h> | 25 | #include <qfile.h> |
26 | 26 | ||
27 | 27 | ||
28 | class IrdaApplet : public QWidget | 28 | class IrdaApplet : public QWidget |
29 | { | 29 | { |
30 | Q_OBJECT | 30 | Q_OBJECT |
31 | public: | 31 | public: |
32 | IrdaApplet( QWidget *parent = 0, const char *name=0 ); | 32 | IrdaApplet( QWidget *parent = 0, const char *name=0 ); |
33 | ~IrdaApplet(); | 33 | ~IrdaApplet(); |
34 | 34 | ||
35 | protected: | 35 | protected: |
36 | void timerEvent(QTimerEvent *te ); | 36 | void timerEvent(QTimerEvent *te ); |
37 | 37 | ||
38 | private: | 38 | private: |
39 | void mousePressEvent( QMouseEvent * ); | 39 | void mousePressEvent( QMouseEvent * ); |
40 | void paintEvent( QPaintEvent* ); | 40 | void paintEvent( QPaintEvent* ); |
41 | int checkIrdaStatus(); | 41 | int checkIrdaStatus(); |
42 | int setIrdaStatus(int); | 42 | int setIrdaStatus(int); |
43 | int checkIrdaDiscoveryStatus(); | 43 | int checkIrdaDiscoveryStatus(); |
44 | int setIrdaDiscoveryStatus(int); | 44 | int setIrdaDiscoveryStatus(int); |
45 | void showDiscovered(); | ||
45 | int sockfd; | 46 | int sockfd; |
46 | 47 | ||
47 | private: | 48 | private: |
48 | QPixmap irdaOnPixmap; | 49 | QPixmap irdaOnPixmap; |
49 | QPixmap irdaOffPixmap; | 50 | QPixmap irdaOffPixmap; |
50 | QPixmap irdaDiscoveryOnPixmap; | 51 | QPixmap irdaDiscoveryOnPixmap; |
51 | QPixmap receiveActivePixmap; | 52 | QPixmap receiveActivePixmap; |
53 | QString discoveredDevice; | ||
52 | int irdaactive; // bool and bitfields later bool irdaactive :1 ; | 54 | int irdaactive; // bool and bitfields later bool irdaactive :1 ; |
53 | int irdaDiscoveryActive; | 55 | int irdaDiscoveryActive; |
54 | bool receiveActive : 1; | 56 | bool receiveActive : 1; |
55 | bool receiveStateChanged; | 57 | bool receiveStateChanged; |
56 | private slots: | 58 | private slots: |
57 | 59 | ||
58 | 60 | ||
59 | }; | 61 | }; |
60 | 62 | ||
61 | 63 | ||
62 | #endif // __SCREENSHOT_APPLET_H__ | 64 | #endif // __SCREENSHOT_APPLET_H__ |
63 | 65 | ||