diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-06-30 11:59:30 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-06-30 12:49:11 (GMT) |
commit | f141de3daa267c266f67def765adb934138db080 (patch) | |
tree | b79a602ad210f65f15f44f31ba3f3bc6bae0c784 /src/corelib/animation/qabstractanimation_p.h | |
parent | 176024dfea7d354451a65b61fa2e82dd422b4dfb (diff) | |
download | Qt-f141de3daa267c266f67def765adb934138db080.zip Qt-f141de3daa267c266f67def765adb934138db080.tar.gz Qt-f141de3daa267c266f67def765adb934138db080.tar.bz2 |
Adds slowdownFactor to UnifiedTimer in abstract animation
The slowdown factor is useful for debugging complex animations.
Setting it to 0 will stop all animations when slowMode is enabled.
Submitted-by: Lasse
Reviewed-by: Thierry
Diffstat (limited to 'src/corelib/animation/qabstractanimation_p.h')
-rw-r--r-- | src/corelib/animation/qabstractanimation_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h index fcfe824..6ff18f5 100644 --- a/src/corelib/animation/qabstractanimation_p.h +++ b/src/corelib/animation/qabstractanimation_p.h @@ -145,8 +145,9 @@ public: */ void setConsistentTiming(bool consistent) { consistentTiming = consistent; } - //this facilitates fine-tuning of complex animations + //these facilitate fine-tuning of complex animations void setSlowModeEnabled(bool enabled) { slowMode = enabled; } + void setSlowdownFactor(qreal factor) { slowdownFactor = factor; } /* this is used for updating the currentTime of all animations in case the pause @@ -176,6 +177,12 @@ private: int currentAnimationIdx; bool consistentTiming; bool slowMode; + + // This factor will be used to divide the DEFAULT_TIMER_INTERVAL at each tick + // when slowMode is enabled. Setting it to 0 or higher than DEFAULT_TIMER_INTERVAL (16) + // stops all animations. + qreal slowdownFactor; + // bool to indicate that only pause animations are active bool isPauseTimerActive; |