author | sandman <sandman> | 2002-06-27 12:56:22 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-27 12:56:22 (UTC) |
commit | 56d22ac17fdc194a20fd0deba673943f85e940ea (patch) (side-by-side diff) | |
tree | 564c333bfa77e1dbae9a553e2c208eecefdeea1e /core/applets/irdaapplet/irda.h | |
parent | 88b644d1c106008fc15f6a3c496e40296e9029d4 (diff) | |
download | opie-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.h | 81 |
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,71 +1,72 @@ /********************************************************************** -** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com +** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com, +** Robert Griebl sandman@handhelds.org ** All rights reserved. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ -#ifndef SCREENSHOT_APPLET_H__ -#define SCREENSHOT_APPLET_H__ - - +#ifndef __OPIE_IRDA_APPLET_H__ +#define __OPIE_IRDA_APPLET_H__ #include <qwidget.h> -#include <qframe.h> #include <qpixmap.h> -#include <qguardedptr.h> -#include <qtimer.h> -#include <qfile.h> #include <qpopupmenu.h> -#include <qdict.h> +#include <qmap.h> class IrdaApplet : public QWidget { - Q_OBJECT + Q_OBJECT + public: - IrdaApplet( QWidget *parent = 0, const char *name=0 ); - ~IrdaApplet(); + IrdaApplet( QWidget *parent = 0, const char *name = 0 ); + ~IrdaApplet(); + + virtual void show ( ); protected: - void timerEvent(QTimerEvent *te ); + virtual void timerEvent ( QTimerEvent * ); + virtual void mousePressEvent ( QMouseEvent * ); + virtual void paintEvent ( QPaintEvent* ); + +private slots: + void popupTimeout ( ); private: - void mousePressEvent( QMouseEvent * ); - void paintEvent( QPaintEvent* ); - int checkIrdaStatus(); - int setIrdaStatus(int); - int checkIrdaDiscoveryStatus(); - int setIrdaDiscoveryStatus(int); - int setIrdaReceiveStatus(int); - void showDiscovered(); - int sockfd; + void popup( QString message, QString icon = QString::null ); -public slots: - void show(); - -private slots: - void popupTimeout(); + bool checkIrdaStatus ( ); + bool setIrdaStatus ( bool ); + bool checkIrdaDiscoveryStatus (); + bool setIrdaDiscoveryStatus ( bool ); + bool setIrdaReceiveStatus ( bool ); + void showDiscovered(); + private: - QPixmap irdaOnPixmap; - QPixmap irdaOffPixmap; - QPixmap irdaDiscoveryOnPixmap; - QPixmap receiveActivePixmap; - int irdaactive; // bool and bitfields later bool irdaactive :1 ; - int irdaDiscoveryActive; - bool receiveActive : 1; - bool receiveStateChanged; - QPopupMenu *popupMenu; - void popup(QString message, QString icon=""); - QDict<QString> devicesAvailable; + QPixmap m_irdaOnPixmap; + QPixmap m_irdaOffPixmap; + QPixmap m_irdaDiscoveryOnPixmap; + QPixmap m_receiveActivePixmap; + + bool m_irda_active; + bool m_irda_discovery_active; + bool m_receive_active; + bool m_receive_state_changed; + + QPopupMenu *m_popup; + + int m_sockfd; + + QMap <QString, QString> m_devices; }; -#endif // __SCREENSHOT_APPLET_H__ +#endif // __OPIE_IRDA_APPLET_H__ |