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
QSpringAnimation Class Reference
+ Inheritance diagram for QSpringAnimation:
+ Collaboration diagram for QSpringAnimation:

Public Types

enum  Mode { Track , Velocity , Spring }
 
typedef QHash< QQmlProperty, QSpringAnimation * > ActiveAnimationHash
 
typedef ActiveAnimationHash::Iterator ActiveAnimationHashIt
 
- Public Types inherited from QAbstractAnimationJob
enum  Direction { Forward , Backward }
 
enum  State { Stopped , Paused , Running }
 
enum  ChangeType { Completion = 0x01 , StateChange = 0x02 , CurrentLoop = 0x04 , CurrentTime = 0x08 }
 

Public Member Functions

 QSpringAnimation (QQuickSpringAnimationPrivate *=nullptr)
 
 ~QSpringAnimation ()
 
int duration () const override
 
void restart ()
 
void init ()
 
void clearTemplate ()
 
- Public Member Functions inherited from QAbstractAnimationJob
 QAbstractAnimationJob ()
 
virtual ~QAbstractAnimationJob ()
 
QAnimationGroupJobgroup () const
 
int loopCount () const
 
void setLoopCount (int loopCount)
 
int totalDuration () 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

qreal currentValue
 
qreal to
 
qreal velocity
 
int startTime
 
int dura
 
int lastTime
 
int stopTime
 
Mode mode
 
QQmlProperty target
 
qreal velocityms
 
qreal maxVelocity
 
qreal mass
 
qreal spring
 
qreal damping
 
qreal epsilon
 
qreal modulus
 
bool useMass: 1
 
bool haveModulus: 1
 
bool skipUpdate: 1
 
- Public Attributes inherited from QAbstractAnimationJob
SelfDeletable m_selfDeletable
 

Protected Member Functions

void updateCurrentTime (int time) override
 
void updateState (QAbstractAnimationJob::State, QAbstractAnimationJob::State) override
 
void debugAnimation (QDebug d) const override
 
- Protected Member Functions inherited from QAbstractAnimationJob
virtual void updateLoopCount (int)
 
virtual void updateDirection (QAbstractAnimationJob::Direction direction)
 
virtual void topLevelAnimationLoopChanged ()
 
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)
 

Additional Inherited Members

- Protected Attributes inherited from QAbstractAnimationJob
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
 

Detailed Description

Definition at line 21 of file qquickspringanimation.cpp.

Member Typedef Documentation

◆ ActiveAnimationHash

◆ ActiveAnimationHashIt

Member Enumeration Documentation

◆ Mode

Enumerator
Track 
Velocity 
Spring 

Definition at line 39 of file qquickspringanimation.cpp.

Constructor & Destructor Documentation

◆ QSpringAnimation()

QSpringAnimation::QSpringAnimation ( QQuickSpringAnimationPrivate * priv = nullptr)

Definition at line 107 of file qquickspringanimation.cpp.

◆ ~QSpringAnimation()

QSpringAnimation::~QSpringAnimation ( )

Definition at line 131 of file qquickspringanimation.cpp.

References QQuickSpringAnimationPrivate::activeAnimations, QHash< Key, T >::cbegin(), QHash< Key, T >::cend(), QHash< Key, T >::constFind(), QHash< Key, T >::erase(), and it.

+ Here is the call graph for this function:

Member Function Documentation

◆ clearTemplate()

void QSpringAnimation::clearTemplate ( )
inline

Definition at line 61 of file qquickspringanimation.cpp.

◆ debugAnimation()

void QSpringAnimation::debugAnimation ( QDebug d) const
overrideprotectedvirtual

Reimplemented from QAbstractAnimationJob.

Definition at line 284 of file qquickspringanimation.cpp.

References d, damping, Qt::dec(), epsilon, Qt::hex(), mass, maxVelocity, modulus, spring, to, and velocity.

+ Here is the call graph for this function:

◆ duration()

int QSpringAnimation::duration ( ) const
overridevirtual

Reimplemented from QAbstractAnimationJob.

Definition at line 150 of file qquickspringanimation.cpp.

◆ init()

void QSpringAnimation::init ( )

Definition at line 166 of file qquickspringanimation.cpp.

References lastTime, startTime, and stopTime.

Referenced by restart(), and updateState().

+ Here is the caller graph for this function:

◆ restart()

void QSpringAnimation::restart ( )

Definition at line 155 of file qquickspringanimation.cpp.

References DELAY_STOP_TIMER_INTERVAL, QElapsedTimer::elapsed(), QQuickSpringAnimationPrivate::elapsed, init(), QAbstractAnimationJob::isRunning(), skipUpdate, and stopTime.

+ Here is the call graph for this function:

◆ updateCurrentTime()

void QSpringAnimation::updateCurrentTime ( int time)
overrideprotectedvirtual

Reimplemented from QAbstractAnimationJob.

Definition at line 172 of file qquickspringanimation.cpp.

References QQmlPropertyData::BypassInterceptor, currentValue, damping, QQmlPropertyData::DontRemoveBinding, dura, QElapsedTimer::elapsed(), elapsed(), QQuickSpringAnimationPrivate::elapsed, epsilon, haveModulus, i, lastTime, mass, maxVelocity, modulus, qAbs(), skipUpdate, Spring, spring, startTime, QAbstractAnimationJob::stop(), stopTime, time, to, Track, useMass, velocity, velocityms, and QQmlPropertyPrivate::write().

+ Here is the call graph for this function:

◆ updateState()

void QSpringAnimation::updateState ( QAbstractAnimationJob::State newState,
QAbstractAnimationJob::State  )
overrideprotectedvirtual

Reimplemented from QAbstractAnimationJob.

Definition at line 278 of file qquickspringanimation.cpp.

References init(), newState(), and QAbstractAnimationJob::Running.

+ Here is the call graph for this function:

Member Data Documentation

◆ currentValue

qreal QSpringAnimation::currentValue

Definition at line 32 of file qquickspringanimation.cpp.

Referenced by updateCurrentTime().

◆ damping

qreal QSpringAnimation::damping

Definition at line 51 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ dura

int QSpringAnimation::dura

Definition at line 36 of file qquickspringanimation.cpp.

Referenced by updateCurrentTime().

◆ epsilon

qreal QSpringAnimation::epsilon

Definition at line 52 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ haveModulus

bool QSpringAnimation::haveModulus

Definition at line 56 of file qquickspringanimation.cpp.

Referenced by updateCurrentTime().

◆ lastTime

int QSpringAnimation::lastTime

Definition at line 37 of file qquickspringanimation.cpp.

Referenced by init(), and updateCurrentTime().

◆ mass

qreal QSpringAnimation::mass

Definition at line 49 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ maxVelocity

qreal QSpringAnimation::maxVelocity

Definition at line 48 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ mode

Mode QSpringAnimation::mode

Definition at line 44 of file qquickspringanimation.cpp.

◆ modulus

qreal QSpringAnimation::modulus

Definition at line 53 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ skipUpdate

bool QSpringAnimation::skipUpdate

Definition at line 57 of file qquickspringanimation.cpp.

Referenced by restart(), and updateCurrentTime().

◆ spring

qreal QSpringAnimation::spring

Definition at line 50 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ startTime

int QSpringAnimation::startTime

Definition at line 35 of file qquickspringanimation.cpp.

Referenced by init(), and updateCurrentTime().

◆ stopTime

int QSpringAnimation::stopTime

Definition at line 38 of file qquickspringanimation.cpp.

Referenced by init(), restart(), and updateCurrentTime().

◆ target

QQmlProperty QSpringAnimation::target

Definition at line 45 of file qquickspringanimation.cpp.

◆ to

qreal QSpringAnimation::to

Definition at line 33 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ useMass

bool QSpringAnimation::useMass

Definition at line 55 of file qquickspringanimation.cpp.

Referenced by updateCurrentTime().

◆ velocity

qreal QSpringAnimation::velocity

Definition at line 34 of file qquickspringanimation.cpp.

Referenced by debugAnimation(), and updateCurrentTime().

◆ velocityms

qreal QSpringAnimation::velocityms

Definition at line 47 of file qquickspringanimation.cpp.

Referenced by updateCurrentTime().


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