class QLabel;
class QSlider;
class QSpinBox;
+class DragValue;
/**
* @class DoubleParameterWidget
* @param min Minimum value
* @param max maximum value
* @param defaultValue Value used when using reset functionality
+ * @param comment A comment explaining the parameter. Will be shown for the tooltip.
* @param suffix (optional) Suffix to display in spinbox
* @param parent (optional) Parent Widget */
- DoubleParameterWidget(const QString &name, int value, int min, int max, int defaultValue, const QString suffix = QString(), QWidget* parent = 0);
+ DoubleParameterWidget(const QString &name, int value, int min, int max, int defaultValue, const QString &comment, const QString suffix = QString(), QWidget* parent = 0);
+
/** @brief Updates the label to display @param name. */
void setName(const QString &name);
+
/** @brief Gets the parameter's value. */
int getValue();
/** @brief Sets value to m_default. */
void slotReset();
+private slots:
+ /** @brief Shows/Hides the comment label. */
+ void slotShowComment(bool show);
+
+ void slotSetValue(qreal value, bool final);
+
private:
int m_default;
QLabel *m_name;
QSlider *m_slider;
QSpinBox *m_spinBox;
+ DragValue *m_dragVal;
+ QLabel *m_commentLabel;
signals:
void valueChanged(int);