summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qeasingcurve.cpp11
-rw-r--r--src/corelib/tools/qeasingcurve.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index a1b51e6f9a..4337c4a594 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -1303,6 +1303,17 @@ void QEasingCurve::addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qre
}
/*!
+
+ Returns the cubicBezierSpline that defines a custom easing curve.
+ If the easing curve does not have a custom bezier easing curve the list
+ is empty.
+ */
+QList<QPointF> QEasingCurve::cubicBezierSpline() const
+{
+ return d_ptr->config ? d_ptr->config->_bezierCurves.toList() : QList<QPointF>();
+}
+
+/*!
Returns the type of the easing curve.
*/
QEasingCurve::Type QEasingCurve::type() const
diff --git a/src/corelib/tools/qeasingcurve.h b/src/corelib/tools/qeasingcurve.h
index a1c11ceba4..326e7f6e61 100644
--- a/src/corelib/tools/qeasingcurve.h
+++ b/src/corelib/tools/qeasingcurve.h
@@ -44,6 +44,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qobjectdefs.h>
+#include <QtCore/qlist.h>
QT_BEGIN_HEADER
@@ -94,6 +95,7 @@ public:
void addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint);
void addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qreal b);
+ QList<QPointF> cubicBezierSpline() const;
Type type() const;
void setType(Type type);