Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QAbstractAnimationJob Class Reference

#include <qabstractanimationjob_p.h>

+ Inheritance diagram for QAbstractAnimationJob:
+ Collaboration diagram for QAbstractAnimationJob:

Classes

struct  ChangeListener
 

Public Types

enum  Direction { Forward , Backward }
 
enum  State { Stopped , Paused , Running }
 
enum  ChangeType { Completion = 0x01 , StateChange = 0x02 , CurrentLoop = 0x04 , CurrentTime = 0x08 }
 

Public Member Functions

 QAbstractAnimationJob ()
 
virtual ~QAbstractAnimationJob ()
 
QAnimationGroupJobgroup () const
 
int loopCount () const
 
void setLoopCount (int loopCount)
 
int totalDuration () const
 
virtual int duration () const
 
QAbstractAnimationJob::Direction direction () const
 
void setDirection (QAbstractAnimationJob::Direction direction)
 
int currentTime () const
 
int currentLoopTime () const
 
int currentLoop () const
 
QAbstractAnimationJob::State state () const
 
bool isRunning ()
 
bool isStopped ()
 
bool isPaused ()
 
void setDisableUserControl ()
 
void setEnableUserControl ()
 
bool userControlDisabled () const
 
void setCurrentTime (int msecs)
 
void start ()
 
void pause ()
 
void resume ()
 
void stop ()
 
void complete ()
 
void addAnimationChangeListener (QAnimationJobChangeListener *listener, QAbstractAnimationJob::ChangeTypes)
 
void removeAnimationChangeListener (QAnimationJobChangeListener *listener, QAbstractAnimationJob::ChangeTypes)
 
bool isGroup () const
 
bool isRenderThreadJob () const
 
bool isRenderThreadProxy () const
 
- Public Member Functions inherited from QInheritedListNode
 ~QInheritedListNode ()
 
bool isInList () const
 

Public Attributes

SelfDeletable m_selfDeletable
 

Protected Member Functions

virtual void updateCurrentTime (int)
 
virtual void updateLoopCount (int)
 
virtual void updateState (QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState)
 
virtual void updateDirection (QAbstractAnimationJob::Direction direction)
 
virtual void topLevelAnimationLoopChanged ()
 
virtual void debugAnimation (QDebug d) const
 
void fireTopLevelAnimationLoopChanged ()
 
void setState (QAbstractAnimationJob::State state)
 
void finished ()
 
void stateChanged (QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState)
 
void currentLoopChanged ()
 
void directionChanged (QAbstractAnimationJob::Direction)
 
void currentTimeChanged (int currentTime)
 

Protected Attributes

int m_loopCount
 
QAnimationGroupJobm_group
 
QAbstractAnimationJob::Direction m_direction
 
QAbstractAnimationJob::State m_state
 
int m_totalCurrentTime
 
int m_currentTime
 
int m_currentLoop
 
int m_uncontrolledFinishTime
 
int m_currentLoopStartTime
 
std::vector< ChangeListenerchangeListeners
 
QQmlAnimationTimerm_timer = nullptr
 
bool m_hasRegisteredTimer:1
 
bool m_isPause:1
 
bool m_isGroup:1
 
bool m_disableUserControl:1
 
bool m_hasCurrentTimeChangeListeners:1
 
bool m_isRenderThreadJob:1
 
bool m_isRenderThreadProxy:1
 

Friends

class QQmlAnimationTimer
 
class QAnimationGroupJob
 
Q_QML_EXPORT QDebug operator<< (QDebug, const QAbstractAnimationJob *job)
 

Detailed Description

Definition at line 33 of file qabstractanimationjob_p.h.

Member Enumeration Documentation

◆ ChangeType

Enumerator
Completion 
StateChange 
CurrentLoop 
CurrentTime 

Definition at line 83 of file qabstractanimationjob_p.h.

◆ Direction

Enumerator
Forward 
Backward 

Definition at line 37 of file qabstractanimationjob_p.h.

◆ State

Enumerator
Stopped 
Paused 
Running 

Definition at line 42 of file qabstractanimationjob_p.h.

Constructor & Destructor Documentation

◆ QAbstractAnimationJob()

QAbstractAnimationJob::QAbstractAnimationJob ( )

Definition at line 246 of file qabstractanimationjob.cpp.

◆ ~QAbstractAnimationJob()

QAbstractAnimationJob::~QAbstractAnimationJob ( )
virtual

Definition at line 267 of file qabstractanimationjob.cpp.

References QQmlAnimationTimer::instance(), m_group, m_hasRegisteredTimer, m_state, m_timer, Q_ASSERT, QAnimationGroupJob::removeAnimation(), Running, stateChanged(), Stopped, and QQmlAnimationTimer::unregisterAnimation().

+ Here is the call graph for this function:

Member Function Documentation

◆ addAnimationChangeListener()

void QAbstractAnimationJob::addAnimationChangeListener ( QAnimationJobChangeListener * listener,
QAbstractAnimationJob::ChangeTypes changes )

Definition at line 626 of file qabstractanimationjob.cpp.

References changeListeners, CurrentTime, and m_hasCurrentTimeChangeListeners.

Referenced by QQuickItemViewPrivate::QQuickItemViewPrivate(), QQuickTransitionInstance::QQuickTransitionInstance(), and QQuickAbstractAnimationPrivate::commence().

+ Here is the caller graph for this function:

◆ complete()

void QAbstractAnimationJob::complete ( )

Definition at line 525 of file qabstractanimationjob.cpp.

References duration(), Forward, m_direction, Running, setCurrentTime(), setState(), and Stopped.

Referenced by QQuickTransitionInstance::complete().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ currentLoop()

int QAbstractAnimationJob::currentLoop ( ) const
inline

Definition at line 66 of file qabstractanimationjob_p.h.

Referenced by QQuickPropertyAnimationPrivate::animationCurrentLoopChanged(), QSequentialAnimationGroupJob::animationInserted(), QQuickAnimationGroupPrivate::restartFromCurrentLoop(), and QQuickAnimatorProxyJob::updateCurrentTime().

+ Here is the caller graph for this function:

◆ currentLoopChanged()

void QAbstractAnimationJob::currentLoopChanged ( )
protected

Definition at line 606 of file qabstractanimationjob.cpp.

References changeListeners, CurrentLoop, and RETURN_IF_DELETED.

Referenced by setCurrentTime().

+ Here is the caller graph for this function:

◆ currentLoopTime()

int QAbstractAnimationJob::currentLoopTime ( ) const
inline

Definition at line 65 of file qabstractanimationjob_p.h.

Referenced by ParallelAnimationWrapper::updateState().

+ Here is the caller graph for this function:

◆ currentTime()

◆ currentTimeChanged()

void QAbstractAnimationJob::currentTimeChanged ( int currentTime)
protected

Definition at line 615 of file qabstractanimationjob.cpp.

References changeListeners, currentTime(), CurrentTime, m_hasCurrentTimeChangeListeners, Q_ASSERT, and RETURN_IF_DELETED.

Referenced by setCurrentTime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ debugAnimation()

void QAbstractAnimationJob::debugAnimation ( QDebug d) const
protectedvirtual

Reimplemented in QContinuingAnimationGroupJob, QParallelAnimationGroupJob, QPauseAnimationJob, QSequentialAnimationGroupJob, QActionAnimation, QQuickBulkValueAnimator, QQuickAnimatorProxyJob, QQuickAnimatorJob, QSmoothedAnimation, QSpringAnimation, and QQuickTimeLine.

Definition at line 650 of file qabstractanimationjob.cpp.

References d, Qt::dec(), duration(), Qt::hex(), and m_state.

+ Here is the call graph for this function:

◆ direction()

QAbstractAnimationJob::Direction QAbstractAnimationJob::direction ( ) const
inline

Definition at line 60 of file qabstractanimationjob_p.h.

Referenced by QQuickAnimationControllerPrivate::animationFinished(), setDirection(), updateDirection(), QContinuingAnimationGroupJob::updateDirection(), QParallelAnimationGroupJob::updateDirection(), QSequentialAnimationGroupJob::updateDirection(), and ParallelAnimationWrapper::updateState().

+ Here is the caller graph for this function:

◆ directionChanged()

void QAbstractAnimationJob::directionChanged ( QAbstractAnimationJob::Direction )
protected

◆ duration()

◆ finished()

void QAbstractAnimationJob::finished ( )
protected

Definition at line 582 of file qabstractanimationjob.cpp.

References changeListeners, Completion, duration(), loopCount(), m_group, RETURN_IF_DELETED, and QAnimationGroupJob::uncontrolledAnimationFinished().

Referenced by setState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fireTopLevelAnimationLoopChanged()

void QAbstractAnimationJob::fireTopLevelAnimationLoopChanged ( )
protected

Definition at line 289 of file qabstractanimationjob.cpp.

References m_currentLoopStartTime, m_group, m_uncontrolledFinishTime, and topLevelAnimationLoopChanged().

Referenced by setCurrentTime(), and setState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ group()

QAnimationGroupJob * QAbstractAnimationJob::group ( ) const
inline

Definition at line 52 of file qabstractanimationjob_p.h.

Referenced by QActionAnimation::debugAnimation(), and QQuickBulkValueAnimator::debugAnimation().

+ Here is the caller graph for this function:

◆ isGroup()

bool QAbstractAnimationJob::isGroup ( ) const
inline

Definition at line 94 of file qabstractanimationjob_p.h.

Referenced by qquick_syncback_helper(), qquickanimator_invalidate_jobs(), and qquickanimator_sync_before_start().

+ Here is the caller graph for this function:

◆ isPaused()

bool QAbstractAnimationJob::isPaused ( )
inline

Definition at line 70 of file qabstractanimationjob_p.h.

Referenced by QSmoothedAnimation::updateCurrentTime().

+ Here is the caller graph for this function:

◆ isRenderThreadJob()

bool QAbstractAnimationJob::isRenderThreadJob ( ) const
inline

Definition at line 95 of file qabstractanimationjob_p.h.

Referenced by QQuickAnimatorController::animationStateChanged(), qquick_syncback_helper(), qquickanimator_invalidate_jobs(), and qquickanimator_sync_before_start().

+ Here is the caller graph for this function:

◆ isRenderThreadProxy()

bool QAbstractAnimationJob::isRenderThreadProxy ( ) const
inline

Definition at line 96 of file qabstractanimationjob_p.h.

◆ isRunning()

bool QAbstractAnimationJob::isRunning ( )
inline

Definition at line 68 of file qabstractanimationjob_p.h.

References Running.

Referenced by QSmoothedAnimation::prepareForRestart(), QSmoothedAnimation::restart(), QSpringAnimation::restart(), QActionAnimation::setAnimAction(), QQuickBulkValueAnimator::setAnimValue(), QQuickAnimatorProxyJob::updateCurrentTime(), and QSmoothedAnimation::updateCurrentTime().

+ Here is the caller graph for this function:

◆ isStopped()

bool QAbstractAnimationJob::isStopped ( )
inline

Definition at line 69 of file qabstractanimationjob_p.h.

Referenced by setState(), QQuickBulkValueAnimator::updateCurrentTime(), QContinuingAnimationGroupJob::updateDirection(), QParallelAnimationGroupJob::updateDirection(), and QSequentialAnimationGroupJob::updateDirection().

+ Here is the caller graph for this function:

◆ loopCount()

int QAbstractAnimationJob::loopCount ( ) const
inline

Definition at line 54 of file qabstractanimationjob_p.h.

Referenced by QQuickAnimatorProxyJob::QQuickAnimatorProxyJob(), finished(), setLoopCount(), totalDuration(), and QQuickAnimatorProxyJob::updateLoopCount().

+ Here is the caller graph for this function:

◆ pause()

void QAbstractAnimationJob::pause ( )

Definition at line 533 of file qabstractanimationjob.cpp.

References m_state, Paused, qWarning, setState(), and Stopped.

Referenced by setDisableUserControl(), QQuickTimeLine::sync(), QQuickTimeLine::sync(), and QSequentialAnimationGroupJob::updateState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAnimationChangeListener()

void QAbstractAnimationJob::removeAnimationChangeListener ( QAnimationJobChangeListener * listener,
QAbstractAnimationJob::ChangeTypes changes )

Definition at line 634 of file qabstractanimationjob.cpp.

References changeListeners, CurrentTime, QSet< T >::end(), it, and m_hasCurrentTimeChangeListeners.

Referenced by QQuickAnimationControllerPrivate::animationFinished(), and QQuickTransitionInstance::removeStateChangeListener().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resume()

void QAbstractAnimationJob::resume ( )

Definition at line 543 of file qabstractanimationjob.cpp.

References m_state, Paused, qWarning, Running, and setState().

+ Here is the call graph for this function:

◆ setCurrentTime()

void QAbstractAnimationJob::setCurrentTime ( int msecs)

Definition at line 432 of file qabstractanimationjob.cpp.

References Backward, currentLoopChanged(), currentTimeChanged(), duration(), fireTopLevelAnimationLoopChanged(), Forward, m_currentLoop, m_currentLoopStartTime, m_currentTime, m_direction, m_group, m_hasCurrentTimeChangeListeners, m_loopCount, m_totalCurrentTime, m_uncontrolledFinishTime, qMax(), qMin(), RETURN_IF_DELETED, stop(), and updateCurrentTime().

Referenced by QQuickPropertyAnimationPrivate::animationCurrentLoopChanged(), complete(), setState(), and QSequentialAnimationGroupJob::updateCurrentTime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDirection()

void QAbstractAnimationJob::setDirection ( QAbstractAnimationJob::Direction direction)

Definition at line 385 of file qabstractanimationjob.cpp.

References Backward, direction(), duration(), QQmlAnimationTimer::ensureTimerUpdate(), m_currentLoop, m_currentTime, m_direction, m_hasRegisteredTimer, m_loopCount, m_state, m_timer, Stopped, QQmlAnimationTimer::updateAnimationTimer(), and updateDirection().

Referenced by QSequentialAnimationGroupJob::updateDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDisableUserControl()

void QAbstractAnimationJob::setDisableUserControl ( )

Definition at line 563 of file qabstractanimationjob.cpp.

References m_disableUserControl, pause(), and start().

+ Here is the call graph for this function:

◆ setEnableUserControl()

void QAbstractAnimationJob::setEnableUserControl ( )

Definition at line 553 of file qabstractanimationjob.cpp.

References m_disableUserControl.

◆ setLoopCount()

void QAbstractAnimationJob::setLoopCount ( int loopCount)

Definition at line 413 of file qabstractanimationjob.cpp.

References loopCount(), m_loopCount, and updateLoopCount().

Referenced by QQuickAnimatorProxyJob::QQuickAnimatorProxyJob(), QQuickItemViewPrivate::QQuickItemViewPrivate(), QQuickAbstractAnimationPrivate::animationFinished(), QQuickAnimatorPrivate::apply(), QQuickAnimationController::reload(), QQuickAnimationGroupPrivate::restartFromCurrentLoop(), and QQuickAnimatorProxyJob::updateLoopCount().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setState()

void QAbstractAnimationJob::setState ( QAbstractAnimationJob::State state)
protected

Definition at line 297 of file qabstractanimationjob.cpp.

References Backward, duration(), QQmlAnimationTimer::ensureTimerUpdate(), finished(), fireTopLevelAnimationLoopChanged(), Forward, QQmlAnimationTimer::instance(), isStopped(), m_currentLoop, m_currentLoopStartTime, m_currentTime, m_direction, m_group, m_hasRegisteredTimer, m_loopCount, m_state, m_timer, m_totalCurrentTime, m_uncontrolledFinishTime, newState(), Paused, Q_ASSERT, QQmlAnimationTimer::registerAnimation(), RETURN_IF_DELETED, Running, setCurrentTime(), stateChanged(), Stopped, totalDuration(), QQmlAnimationTimer::unregisterAnimation(), and updateState().

Referenced by complete(), pause(), resume(), start(), and stop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ start()

void QAbstractAnimationJob::start ( )

Definition at line 501 of file qabstractanimationjob.cpp.

References QQmlEnginePrivate::designerMode(), duration(), m_currentTime, m_state, m_totalCurrentTime, Running, setState(), state(), Stopped, and totalDuration().

Referenced by QQuickAbstractAnimationPrivate::commence(), QQuickItemViewPrivate::refill(), QSmoothedAnimation::restart(), setDisableUserControl(), QQuickTransitionInstance::start(), QQuickTimeLine::updateCurrentTime(), QQuickFrameAnimationPrivate::updateState(), and QSequentialAnimationGroupJob::updateState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ state()

QAbstractAnimationJob::State QAbstractAnimationJob::state ( ) const
inline

◆ stateChanged()

void QAbstractAnimationJob::stateChanged ( QAbstractAnimationJob::State newState,
QAbstractAnimationJob::State oldState )
protected

Definition at line 597 of file qabstractanimationjob.cpp.

References changeListeners, newState(), RETURN_IF_DELETED, and StateChange.

Referenced by ~QAbstractAnimationJob(), and setState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop()

◆ topLevelAnimationLoopChanged()

virtual void QAbstractAnimationJob::topLevelAnimationLoopChanged ( )
inlineprotectedvirtual

Reimplemented in QAnimationGroupJob, and QQuickBulkValueAnimator.

Definition at line 104 of file qabstractanimationjob_p.h.

Referenced by fireTopLevelAnimationLoopChanged(), and QQuickBulkValueAnimator::topLevelAnimationLoopChanged().

+ Here is the caller graph for this function:

◆ totalDuration()

int QAbstractAnimationJob::totalDuration ( ) const

Definition at line 421 of file qabstractanimationjob.cpp.

References duration(), and loopCount().

Referenced by QSequentialAnimationGroupJob::duration(), setState(), and start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCurrentTime()

virtual void QAbstractAnimationJob::updateCurrentTime ( int )
inlineprotectedvirtual

◆ updateDirection()

void QAbstractAnimationJob::updateDirection ( QAbstractAnimationJob::Direction direction)
protectedvirtual

Reimplemented in QContinuingAnimationGroupJob, QParallelAnimationGroupJob, and QSequentialAnimationGroupJob.

Definition at line 577 of file qabstractanimationjob.cpp.

References direction(), and Q_UNUSED.

Referenced by setDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLoopCount()

virtual void QAbstractAnimationJob::updateLoopCount ( int )
inlineprotectedvirtual

Reimplemented in QQuickAnimatorProxyJob.

Definition at line 101 of file qabstractanimationjob_p.h.

Referenced by setLoopCount().

+ Here is the caller graph for this function:

◆ updateState()

void QAbstractAnimationJob::updateState ( QAbstractAnimationJob::State newState,
QAbstractAnimationJob::State oldState )
protectedvirtual

Reimplemented in QQuickBoundaryReturnJob, QContinuingAnimationGroupJob, QParallelAnimationGroupJob, QSequentialAnimationGroupJob, QQuickAnimatorProxyJob, ParallelAnimationWrapper, QSmoothedAnimation, and QSpringAnimation.

Definition at line 570 of file qabstractanimationjob.cpp.

References newState(), and Q_UNUSED.

Referenced by setState(), QContinuingAnimationGroupJob::updateState(), QParallelAnimationGroupJob::updateState(), and QSequentialAnimationGroupJob::updateState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userControlDisabled()

bool QAbstractAnimationJob::userControlDisabled ( ) const

Definition at line 558 of file qabstractanimationjob.cpp.

References m_disableUserControl.

Friends And Related Symbol Documentation

◆ operator<<

Q_QML_EXPORT QDebug operator<< ( QDebug ,
const QAbstractAnimationJob * job )
friend

Definition at line 656 of file qabstractanimationjob.cpp.

◆ QAnimationGroupJob

friend class QAnimationGroupJob
friend

Definition at line 151 of file qabstractanimationjob_p.h.

◆ QQmlAnimationTimer

friend class QQmlAnimationTimer
friend

Definition at line 150 of file qabstractanimationjob_p.h.

Member Data Documentation

◆ changeListeners

std::vector<ChangeListener> QAbstractAnimationJob::changeListeners
protected

◆ m_currentLoop

◆ m_currentLoopStartTime

int QAbstractAnimationJob::m_currentLoopStartTime
protected

◆ m_currentTime

◆ m_direction

◆ m_disableUserControl

bool QAbstractAnimationJob::m_disableUserControl
protected

◆ m_group

QAnimationGroupJob* QAbstractAnimationJob::m_group
protected

◆ m_hasCurrentTimeChangeListeners

bool QAbstractAnimationJob::m_hasCurrentTimeChangeListeners
protected

◆ m_hasRegisteredTimer

bool QAbstractAnimationJob::m_hasRegisteredTimer
protected

Definition at line 142 of file qabstractanimationjob_p.h.

Referenced by ~QAbstractAnimationJob(), setDirection(), and setState().

◆ m_isGroup

bool QAbstractAnimationJob::m_isGroup
protected

Definition at line 144 of file qabstractanimationjob_p.h.

Referenced by QAnimationGroupJob::QAnimationGroupJob().

◆ m_isPause

bool QAbstractAnimationJob::m_isPause
protected

Definition at line 143 of file qabstractanimationjob_p.h.

Referenced by QPauseAnimationJob::QPauseAnimationJob().

◆ m_isRenderThreadJob

bool QAbstractAnimationJob::m_isRenderThreadJob
protected

Definition at line 147 of file qabstractanimationjob_p.h.

Referenced by QQuickAnimatorJob::QQuickAnimatorJob().

◆ m_isRenderThreadProxy

bool QAbstractAnimationJob::m_isRenderThreadProxy
protected

◆ m_loopCount

◆ m_selfDeletable

SelfDeletable QAbstractAnimationJob::m_selfDeletable

Definition at line 98 of file qabstractanimationjob_p.h.

◆ m_state

◆ m_timer

QQmlAnimationTimer* QAbstractAnimationJob::m_timer = nullptr
protected

Definition at line 140 of file qabstractanimationjob_p.h.

Referenced by ~QAbstractAnimationJob(), setDirection(), and setState().

◆ m_totalCurrentTime

int QAbstractAnimationJob::m_totalCurrentTime
protected

◆ m_uncontrolledFinishTime


The documentation for this class was generated from the following files: