X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdoubleparameterwidget.h;h=a3262ae1998b8526e4f79a255974de83e73a6fda;hb=c36efb27b78c406ac69064efa57480ae0edc9120;hp=e677ad01b37f85cb5aea47ba9a93d13885ffa242;hpb=4a657678757a8a9347a97b7d4019c1e025e1b3d3;p=kdenlive diff --git a/src/doubleparameterwidget.h b/src/doubleparameterwidget.h index e677ad01..a3262ae1 100644 --- a/src/doubleparameterwidget.h +++ b/src/doubleparameterwidget.h @@ -23,9 +23,11 @@ #include + class QLabel; class QSlider; class QSpinBox; +class DragValue; /** * @class DoubleParameterWidget @@ -48,17 +50,19 @@ public: * @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 &comment, const QString suffix = QString(), QWidget* parent = 0); - - /** @brief Updates the label to display @param name. */ - void setName(const QString &name); + DoubleParameterWidget(const QString &name, double value, double min, double max, double defaultValue, const QString &comment, int id, const QString suffix = QString(), int decimals = 0, QWidget* parent = 0); /** @brief Gets the parameter's value. */ - int getValue(); + double getValue(); + /** @brief Set the inTimeline property to paint widget with other colors. */ + void setInTimelineProperty(bool intimeline); + /** @brief Returns minimum size for QSpinBox, used to set all spinboxes to the same width. */ + int spinSize(); + void setSpinSize(int width); public slots: /** @brief Sets the value to @param value. */ - void setValue(int value); + void setValue(double value); /** @brief Sets value to m_default. */ void slotReset(); @@ -67,15 +71,19 @@ private slots: /** @brief Shows/Hides the comment label. */ void slotShowComment(bool show); + void slotSetValue(double 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); + void valueChanged(double); + /** @brief User wants to see this parameter in timeline. */ + void setInTimeline(int); }; #endif