diff options
Diffstat (limited to 'src/declarative/util/qdeclarativeanimation.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 9e777a0..264b88c 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -52,6 +52,7 @@ #include <qdeclarativestringconverters_p.h> #include <qdeclarativeglobal_p.h> #include <qdeclarativemetatype_p.h> +#include <qdeclarativeproperty_p.h> #include <qvariant.h> #include <qcolor.h> @@ -144,7 +145,7 @@ void QDeclarativeAbstractAnimationPrivate::commence() Q_Q(QDeclarativeAbstractAnimation); QDeclarativeStateActions actions; - QDeclarativeMetaProperties properties; + QDeclarativeProperties properties; q->transition(actions, properties, QDeclarativeAbstractAnimation::Forward); q->qtAnimation()->start(); @@ -154,15 +155,15 @@ void QDeclarativeAbstractAnimationPrivate::commence() } } -QDeclarativeMetaProperty QDeclarativeAbstractAnimationPrivate::createProperty(QObject *obj, const QString &str, QObject *infoObj) +QDeclarativeProperty QDeclarativeAbstractAnimationPrivate::createProperty(QObject *obj, const QString &str, QObject *infoObj) { - QDeclarativeMetaProperty prop(obj, str, qmlContext(infoObj)); + QDeclarativeProperty prop(obj, str, qmlContext(infoObj)); if (!prop.isValid()) { qmlInfo(infoObj) << QDeclarativeAbstractAnimation::tr("Cannot animate non-existent property \"%1\"").arg(str); - return QDeclarativeMetaProperty(); + return QDeclarativeProperty(); } else if (!prop.isWritable()) { qmlInfo(infoObj) << QDeclarativeAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str); - return QDeclarativeMetaProperty(); + return QDeclarativeProperty(); } return prop; } @@ -465,7 +466,7 @@ void QDeclarativeAbstractAnimation::complete() } } -void QDeclarativeAbstractAnimation::setTarget(const QDeclarativeMetaProperty &p) +void QDeclarativeAbstractAnimation::setTarget(const QDeclarativeProperty &p) { Q_D(QDeclarativeAbstractAnimation); d->defaultProperty = p; @@ -479,7 +480,7 @@ void QDeclarativeAbstractAnimation::setTarget(const QDeclarativeMetaProperty &p) so this function allows us to do the same thing as setTarget without that assumption */ -void QDeclarativeAbstractAnimation::setDefaultTarget(const QDeclarativeMetaProperty &p) +void QDeclarativeAbstractAnimation::setDefaultTarget(const QDeclarativeProperty &p) { Q_D(QDeclarativeAbstractAnimation); d->defaultProperty = p; @@ -497,7 +498,7 @@ void QDeclarativeAbstractAnimation::setDisableUserControl() } void QDeclarativeAbstractAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_UNUSED(actions); @@ -728,7 +729,7 @@ void QDeclarativeScriptActionPrivate::execute() } void QDeclarativeScriptAction::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_D(QDeclarativeScriptAction); @@ -911,7 +912,7 @@ QAbstractAnimation *QDeclarativePropertyAction::qtAnimation() } void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_D(QDeclarativePropertyAction); @@ -924,7 +925,7 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions, { for (int ii = 0; ii < actions.count(); ++ii) { const QDeclarativeAction &action = actions.at(ii); - action.property.write(action.toValue, QDeclarativeMetaProperty::BypassInterceptor | QDeclarativeMetaProperty::DontRemoveBinding); + QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } } }; @@ -1132,7 +1133,7 @@ QAbstractAnimation *QDeclarativeParentAction::qtAnimation() } void QDeclarativeParentAction::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_D(QDeclarativeParentAction); @@ -1581,7 +1582,7 @@ QAbstractAnimation *QDeclarativeSequentialAnimation::qtAnimation() } void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_D(QDeclarativeAnimationGroup); @@ -1646,7 +1647,7 @@ QAbstractAnimation *QDeclarativeParallelAnimation::qtAnimation() } void QDeclarativeParallelAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_D(QDeclarativeAnimationGroup); @@ -2230,7 +2231,7 @@ struct PropertyUpdater : public QDeclarativeTimeLineValue QDeclarativeAction &action = actions[ii]; if (v == 1.) - action.property.write(action.toValue, QDeclarativeMetaProperty::BypassInterceptor | QDeclarativeMetaProperty::DontRemoveBinding); + QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); else { if (!fromSourced && !fromDefined) { action.fromValue = action.property.read(); @@ -2245,7 +2246,7 @@ struct PropertyUpdater : public QDeclarativeTimeLineValue } } if (interpolator) - action.property.write(interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativeMetaProperty::BypassInterceptor | QDeclarativeMetaProperty::DontRemoveBinding); + QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } if (deleted) return; @@ -2256,7 +2257,7 @@ struct PropertyUpdater : public QDeclarativeTimeLineValue }; void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions, - QDeclarativeMetaProperties &modified, + QDeclarativeProperties &modified, TransitionDirection direction) { Q_D(QDeclarativePropertyAnimation); |