aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsganimation_p_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-09-07 12:39:58 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-19 01:05:17 +0200
commit48e333595fd81192a8cc2befa509407cc7a43381 (patch)
treea5e8db90201117d71d5677c67c249d086fcf508a /src/declarative/items/qsganimation_p_p.h
parent38fc46c5d81f08328cec474e2f7f8b9285bccefc (diff)
PathAnimation updates.
Allow smooth orientation changes, smooth interruptions, and implicit "from" in PathAnimation. Change-Id: I2191f6df89ec25d78b1d498827281803a07129c9 Reviewed-on: http://codereview.qt-project.org/4378 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/items/qsganimation_p_p.h')
-rw-r--r--src/declarative/items/qsganimation_p_p.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/declarative/items/qsganimation_p_p.h b/src/declarative/items/qsganimation_p_p.h
index e26dbbd9fb..276efc5eb4 100644
--- a/src/declarative/items/qsganimation_p_p.h
+++ b/src/declarative/items/qsganimation_p_p.h
@@ -96,6 +96,14 @@ public:
class QSGPathAnimationUpdater : public QDeclarativeBulkValueUpdater
{
public:
+ QSGPathAnimationUpdater() : path(0), target(0), reverse(false),
+ fromSourced(false), fromDefined(false), toDefined(false),
+ toX(0), toY(0), currentV(0), orientation(QSGPathAnimation::Fixed),
+ entryInterval(0), exitInterval(0) {}
+ ~QSGPathAnimationUpdater() {}
+
+ void setValue(qreal v);
+
QDeclarativePath *path;
QPainterPath painterPath;
@@ -107,14 +115,18 @@ public:
bool reverse;
bool fromSourced;
bool fromDefined;
+ bool toDefined;
qreal toX;
qreal toY;
+ qreal currentV;
+ QDeclarativeNullableValue<qreal> interruptStart;
+ //TODO: bundle below into common struct
QSGPathAnimation::Orientation orientation;
QPointF anchorPoint;
- QSGPathAnimationUpdater() : path(0), target(0), reverse(false),
- fromSourced(false), fromDefined(false), toX(0), toY(0), orientation(QSGPathAnimation::Fixed) {}
- ~QSGPathAnimationUpdater() {}
- void setValue(qreal v);
+ qreal entryInterval;
+ qreal exitInterval;
+ QDeclarativeNullableValue<qreal> endRotation;
+ QDeclarativeNullableValue<qreal> startRotation;
};
class QSGPathAnimationPrivate : public QDeclarativeAbstractAnimationPrivate
@@ -122,13 +134,16 @@ class QSGPathAnimationPrivate : public QDeclarativeAbstractAnimationPrivate
Q_DECLARE_PUBLIC(QSGPathAnimation)
public:
QSGPathAnimationPrivate() : path(0), target(0),
- rangeIsSet(false), orientation(QSGPathAnimation::Fixed), pa(0) {}
+ rangeIsSet(false), orientation(QSGPathAnimation::Fixed), entryInterval(0), exitInterval(0), pa(0) {}
QDeclarativePath *path;
QSGItem *target;
bool rangeIsSet;
QSGPathAnimation::Orientation orientation;
QPointF anchorPoint;
+ qreal entryInterval;
+ qreal exitInterval;
+ QDeclarativeNullableValue<qreal> endRotation;
QDeclarativeBulkValueAnimator *pa;
};