forked from qt-creator/qt-creator
Add the ability to unify keyframe handles
Task-number: QDS-568 Change-Id: I5b102423e8e166d41edf199c42305cee102e8b54 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -103,6 +103,15 @@ bool AnimationCurve::isFromData() const
|
||||
return m_fromData;
|
||||
}
|
||||
|
||||
bool AnimationCurve::hasUnified() const
|
||||
{
|
||||
for (auto &&frame : m_frames) {
|
||||
if (frame.isUnified())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
double AnimationCurve::minimumTime() const
|
||||
{
|
||||
if (!m_frames.empty())
|
||||
@@ -144,6 +153,18 @@ std::string AnimationCurve::string() const
|
||||
return sstream.str();
|
||||
}
|
||||
|
||||
QString AnimationCurve::unifyString() const
|
||||
{
|
||||
QString out;
|
||||
for (auto &&frame : m_frames) {
|
||||
if (frame.isUnified())
|
||||
out.append("1");
|
||||
else
|
||||
out.append("0");
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
CurveSegment AnimationCurve::segment(double time) const
|
||||
{
|
||||
CurveSegment seg;
|
||||
|
||||
Reference in New Issue
Block a user