kitchensync

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 <qdom.h>
00027 
00028 #include "configgui.h"
00029 
00030 class QCheckBox;
00031 class QLabel;
00032 class QPushButton;
00033 class QSpinBox;
00034 
00035 class KComboBox;
00036 class KLineEdit;
00037 
00038 class BluetoothWidget : public QWidget
00039 {
00040   Q_OBJECT
00041 
00042   public:
00043     BluetoothWidget( QWidget *parent );
00044 
00045     void hideChannel();
00046     void showChannel();
00047 
00048     void setAddress( const QString address );
00049     void setChannel( const QString  channel );
00050     QString address() const;
00051     QString channel() const;
00052 
00053   private:
00054     KLineEdit *mAddress;
00055     KLineEdit *mChannel;
00056     QLabel *mChannelLabel;
00057 };
00058 
00059 class IRWidget : public QWidget
00060 {
00061   Q_OBJECT
00062 
00063   public:
00064     IRWidget( QWidget *parent );
00065 
00066     void load( const QDomElement& );
00067     void save( QDomDocument&, QDomElement& );
00068 
00069   private:
00070     KLineEdit *mDevice;
00071     KLineEdit *mSerialNumber;
00072 };
00073 
00074 class CableWidget : public QWidget
00075 {
00076   public:
00077     CableWidget( QWidget *parent );
00078 
00079     void load( const QDomElement& );
00080     void save( QDomDocument&, QDomElement& );
00081 
00082   private:
00083     KComboBox *mManufacturer;
00084     KComboBox *mDevice;
00085 };
00086 
00087 class UsbWidget : public QWidget
00088 {
00089   public:
00090     UsbWidget( QWidget *parent );
00091 
00092     int interface() const;
00093     void setInterface( int interface );
00094 
00095   private:
00096     QSpinBox *mInterface;
00097 };
00098 
00099 #endif // CONNECTIONWIDGETS_H