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) (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,3 +1,4 @@ /********************************************************************** -** 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. @@ -14,15 +15,9 @@ -#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> @@ -31,2 +26,3 @@ class IrdaApplet : public QWidget Q_OBJECT + public: @@ -35,34 +31,39 @@ public: + 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(); + bool checkIrdaStatus ( ); + bool setIrdaStatus ( bool ); + bool checkIrdaDiscoveryStatus (); + bool setIrdaDiscoveryStatus ( bool ); + bool setIrdaReceiveStatus ( bool ); -private slots: - void popupTimeout(); + 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; }; @@ -70,2 +71,2 @@ private: -#endif // __SCREENSHOT_APPLET_H__ +#endif // __OPIE_IRDA_APPLET_H__ |