connectionwidgets.h
00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2005 Tobias Koenig <tokoe@kde.org> 00005 Copyright (c) 2006 Daniel Gollub <dgollub@suse.de> 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00020 USA. 00021 */ 00022 00023 #ifndef CONNECTIONWIDGETS_H 00024 #define CONNECTIONWIDGETS_H 00025 00026 #include <tqdom.h> 00027 00028 #include "configgui.h" 00029 00030 class TQCheckBox; 00031 class TQLabel; 00032 class TQPushButton; 00033 class TQSpinBox; 00034 00035 class KComboBox; 00036 class KLineEdit; 00037 00038 class BluetoothWidget : public TQWidget 00039 { 00040 Q_OBJECT 00041 00042 00043 public: 00044 BluetoothWidget( TQWidget *parent ); 00045 00046 void hideChannel(); 00047 void showChannel(); 00048 00049 void setAddress( const TQString address ); 00050 void setChannel( const TQString channel ); 00051 TQString address() const; 00052 TQString channel() const; 00053 00054 private: 00055 KLineEdit *mAddress; 00056 KLineEdit *mChannel; 00057 TQLabel *mChannelLabel; 00058 }; 00059 00060 class IRWidget : public TQWidget 00061 { 00062 Q_OBJECT 00063 00064 00065 public: 00066 IRWidget( TQWidget *parent ); 00067 00068 void load( const TQDomElement& ); 00069 void save( TQDomDocument&, TQDomElement& ); 00070 00071 private: 00072 KLineEdit *mDevice; 00073 KLineEdit *mSerialNumber; 00074 }; 00075 00076 class CableWidget : public TQWidget 00077 { 00078 public: 00079 CableWidget( TQWidget *parent ); 00080 00081 void load( const TQDomElement& ); 00082 void save( TQDomDocument&, TQDomElement& ); 00083 00084 private: 00085 KComboBox *mManufacturer; 00086 KComboBox *mDevice; 00087 }; 00088 00089 class UsbWidget : public TQWidget 00090 { 00091 public: 00092 UsbWidget( TQWidget *parent ); 00093 00094 int interface() const; 00095 void setInterface( int interface ); 00096 00097 private: 00098 TQSpinBox *mInterface; 00099 }; 00100 00101 #endif // CONNECTIONWIDGETS_H