2011-10-25 15:48:19 +00:00
|
|
|
/*
|
2011-12-02 18:34:08 +00:00
|
|
|
* Copyright (C) 2011, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
2011-10-25 15:48:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef PARAMETERSTOOLBOX_H_
|
|
|
|
|
#define PARAMETERSTOOLBOX_H_
|
|
|
|
|
|
|
|
|
|
#include <QtGui/QToolBox>
|
|
|
|
|
|
|
|
|
|
class QVBoxLayout;
|
|
|
|
|
class QAbstractButton;
|
|
|
|
|
|
|
|
|
|
class ParametersToolBox: public QToolBox
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ParametersToolBox(QWidget *parent = 0);
|
|
|
|
|
virtual ~ParametersToolBox();
|
|
|
|
|
|
|
|
|
|
void setupUi();
|
2011-11-23 16:44:14 +00:00
|
|
|
QWidget * getParameterWidget(const QString & key);
|
2012-01-30 03:16:30 +00:00
|
|
|
void updateParameter(const QString & key);
|
2011-10-25 15:48:19 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void addParameter(QVBoxLayout * layout, const QString & key, const QVariant & value);
|
|
|
|
|
void addParameter(QVBoxLayout * layout, const QString & key, const QString & value);
|
|
|
|
|
void addParameter(QVBoxLayout * layout, const QString & key, const int & value);
|
|
|
|
|
void addParameter(QVBoxLayout * layout, const QString & key, const double & value);
|
|
|
|
|
void addParameter(QVBoxLayout * layout, const QString & key, const bool & value);
|
|
|
|
|
void addParameter(QVBoxLayout * layout, const QString & name, QWidget * widget);
|
|
|
|
|
|
2012-01-28 01:00:23 +00:00
|
|
|
signals:
|
|
|
|
|
void parametersChanged();
|
|
|
|
|
|
2011-10-25 15:48:19 +00:00
|
|
|
private slots:
|
|
|
|
|
void changeParameter();
|
|
|
|
|
void changeParameter(const QString & value);
|
|
|
|
|
void changeParameter(const int & value);
|
|
|
|
|
void resetCurrentPage();
|
2012-01-12 22:21:56 +00:00
|
|
|
void resetAllPages();
|
2012-02-04 22:15:32 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void resetPage(int index);
|
2011-10-25 15:48:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* PARAMETERSTOOLBOX_H_ */
|