]> git.sesse.net Git - kdenlive/blobdiff - src/doubleparameterwidget.h
Add proper support for 'float' parameter type in effect's drag widget (required for...
[kdenlive] / src / doubleparameterwidget.h
index 9a7681fccb6df70916addd0b7b36ab496b5bf54f..52bad2101c8c47d9bdc266f143de892c02a8bfbb 100644 (file)
 
 #include <QWidget>
 
+
 class QLabel;
 class QSlider;
 class QSpinBox;
+class DragValue;
 
 /**
  * @class DoubleParameterWidget
@@ -48,13 +50,15 @@ 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();
+    /** @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. */
@@ -65,17 +69,21 @@ public slots:
 
 private slots:
     /** @brief Shows/Hides the comment label. */
-    void slotShowComment();
+    void slotShowComment(bool show);
+
+    void slotSetValue(int 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);
+    /** @brief User wants to see this parameter in timeline. */
+    void setInTimeline(int);
 };
 
 #endif