diff options
Diffstat (limited to 'src/declarative/util/qmlanimation_p.h')
-rw-r--r-- | src/declarative/util/qmlanimation_p.h | 98 |
1 files changed, 28 insertions, 70 deletions
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index e5a7384..87d480f 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -42,6 +42,17 @@ #ifndef QMLANIMATION_P_H #define QMLANIMATION_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <private/qobject_p.h> #include <private/qmlnullablevalue_p.h> #include <private/qvariantanimation_p.h> @@ -52,7 +63,7 @@ #include <QtDeclarative/qmlanimation.h> #include <QtDeclarative/qml.h> #include <QtDeclarative/qmlcontext.h> -#include <QtDeclarative/qmltimelinevalueproxy.h> +#include <private/qmltimeline_p.h> QT_BEGIN_NAMESPACE @@ -172,11 +183,12 @@ class QmlAbstractAnimationPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QmlAbstractAnimation) public: QmlAbstractAnimationPrivate() - : running(false), finishPlaying(false), repeat(false), + : running(false), paused(false), finishPlaying(false), repeat(false), connectedTimeLine(false), componentComplete(true), startOnCompletion(false), target(0), group(0) {} bool running; + bool paused; bool finishPlaying; bool repeat; bool connectedTimeLine; @@ -192,6 +204,8 @@ public: QmlMetaProperty property; QmlAnimationGroup *group; + + QmlMetaProperty createProperty(QObject *obj, const QString &str); }; class QmlPauseAnimationPrivate : public QmlAbstractAnimationPrivate @@ -206,40 +220,6 @@ public: QPauseAnimation *pa; }; -class QmlColorAnimationPrivate : public QmlAbstractAnimationPrivate -{ - Q_DECLARE_PUBLIC(QmlColorAnimation) -public: - QmlColorAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), fromIsDefined(false), toIsDefined(false), - ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) - { - if (!colorInterpolator) - colorInterpolator = QVariantAnimationPrivate::getInterpolator(QVariant::Color); - } - - void init(); - - QString easing; - - QColor fromValue; - QColor toValue; - - QList<QObject *> filter; - QList<QObject *> exclude; - - bool fromSourced; - bool fromIsDefined; - bool toIsDefined; - - QmlTimeLineValueAnimator *ca; - virtual void valueChanged(qreal); - - QmlTimeLineValueProxy<QmlColorAnimationPrivate> value; - - static QVariantAnimation::Interpolator colorInterpolator; -}; - class QmlRunScriptActionPrivate : public QmlAbstractAnimationPrivate { Q_DECLARE_PUBLIC(QmlRunScriptAction) @@ -294,32 +274,6 @@ public: QActionAnimation *cpa; }; -class QmlNumericAnimationPrivate : public QmlAbstractAnimationPrivate -{ - Q_DECLARE_PUBLIC(QmlNumericAnimation) -public: - QmlNumericAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), na(0), value(this, &QmlNumericAnimationPrivate::valueChanged) {} - - void init(); - - QmlNullableValue<qreal> from; - QmlNullableValue<qreal> to; - - QString easing; - - QString properties; - QList<QObject *> filter; - QList<QObject *> exclude; - - bool fromSourced; - qreal fromValue; - QmlTimeLineValueAnimator *na; - virtual void valueChanged(qreal); - - QmlTimeLineValueProxy<QmlNumericAnimationPrivate> value; -}; - class QmlAnimationGroupPrivate : public QmlAbstractAnimationPrivate { Q_DECLARE_PUBLIC(QmlAnimationGroup) @@ -359,13 +313,14 @@ public: QAnimationGroup *ag; }; -class QmlVariantAnimationPrivate : public QmlAbstractAnimationPrivate +class QmlPropertyAnimationPrivate : public QmlAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QmlVariantAnimation) + Q_DECLARE_PUBLIC(QmlPropertyAnimation) public: - QmlVariantAnimationPrivate() + QmlPropertyAnimationPrivate() : QmlAbstractAnimationPrivate(), fromSourced(false), fromIsDefined(false), toIsDefined(false), - va(0), value(this, &QmlVariantAnimationPrivate::valueChanged) {} + defaultToInterpolatorType(0), interpolatorType(0), interpolator(0), va(0), + value(this, &QmlPropertyAnimationPrivate::valueChanged) {} void init(); @@ -381,16 +336,19 @@ public: bool fromSourced; bool fromIsDefined; bool toIsDefined; + bool defaultToInterpolatorType; + int interpolatorType; + QVariantAnimation::Interpolator interpolator; QmlTimeLineValueAnimator *va; virtual void valueChanged(qreal); - QmlTimeLineValueProxy<QmlVariantAnimationPrivate> value; + QmlTimeLineValueProxy<QmlPropertyAnimationPrivate> value; static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress); - static void convertVariant(QVariant &variant, QVariant::Type type); + static void convertVariant(QVariant &variant, int type); }; -#endif // QMLANIMATION_P_H - QT_END_NAMESPACE + +#endif // QMLANIMATION_P_H |