CopperSpice API  1.9.2
QSequentialAnimationGroup Class Reference

The QSequentialAnimationGroup class provides a sequential group of animations. More...

Inheritance diagram for QSequentialAnimationGroup:
QAnimationGroup QAbstractAnimation QObject

Public Signals

void currentAnimationChanged (QAbstractAnimation *current)
 
- Public Signals inherited from QAbstractAnimation
void currentLoopChanged (int currentLoop)
 
void directionChanged (QAbstractAnimation::Direction newDirection)
 
void finished ()
 
void stateChanged (QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

 QSequentialAnimationGroup (QObject *parent=nullptr)
 
 ~QSequentialAnimationGroup ()
 
QPauseAnimationaddPause (int msecs)
 
QAbstractAnimationcurrentAnimation () const
 
int duration () const override
 
QPauseAnimationinsertPause (int index, int msecs)
 
- Public Methods inherited from QAnimationGroup
 QAnimationGroup (QObject *parent=nullptr)
 
 ~QAnimationGroup ()
 
void addAnimation (QAbstractAnimation *animation)
 
QAbstractAnimationanimationAt (int index) const
 
int animationCount () const
 
void clear ()
 
int indexOfAnimation (QAbstractAnimation *animation) const
 
void insertAnimation (int index, QAbstractAnimation *animation)
 
void removeAnimation (QAbstractAnimation *animation)
 
QAbstractAnimationtakeAnimation (int index)
 
- Public Methods inherited from QAbstractAnimation
 QAbstractAnimation (QObject *parent=nullptr)
 
virtual ~QAbstractAnimation ()
 
int currentLoop () const
 
int currentLoopTime () const
 
int currentTime () const
 
Direction direction () const
 
QAnimationGroupgroup () const
 
int loopCount () const
 
void setDirection (Direction direction)
 
void setLoopCount (int loopCount)
 
State state () const
 
int totalDuration () const
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

bool event (QEvent *event) override
 
void updateCurrentTime (int currentTime) override
 
void updateDirection (QAbstractAnimation::Direction direction) override
 
void updateState (QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Properties

 currentAnimation
 
- Properties inherited from QAbstractAnimation
 currentLoop
 
 currentTime
 
 direction
 
 duration
 
 loopCount
 
 state
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Types inherited from QAbstractAnimation
enum  DeletionPolicy
 
enum  Direction
 
enum  State
 
- Public Slots inherited from QAbstractAnimation
void pause ()
 
void resume ()
 
void setCurrentTime (int msecs)
 
void setPaused (bool paused)
 
void start (QAbstractAnimation::DeletionPolicy policy=KeepWhenStopped)
 
void stop ()
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 

Detailed Description

The QSequentialAnimationGroup class provides a sequential group of animations.

QSequentialAnimationGroup is a QAnimationGroup that runs its animations in sequence, i.e., it starts one animation after another has finished playing. The animations are played in the order they are added to the group (using addAnimation() or insertAnimation()). The animation group finishes when its last animation has finished.

At each moment there is at most one animation that is active in the group, it is returned by currentAnimation(). An empty group has no current animation. A sequential animation group can be treated as any other animation, for example it can be started, stopped, and added to other groups. You can also call addPause() or insertPause() to add a pause to a sequential animation group.

In this example anim1 and anim2 are existing QPropertyAnimations.

group->addAnimation(anim1);
group->addAnimation(anim2);
group->start();
See also
QAnimationGroup, QAbstractAnimation, Animation Technology

Constructor & Destructor Documentation

QSequentialAnimationGroup::QSequentialAnimationGroup ( QObject parent = nullptr)

Constructs a QSequentialAnimationGroup. The parent is passed to the QObject constructor.

QSequentialAnimationGroup::~QSequentialAnimationGroup ( )

Destroys the animation group. It will also destroy all its animations.

Method Documentation

QPauseAnimation * QSequentialAnimationGroup::addPause ( int  msecs)

Adds a pause of msecs to this animation group. The pause is considered as a special type of animation, thus animationCount will be increased by one.

See also
insertPause(), QAnimationGroup::addAnimation()
QAbstractAnimation * QSequentialAnimationGroup::currentAnimation ( ) const

Returns the value of the property currentAnimation which contains the animation in the current time.

void QSequentialAnimationGroup::currentAnimationChanged ( QAbstractAnimation current)
signal

QSequentialAnimationGroup emits this signal when currentAnimation has been changed. The parameter current is the current animation.

See also
currentAnimation()
int QSequentialAnimationGroup::duration ( ) const
overridevirtual
bool QSequentialAnimationGroup::event ( QEvent event)
overrideprotectedvirtual

Reimplemented from QAnimationGroup::event()

QPauseAnimation * QSequentialAnimationGroup::insertPause ( int  index,
int  msecs 
)

Inserts a pause of msecs milliseconds at index in this animation group.

See also
addPause(), QAnimationGroup::insertAnimation()
void QSequentialAnimationGroup::updateCurrentTime ( int  currentTime)
overrideprotectedvirtual
void QSequentialAnimationGroup::updateDirection ( QAbstractAnimation::Direction  direction)
overrideprotectedvirtual
void QSequentialAnimationGroup::updateState ( QAbstractAnimation::State  newState,
QAbstractAnimation::State  oldState 
)
overrideprotectedvirtual

Property Documentation

QSequentialAnimationGroup::currentAnimation

Returns the animation in the current time.

See also
currentAnimationChanged()
PropertiesClass Methods
read currentAnimation
notify currentAnimationChanged