QSequentialAnimationGroup Class
Die Klasse QSequentialAnimationGroup bietet eine sequentielle Gruppe von Animationen. Mehr...
Kopfzeile: | #include <QSequentialAnimationGroup> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Vererbungen: | QAnimationGroup |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QSequentialAnimationGroup ist Teil des Animation Frameworks.
Eigenschaften
- currentAnimation : QAbstractAnimation*
Öffentliche Funktionen
QSequentialAnimationGroup(QObject *parent = nullptr) | |
virtual | ~QSequentialAnimationGroup() |
QPauseAnimation * | addPause(int msecs) |
QBindable<QAbstractAnimation *> | bindableCurrentAnimation() const |
QAbstractAnimation * | currentAnimation() const |
QPauseAnimation * | insertPause(int index, int msecs) |
Reimplementierte öffentliche Funktionen
virtual int | duration() const override |
Signale
void | currentAnimationChanged(QAbstractAnimation *current) |
Reimplementierte geschützte Funktionen
virtual bool | event(QEvent *event) override |
virtual void | updateCurrentTime(int currentTime) override |
virtual void | updateDirection(QAbstractAnimation::Direction direction) override |
virtual void | updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override |
Detaillierte Beschreibung
QSequentialAnimationGroup ist eine QAnimationGroup, die ihre Animationen nacheinander abspielt, d.h. sie startet eine Animation, nachdem eine andere fertig abgespielt wurde. Die Animationen werden in der Reihenfolge abgespielt, in der sie der Gruppe hinzugefügt werden (mit addAnimation() oder insertAnimation()). Die Animationsgruppe wird beendet, wenn die letzte Animation zu Ende ist.
Zu jedem Zeitpunkt ist höchstens eine Animation in der Gruppe aktiv; sie wird von currentAnimation() zurückgegeben. Eine leere Gruppe hat keine aktuelle Animation.
Eine sequenzielle Animationsgruppe kann wie jede andere Animation behandelt werden, d. h. sie kann gestartet, gestoppt und zu anderen Gruppen hinzugefügt werden. Sie können auch addPause() oder insertPause() aufrufen, um eine Pause zu einer sequenziellen Animationsgruppe hinzuzufügen.
QSequentialAnimationGroup *group = new QSequentialAnimationGroup; group->addAnimation(anim1); group->addAnimation(anim2); group->start();
In diesem Beispiel handelt es sich bei anim1
und anim2
um zwei bereits eingerichtete QPropertyAnimations.
Siehe auch QAnimationGroup, QAbstractAnimation, und The Animation Framework.
Dokumentation der Eigenschaften
[bindable read-only]
currentAnimation : QAbstractAnimation*
Hinweis: Diese Eigenschaft unterstützt QProperty Bindungen.
Diese Eigenschaft hält die Animation in der aktuellen Zeit.
Dokumentation der Mitgliedsfunktionen
QSequentialAnimationGroup::QSequentialAnimationGroup(QObject *parent = nullptr)
Konstruiert eine QSequentialAnimationGroup. parent wird an den Konstruktor von QObject übergeben.
[virtual noexcept]
QSequentialAnimationGroup::~QSequentialAnimationGroup()
Zerstört die Animationsgruppe. Es werden auch alle ihre Animationen zerstört.
QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)
Fügt eine Pause von msecs zu dieser Animationsgruppe hinzu. Die Pause wird als eine besondere Art von Animation betrachtet, daher wird animationCount um eins erhöht.
Siehe auch insertPause() und QAnimationGroup::addAnimation().
[signal]
void QSequentialAnimationGroup::currentAnimationChanged(QAbstractAnimation *current)
QSequentialAnimationGroup gibt dieses Signal aus, wenn currentAnimation geändert wurde. current ist die aktuelle Animation.
Hinweis: Meldesignal für die Eigenschaft currentAnimation.
Siehe auch currentAnimation().
[override virtual]
int QSequentialAnimationGroup::duration() const
Reimplements: QAbstractAnimation::duration() const.
[override virtual protected]
bool QSequentialAnimationGroup::event(QEvent *event)
Reimplements: QAnimationGroup::event(QEvent *Event).
QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)
Fügt eine Pause von msecs Millisekunden bei index in diese Animationsgruppe ein.
Siehe auch addPause() und QAnimationGroup::insertAnimation().
[override virtual protected]
void QSequentialAnimationGroup::updateCurrentTime(int currentTime)
Reimplements: QAbstractAnimation::updateCurrentTime(int currentTime).
[override virtual protected]
void QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)
Reimplements: QAbstractAnimation::updateDirection(QAbstractAnimation::Direction direction).
[override virtual protected]
void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
Reimplements: QAbstractAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState).
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.