summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-25 15:02:09 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-25 15:02:09 (GMT)
commitac2ea04e516fa7818cb7b4dbe7dd2619cec9fbda (patch)
treec832f0c4e66f3774a8cdb96ac74f9d94d44a007f /src/corelib/animation
parentb6b251cb8b36be434cf878a916c15019fd65b6f0 (diff)
downloadQt-ac2ea04e516fa7818cb7b4dbe7dd2619cec9fbda.zip
Qt-ac2ea04e516fa7818cb7b4dbe7dd2619cec9fbda.tar.gz
Qt-ac2ea04e516fa7818cb7b4dbe7dd2619cec9fbda.tar.bz2
Some refactoring of windows specific code + a private class of animations
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp26
-rw-r--r--src/corelib/animation/qabstractanimation_p.h24
2 files changed, 19 insertions, 31 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 94a94d1..16307e6 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -188,32 +188,6 @@ void QUnifiedTimer::updateRecentlyStartedAnimations()
animationsToStart.clear();
}
-/*
- defines the timing interval. Default is DEFAULT_TIMER_INTERVAL
-*/
-void QUnifiedTimer::setTimingInterval(int interval)
-{
- timingInterval = interval;
- if (animationTimer.isActive()) {
- //we changed the timing interval
- animationTimer.start(timingInterval, this);
- }
-}
-
-/*
- this allows to have a consistent timer interval at each tick from the timer
- not taking the real time that passed into account.
-*/
-void QUnifiedTimer::setConsistentTiming(bool b)
-{
- consistentTiming = b;
-}
-
-int QUnifiedTimer::elapsedTime() const
-{
- return lastTick;
-}
-
void QUnifiedTimer::timerEvent(QTimerEvent *event)
{
//this is simply the time we last received a tick
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index e64554c..7a4bfcf 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -101,21 +101,35 @@ private:
};
-class Q_CORE_EXPORT QUnifiedTimer : public QObject
+class QUnifiedTimer : public QObject
{
private:
QUnifiedTimer();
public:
- static QUnifiedTimer *instance();
+ //XXX this is needed by dui
+ static Q_CORE_EXPORT QUnifiedTimer *instance();
void registerAnimation(QAbstractAnimation *animation);
void unregisterAnimation(QAbstractAnimation *animation);
- void setTimingInterval(int interval);
- void setConsistentTiming(bool consistent);
+ //defines the timing interval. Default is DEFAULT_TIMER_INTERVAL
+ void setTimingInterval(int interval)
+ {
+ timingInterval = interval;
+ if (animationTimer.isActive()) {
+ //we changed the timing interval
+ animationTimer.start(timingInterval, this);
+ }
+ }
+
+ /*
+ this allows to have a consistent timer interval at each tick from the timer
+ not taking the real time that passed into account.
+ */
+ void setConsistentTiming(bool consistent) { consistentTiming = consistent; }
- int elapsedTime() const;
+ int elapsedTime() const { return lastTick; }
protected:
void timerEvent(QTimerEvent *);