From 3ac785411d860e48e14f6b2542b666a6d508cff1 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 4 Nov 2009 15:40:28 +0100 Subject: Result API review with Jasmin QAbstractAnimation: currentTime returns the "complete" current time currentLoopTime() returns the time inside the current loop add setPaused(bool) for consistency with QTimeLine stateChanged: newState passed as first paramater (before oldState) for consistency with the reset of Qt QAnimationGroup: rename clearAnimations to clear rename insertAnimationAt to insertAnimation rename takeAnimationAt to takeAnimation QSequentialAnimationGroup: rename insertPauseAt to insertPause --- src/corelib/animation/qabstractanimation.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/corelib/animation/qabstractanimation.h') diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h index 3d608b64dc..3c6e12fab6 100644 --- a/src/corelib/animation/qabstractanimation.h +++ b/src/corelib/animation/qabstractanimation.h @@ -95,6 +95,9 @@ public: Direction direction() const; void setDirection(Direction direction); + int currentTime() const; + int currentLoopTime() const; + int loopCount() const; void setLoopCount(int loopCount); int currentLoop() const; @@ -102,11 +105,9 @@ public: virtual int duration() const = 0; int totalDuration() const; - int currentTime() const; - Q_SIGNALS: void finished(); - void stateChanged(QAbstractAnimation::State oldState, QAbstractAnimation::State newState); + void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); void currentLoopChanged(int currentLoop); void directionChanged(QAbstractAnimation::Direction); @@ -114,6 +115,7 @@ public Q_SLOTS: void start(QAbstractAnimation::DeletionPolicy policy = KeepWhenStopped); void pause(); void resume(); + void setPaused(bool); void stop(); void setCurrentTime(int msecs); @@ -122,7 +124,7 @@ protected: bool event(QEvent *event); virtual void updateCurrentTime(int currentTime) = 0; - virtual void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState); + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); virtual void updateDirection(QAbstractAnimation::Direction direction); private: -- cgit v1.2.3