Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

irda.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com,
00003 **                    Robert Griebl sandman@handhelds.org
00004 **  All rights reserved.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 **********************************************************************/
00015 
00016 #ifndef __OPIE_IRDA_APPLET_H__
00017 #define __OPIE_IRDA_APPLET_H__
00018 
00019 #include <qwidget.h>
00020 #include <qpixmap.h>
00021 #include <qpopupmenu.h>
00022 #include <qmap.h>
00023 
00024 class IrdaApplet : public QWidget
00025 {
00026         Q_OBJECT
00027 
00028 public:
00029         IrdaApplet( QWidget *parent = 0, const char *name = 0 );
00030         ~IrdaApplet();
00031         static int position();
00032 
00033         virtual void show ( );
00034 
00035 protected:
00036         virtual void timerEvent ( QTimerEvent * );
00037         virtual void mousePressEvent ( QMouseEvent * );
00038         virtual void paintEvent ( QPaintEvent* );
00039 
00040 private slots:
00041         void popupTimeout ( );
00042         void slotMessage( const QCString& , const QByteArray& );
00043 
00044 private:
00045         void popup( QString message, QString icon = QString::null );
00046 
00047         bool checkIrdaStatus ( );
00048         bool setIrdaStatus ( bool );
00049         bool checkIrdaDiscoveryStatus ();
00050         bool setIrdaDiscoveryStatus ( bool );
00051         bool setIrdaReceiveStatus ( bool );
00052 
00053         void showDiscovered();
00054 
00055 private:
00056         QPixmap m_irdaOnPixmap;
00057         QPixmap m_irdaOffPixmap;
00058         QPixmap m_irdaDiscoveryOnPixmap;
00059         QPixmap m_receiveActivePixmap;
00060 
00061         bool m_irda_active;
00062         bool m_irda_discovery_active;
00063         bool m_receive_active;
00064         bool m_receive_state_changed;
00065 
00066         QPopupMenu *m_popup;
00067 
00068         int m_sockfd;
00069 
00070         QMap <QString, QString> m_devices;
00071 
00072                 bool m_wasOn; // if IrDa was enabled
00073         bool m_wasDiscover;
00074 };
00075 
00076 
00077 #endif // __OPIE_IRDA_APPLET_H__

Generated on Sat Nov 5 16:15:24 2005 for OPIE by  doxygen 1.4.2