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

opietoothapplet.h

Go to the documentation of this file.
00001 /*
00002                =.            This file is part of the OPIE Project
00003              .=l.            Copyright (c)  2002 Maximilian Reiss <max.reiss@gmx.de>
00004            .>+-=
00005  _;:,     .>    :=|.         This library is free software; you can
00006 .> <,   >  .   <=          redistribute it and/or  modify it under
00007 :=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00008 .="- .-=="i,     .._         License as published by the Free Software
00009  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00010      ._= =}       :          or (at your option) any later version.
00011     .%+i>       _;_.
00012     .i_,=:_.      -<s.       This library is distributed in the hope that
00013      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00014     : ..    .:,     . . .    without even the implied warranty of
00015     =_        +     =;=|    MERCHANTABILITY or FITNESS FOR A
00016   _.=:.       :    :=>:     PARTICULAR PURPOSE. See the GNU
00017 ..}^=.=       =       ;      Library General Public License for more
00018 ++=   -.     .     .:       details.
00019  :     =  ...= . :.=-
00020  -.   .:....=;==+<;          You should have received a copy of the GNU
00021   -_. . .   )=.  =           Library General Public License along with
00022     --        :-=           this library; see the file COPYING.LIB.
00023                              If not, write to the Free Software Foundation,
00024                              Inc., 59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
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     // sent when device changes state
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 

Generated on Sat Nov 5 16:17:56 2005 for OPIE by  doxygen 1.4.2