src/qvgui/qvparamwidget.h

Go to the documentation of this file.
00001 /*
00002  *      Copyright (C) 2007, 2008. PARP Research Group.
00003  *      <http://perception.inf.um.es>
00004  *      University of Murcia, Spain.
00005  *
00006  *      This file is part of the QVision library.
00007  *
00008  *      QVision is free software: you can redistribute it and/or modify
00009  *      it under the terms of the GNU Lesser General Public License as
00010  *      published by the Free Software Foundation, version 3 of the License.
00011  *
00012  *      QVision 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 Lesser General Public License for more details.
00016  *
00017  *      You should have received a copy of the GNU Lesser General Public
00018  *      License along with QVision. If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00024 
00025 #ifndef QVPARAMWIDGET_H
00026 #define QVPARAMWIDGET_H
00027 
00028 #include <QWidget>
00029 #include <QToolButton>
00030 #include <QComboBox>
00031 #include <QLineEdit>
00032 
00033 #include <QVWorker>
00034 #include <QVIndexedStringList>
00035 
00036 class QLineEdit;
00037 class QSlider;
00038 class QwtSlider;
00039 class QCheckBox;
00040 
00041 #ifndef DOXYGEN_IGNORE_THIS
00042 
00050 class QVIntParamWidget: public QWidget
00051         {
00052         Q_OBJECT
00053         public:
00064                 QVIntParamWidget(QVPropertyContainer *orig_holder, QVPropertyContainer *gui_holder, const QString property, QWidget *parent = 0);
00065 
00066         signals:
00069                 void valueChanged(int);
00070 
00071         private slots:
00072                 void setValue();
00073 
00074         private:
00075                 int value,min,max;
00076                 QVPropertyContainer *orig_holder,*gui_holder;
00077                 QString property;
00078                 QLineEdit *lineedit;
00079                 QSlider *slider;
00080         };
00081 
00089 class QVDoubleParamWidget: public QWidget
00090         {
00091         Q_OBJECT
00092         public:
00103                 QVDoubleParamWidget(QVPropertyContainer *orig_holder, QVPropertyContainer *gui_holder, const QString property, QWidget *parent = 0);
00104 
00105         signals:
00108                 void valueChanged(double);
00109 
00110         private slots:
00111                 void setValue();
00112 
00113         private:
00114                 double value,min,max;
00115                 QVPropertyContainer *orig_holder,*gui_holder;
00116                 QString property;
00117                 QLineEdit *lineedit;
00118                 QwtSlider *qwtslider;
00119         };
00120 
00121 
00129 class QVBoolParamWidget: public QWidget
00130         {
00131                 Q_OBJECT
00132         public: 
00143                 QVBoolParamWidget(QVPropertyContainer *orig_holder, QVPropertyContainer *gui_holder, const QString property, QWidget *parent = 0);
00144         
00145         signals:
00148                 void valueChanged(bool);
00149 
00150         private slots:
00151                 void setValue();
00152         
00153         private:
00154                 bool value;
00155                 QVPropertyContainer *orig_holder,*gui_holder;
00156                 QString property;
00157                 QCheckBox *checkbox;
00158         };
00159 
00167 class QVStringParamWidget: public QWidget
00168         {
00169         Q_OBJECT
00170         public:
00181                 QVStringParamWidget(QVPropertyContainer *orig_holder, QVPropertyContainer *gui_holder, const QString property, QWidget *parent = 0);
00182 
00183         signals:
00186                 void valueChanged(QString);
00187 
00188         private slots:
00189                 void setValue();
00190 
00191         private:
00192                 QString value;
00193                 QVPropertyContainer *orig_holder,*gui_holder;
00194                 QString property;
00195                 QLineEdit *lineedit;
00196         };
00197 
00205 class QVStringListParamWidget: public QWidget
00206         {
00207         Q_OBJECT
00208         public:
00219                 QVStringListParamWidget(QVPropertyContainer *orig_holder, QVPropertyContainer *gui_holder, const QString property, QWidget *parent = 0);
00220 
00221         signals:
00224                 void valueChanged(QVIndexedStringList);
00225 
00226         private slots:
00227                 void setValue();
00228 
00229         private:
00230                 QVIndexedStringList value;
00231                 QVPropertyContainer *orig_holder,*gui_holder;
00232                 QString property;
00233                 QComboBox *combobox;
00234         };
00235 
00236 
00244 class QVWorkerTriggerWidget: public QWidget
00245         {
00246         Q_OBJECT
00247 
00248         public:
00253                 QVWorkerTriggerWidget(QVWorker *worker, const QString triggername, QWidget *parent = 0);
00254 
00255         signals:
00258                 void valueChanged(QString);
00259 
00260         private slots:
00261                 void setValue();
00262 
00263         private:
00264                 QVWorker *worker;
00265                 QString triggername;
00266                 QToolButton *toolbutton;
00267         };
00268 
00269 #endif
00270 #endif
00271