aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp')
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp b/src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp
index 3e910638da..36e577d38d 100644
--- a/src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/animationcurve.cpp
@@ -36,14 +36,16 @@
namespace QmlDesigner {
AnimationCurve::AnimationCurve()
- : m_fromData(false)
+ : m_type(AnimationCurve::ValueType::Undefined)
+ , m_fromData(false)
, m_minY(std::numeric_limits<double>::max())
, m_maxY(std::numeric_limits<double>::lowest())
, m_frames()
{}
-AnimationCurve::AnimationCurve(const std::vector<Keyframe> &frames)
- : m_fromData(false)
+AnimationCurve::AnimationCurve(AnimationCurve::ValueType type, const std::vector<Keyframe> &frames)
+ : m_type(type)
+ , m_fromData(false)
, m_minY(std::numeric_limits<double>::max())
, m_maxY(std::numeric_limits<double>::lowest())
, m_frames(frames)
@@ -51,8 +53,13 @@ AnimationCurve::AnimationCurve(const std::vector<Keyframe> &frames)
analyze();
}
-AnimationCurve::AnimationCurve(const QEasingCurve &easing, const QPointF &start, const QPointF &end)
- : m_fromData(true)
+AnimationCurve::AnimationCurve(
+ AnimationCurve::ValueType type,
+ const QEasingCurve &easing,
+ const QPointF &start,
+ const QPointF &end)
+ : m_type(type)
+ , m_fromData(true)
, m_minY(std::numeric_limits<double>::max())
, m_maxY(std::numeric_limits<double>::lowest())
, m_frames()
@@ -117,6 +124,11 @@ bool AnimationCurve::hasUnified() const
return false;
}
+AnimationCurve::ValueType AnimationCurve::valueType() const
+{
+ return m_type;
+}
+
double AnimationCurve::minimumTime() const
{
if (!m_frames.empty())