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; version 2 of the License. 00010 ._= =} : 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 __BLUEZAPPLET_H__ 00030 #define __BLUEZAPPLET_H__ 00031 00032 #include <qwidget.h> 00033 #include <qpixmap.h> 00034 #include <qtimer.h> 00035 #include <manager.h> 00036 00037 namespace OpieTooth { 00038 class Device; 00039 00040 class BluezApplet : public QWidget { 00041 Q_OBJECT 00042 public: 00043 BluezApplet( QWidget *parent = 0, const char *name=0 ); 00044 ~BluezApplet(); 00045 static int position(); 00046 protected: 00047 void timerEvent(QTimerEvent *te ); 00048 00049 public slots: 00050 void fillList( const QString& device, RemoteDevice::ValueList list ); 00051 00052 private: 00053 void mousePressEvent( QMouseEvent * ); 00054 void paintEvent( QPaintEvent* ); 00055 void launchManager(); 00056 bool checkBluezStatus(); 00057 int setBluezStatus(int); 00058 int checkBluezDiscoveryStatus(); 00059 int setBluezDiscoveryStatus(int); 00060 00061 private: 00062 Device* btDevice; 00063 Manager *btManager; 00064 QPixmap bluezOnPixmap; 00065 QPixmap bluezOffPixmap; 00066 QPixmap bluezDiscoveryOnPixmap; 00067 bool bluezactive; 00068 bool bluezDiscoveryActive; 00069 00070 private slots: 00071 void slotMessage( const QCString& , const QByteArray& ); 00072 00073 00074 }; 00075 }; 00076 00077 00078 #endif 00079
1.4.2