00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef __OPIETOOTH2APPLET_H__
00030 #define __OPIETOOTH2APPLET_H__
00031
00032 #include <qwidget.h>
00033 #include <qpixmap.h>
00034 #include <qlabel.h>
00035 #include <qtimer.h>
00036
00037 namespace Opietooth2 {
00038
00039 class OTGateway;
00040
00041 class MessagePanel : public QLabel {
00042
00043 Q_OBJECT
00044
00045 public:
00046
00047 MessagePanel( const QString & Msg,
00048 QWidget* parent = 0,
00049 const char* name=0);
00050
00051 void popup( QWidget* parent = 0);
00052
00053 protected:
00054
00055 virtual void mouseReleaseEvent( QMouseEvent * );
00056 virtual void closeEvent( QCloseEvent * );
00057
00058 private:
00059
00060 QWidget* popupParent;
00061 int moves;
00062
00063 };
00064
00065 class Opietooth2Applet : public QWidget {
00066
00067 Q_OBJECT
00068
00069 public:
00070
00071 Opietooth2Applet( QWidget *parent = 0, const char *name=0 );
00072 ~Opietooth2Applet();
00073
00074 public slots:
00075
00076
00077 void SLOT_StateChange( bool );
00078 void SLOT_Error( const QString & );
00079
00080 private:
00081
00082 void mousePressEvent( QMouseEvent * );
00083 void paintEvent( QPaintEvent* );
00084
00085 void launchManager();
00086
00087 private:
00088
00089 OTGateway * OT;
00090 QPixmap OnP;
00091 QPixmap OffP;
00092
00093 };
00094
00095 };
00096
00097
00098 #endif
00099