aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/animations/qabstractanimationjob_p.h
diff options
context:
space:
mode:
authorCharles Yin <yinyunqiao@gmail.com>2012-03-08 00:12:58 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-13 23:50:52 +0100
commitc67ed6887a8ee2fac935d81630b4b77926486c9b (patch)
tree1b9dff98f2fe8e83927400b3743923db93fa9a42 /src/qml/animations/qabstractanimationjob_p.h
parentc291efff26c13963cf98c127bfa759f89f103e48 (diff)
More refactoring on animation controller
Add a flag and helper functions for disabling user control in QAbstractAnimationJob class and make it synchronized with QDeclarativeAnimation class's disableUserControl flag. Change-Id: Ifa84ab0c78291941469c33f2cafe5f61ee718b2c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/animations/qabstractanimationjob_p.h')
-rw-r--r--src/qml/animations/qabstractanimationjob_p.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qml/animations/qabstractanimationjob_p.h b/src/qml/animations/qabstractanimationjob_p.h
index f00090cb30..e7d96ddfce 100644
--- a/src/qml/animations/qabstractanimationjob_p.h
+++ b/src/qml/animations/qabstractanimationjob_p.h
@@ -93,6 +93,9 @@ public:
inline bool isRunning() { return m_state == Running; }
inline bool isStopped() { return m_state == Stopped; }
inline bool isPaused() { return m_state == Paused; }
+ void setDisableUserControl();
+ void setEnableUserControl();
+ bool userControlDisabled() const;
void setCurrentTime(int msecs);
@@ -128,8 +131,6 @@ protected:
void directionChanged(QAbstractAnimationJob::Direction);
//definition
- bool m_isPause;
- bool m_isGroup;
int m_loopCount;
QAnimationGroupJob *m_group;
QAbstractAnimationJob::Direction m_direction;
@@ -139,10 +140,8 @@ protected:
int m_totalCurrentTime;
int m_currentTime;
int m_currentLoop;
- bool m_hasRegisteredTimer;
//records the finish time for an uncontrolled animation (used by animation groups)
int m_uncontrolledFinishTime;
- bool *m_wasDeleted;
struct ChangeListener {
ChangeListener(QAnimationJobChangeListener *l, QAbstractAnimationJob::ChangeTypes t) : listener(l), types(t) {}
@@ -155,6 +154,12 @@ protected:
QAbstractAnimationJob *m_nextSibling;
QAbstractAnimationJob *m_previousSibling;
+ bool *m_wasDeleted;
+ bool m_hasRegisteredTimer:1;
+ bool m_isPause:1;
+ bool m_isGroup:1;
+ bool m_disableUserControl:1;
+
friend class QQmlAnimationTimer;
friend class QAnimationGroupJob;
};