adding a getter cubicBezierSpline() to QEasingCurve

Change-Id: Ida722f013613d8633867a902660da30d28aeb918
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
This commit is contained in:
Thomas Hartmann 2011-11-18 17:32:47 +01:00 committed by Qt by Nokia
parent 76f2b0ab50
commit b2aac995b9
2 changed files with 13 additions and 0 deletions

View File

@ -1302,6 +1302,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.
*/

View File

@ -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);