aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h
diff options
context:
space:
mode:
authorKnud Dollereder <knud.dollereder@qt.io>2020-02-21 15:28:31 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2020-03-17 17:19:14 +0000
commit5b000d17cb2f42891db7bd8c9c857866245eddd3 (patch)
tree97b2a33c6be95de50028e24e2d2f0e85ac262055 /src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h
parent0f60f120d2e24b9912b43b5ba4859adcd5a1a803 (diff)
QmlDesigner: Add the ability to modify the animation rangev4.12.0-beta2
Add the ability to modify the animation range from the curve editor Fix a synchronization issue between timeline and curve editor when the animation contains pinned curves Change-Id: I89dda234063259f41d662749d696f5fc8a04f988 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h')
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h b/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h
index 6e212d4c6a..48d05586a2 100644
--- a/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h
+++ b/src/plugins/qmldesigner/components/curveeditor/curveeditormodel.h
@@ -48,6 +48,14 @@ class CurveEditorModel : public TreeModel
signals:
void currentFrameChanged(int frame);
+ void startFrameChanged(int frame);
+
+ void endFrameChanged(int frame);
+
+ void updateStartFrame(int frame);
+
+ void updateEndFrame(int frame);
+
void curveChanged(PropertyTreeItem *item);
public:
@@ -58,15 +66,24 @@ public:
virtual CurveEditorStyle style() const = 0;
public:
- CurveEditorModel(QObject *parent = nullptr);
+ CurveEditorModel(double minTime, double maxTime, QObject *parent = nullptr);
~CurveEditorModel() override;
void setCurrentFrame(int frame);
+ void setMinimumTime(double time, bool internal);
+
+ void setMaximumTime(double time, bool internal);
+
void setCurve(unsigned int id, const AnimationCurve &curve);
void reset(const std::vector<TreeItem *> &items);
+
+protected:
+ double m_minTime = 0.;
+
+ double m_maxTime = 0.;
};
} // End namespace DesignTools.