diff options
author | Michael Brasser <michael.brasser@jollamobile.com> | 2014-03-28 11:43:47 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-08 01:39:37 +0200 |
commit | 02ad96fa8870630c6b77327098c712d6418b8fda (patch) | |
tree | 7f9557c1f00d80e3f16deb4e447cc34863b0a884 /src/quick/util/qquickanimation_p_p.h | |
parent | 0a74379a57bcf68328ab167121c2dd16fc2d47c3 (diff) |
Support dumping of animation jobs via QML_ANIMATION_TICK_DUMP.
Change-Id: I0b444321667691be3e1037164d02f29ed4dfc13e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/quick/util/qquickanimation_p_p.h')
-rw-r--r-- | src/quick/util/qquickanimation_p_p.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/quick/util/qquickanimation_p_p.h b/src/quick/util/qquickanimation_p_p.h index 127f447e5d..f2b5f6388f 100644 --- a/src/quick/util/qquickanimation_p_p.h +++ b/src/quick/util/qquickanimation_p_p.h @@ -79,18 +79,19 @@ class QAbstractAnimationAction public: virtual ~QAbstractAnimationAction() {} virtual void doAction() = 0; + virtual void debugAction(QDebug, int) const {} }; //templated animation action //allows us to specify an action that calls a function of a class. //(so that class doesn't have to inherit QQuickAbstractAnimationAction) -template<class T, void (T::*method)()> +template<class T, void (T::*method)(), void (T::*debugMethod)(QDebug, int) const> class QAnimationActionProxy : public QAbstractAnimationAction { public: QAnimationActionProxy(T *instance) : m_instance(instance) {} virtual void doAction() { (m_instance->*method)(); } - + virtual void debugAction(QDebug d, int indentLevel) const { (m_instance->*debugMethod)(d, indentLevel); } private: T *m_instance; }; @@ -111,6 +112,7 @@ public: protected: virtual void updateCurrentTime(int); virtual void updateState(State newState, State oldState); + void debugAnimation(QDebug d) const; private: QAbstractAnimationAction *animAction; @@ -121,6 +123,7 @@ class QQuickBulkValueUpdater public: virtual ~QQuickBulkValueUpdater() {} virtual void setValue(qreal value) = 0; + virtual void debugUpdater(QDebug, int) const {} }; //animates QQuickBulkValueUpdater (assumes start and end values will be reals or compatible) @@ -145,6 +148,7 @@ public: protected: void updateCurrentTime(int currentTime); void topLevelAnimationLoopChanged(); + void debugAnimation(QDebug d) const; private: QQuickBulkValueUpdater *animValue; @@ -224,8 +228,10 @@ public: void execute(); QAbstractAnimationAction* createAction(); + void debugAction(QDebug d, int indentLevel) const; typedef QAnimationActionProxy<QQuickScriptActionPrivate, - &QQuickScriptActionPrivate::execute> Proxy; + &QQuickScriptActionPrivate::execute, + &QQuickScriptActionPrivate::debugAction> Proxy; }; class QQuickPropertyActionPrivate : public QQuickAbstractAnimationPrivate @@ -307,6 +313,8 @@ public: void setValue(qreal v); + void debugUpdater(QDebug d, int indentLevel) const; + QQuickStateActions actions; int interpolatorType; //for Number/ColorAnimation QVariantAnimation::Interpolator interpolator; |