00001 00002 #ifndef BLUEBASE_H 00003 #define BLUEBASE_H 00004 00005 #include <qvariant.h> 00006 #include <qwidget.h> 00007 #include <qscrollview.h> 00008 #include <qsplitter.h> 00009 #include <qlist.h> 00010 #include <qpixmap.h> 00011 00012 #include "bluetoothbase.h" 00013 00014 #include "btserviceitem.h" 00015 #include "btdeviceitem.h" 00016 00017 #include "popuphelper.h" 00018 00019 #include "bticonloader.h" 00020 00021 #include <remotedevice.h> 00022 #include <manager.h> 00023 00024 class QVBox; 00025 class QHBoxLayout; 00026 class QGridLayout; 00027 class QFrame; 00028 class QLabel; 00029 class QPushButton; 00030 class QTabWidget; 00031 class QCheckBox; 00032 class BTConnectionItem; 00033 00034 00035 namespace OpieTooth { 00036 00037 class BlueBase : public BluetoothBase { 00038 Q_OBJECT 00039 00040 public: 00041 BlueBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00042 ~BlueBase(); 00043 00044 static QString appName() { return QString::fromLatin1("bluetooth-manager"); } 00045 00046 protected: 00047 00048 00049 private slots: 00050 void startScan(); 00051 00052 00053 private: 00054 bool find( const RemoteDevice& device ); 00055 void readConfig(); 00056 void writeConfig(); 00057 void readSavedDevices(); 00058 void writeSavedDevices(); 00059 void writeToHciConfig(); 00060 QString status()const; 00061 void initGui(); 00062 void setInfo(); 00063 00064 PopupHelper m_popHelper; 00065 Manager *m_localDevice; 00066 QMap<QString,BTDeviceItem*> m_deviceList; 00067 00068 void deviceActive( const RemoteDevice &device ); 00069 00070 QString m_deviceName; 00071 QString m_defaultPasskey; 00072 bool m_useEncryption; 00073 bool m_enableAuthentification; 00074 bool m_enablePagescan; 00075 bool m_enableInquiryscan; 00076 00077 QPixmap m_offPix; 00078 QPixmap m_onPix; 00079 QPixmap m_findPix; 00080 00081 BTIconLoader *m_iconLoader; 00082 00083 private slots: 00084 void addSearchedDevices( const QValueList<RemoteDevice> &newDevices ); 00085 void addServicesToDevices(); 00086 void addServicesToDevice( BTDeviceItem *item ); 00087 void addServicesToDevice( const QString& device, Services::ValueList ); 00088 void addConnectedDevices(); 00089 void addConnectedDevices( ConnectionState::ValueList ); 00090 void startServiceActionClicked( QListViewItem *item ); 00091 void startServiceActionHold( QListViewItem *, const QPoint &, int ); 00092 void deviceActive( const QString& mac, bool connected ); 00093 void applyConfigChanges(); 00094 void addSignalStrength(); 00095 void addSignalStrength( const QString& mac, const QString& strengh ); 00096 void rfcommDialog(); 00097 00098 }; 00099 00100 } 00101 00102 #endif
1.4.2