summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2011-11-18 17:32:47 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-18 18:47:19 +0100
commitb2aac995b93b2663487cb6c8240d22cf1e103e7d (patch)
tree417f09d712ef1f32c5cc68cee4cc931a40ef1701 /src/corelib/tools
parent76f2b0ab50df3fa7fb1e74662f08228ef1d54106 (diff)
adding a getter cubicBezierSpline() to QEasingCurve
Change-Id: Ida722f013613d8633867a902660da30d28aeb918 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
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);