QSequentialAnimationGroup Class
Die Klasse „QSequentialAnimationGroup“ stellt eine sequenzielle Gruppe von Animationen bereit. Mehr...
| Header: | #include <QSequentialAnimationGroup> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Erbt von: | QAnimationGroup |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QSequentialAnimationGroup ist Teil des Animations-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) |
Neu implementierte öffentliche Funktionen
| virtual int | duration() const override |
Signale
| void | currentAnimationChanged(QAbstractAnimation *current) |
Neu implementierte 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 |
Ausführliche Beschreibung
QSequentialAnimationGroup ist eine „ QAnimationGroup “, die ihre Animationen nacheinander abspielt, d. h., sie startet eine Animation erst, nachdem die vorherige vollständig abgespielt wurde. Die Animationen werden in der Reihenfolge abgespielt, in der sie der Gruppe hinzugefügt wurden (mit addAnimation() oder insertAnimation()). Die Animationsgruppe endet, sobald die letzte Animation beendet ist.
Zu jedem Zeitpunkt ist höchstens eine Animation in der Gruppe aktiv; diese 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 anderen Gruppen hinzugefügt werden. Sie können auch addPause() oder insertPause() aufrufen, um einer sequenziellen Animationsgruppe eine Pause hinzuzufügen.
QSequentialAnimationGroup *group = new QSequentialAnimationGroup;
group->addAnimation(anim1);
group->addAnimation(anim2);
group->start();In diesem Beispiel sind „ anim1 “ und „ anim2 “ zwei bereits eingerichtete „ QPropertyAnimations“.
Siehe auch „ QAnimationGroup “, „ QAbstractAnimation “ und „Das Animations-Framework“.
Dokumentation zu den Eigenschaften
[bindable read-only] currentAnimation : QAbstractAnimation*
Hinweis: Diese Eigenschaft unterstützt „ QProperty “-Bindungen.
Diese Eigenschaft enthält die Animation zum aktuellen Zeitpunkt.
Zugriffsfunktionen:
| QAbstractAnimation * | currentAnimation() const |
Notifier-Signal:
| void | currentAnimationChanged(QAbstractAnimation *current) |
Dokumentation der Mitgliedsfunktionen
QSequentialAnimationGroup::QSequentialAnimationGroup(QObject *parent = nullptr)
Erstellt eine `QSequentialAnimationGroup`. ` parent ` wird an den Konstruktor von ` QObject` übergeben.
[virtual noexcept] QSequentialAnimationGroup::~QSequentialAnimationGroup()
Löscht die Animationsgruppe. Dabei werden auch alle zugehörigen Animationen gelöscht.
QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)
Fügt dieser Animationsgruppe eine Pause von msecs 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 sich „ currentAnimation “ geändert hat. „ current “ ist die aktuelle Animation.
Hinweis: Notifier -Signal für die Eigenschaft „ currentAnimation “.
Siehe auch ` currentAnimation()`.
[override virtual] int QSequentialAnimationGroup::duration() const
Implementiert: ` QAbstractAnimation::duration()` const.
[override virtual protected] bool QSequentialAnimationGroup::event(QEvent *event)
Umsetzt: ` QAnimationGroup::event(QEvent *event)`.
QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)
Fügt an der Stelle „ index “ in dieser Animationsgruppe eine Pause von msecs Millisekunden ein.
Siehe auch addPause() und QAnimationGroup::insertAnimation().
[override virtual protected] void QSequentialAnimationGroup::updateCurrentTime(int currentTime)
Implementiert: QAbstractAnimation::updateCurrentTime(int currentTime).
[override virtual protected] void QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)
Implementiert: ` QAbstractAnimation::updateDirection` (`QAbstractAnimation::Direction direction`).
[override virtual protected] void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
Implementiert: ` QAbstractAnimation::updateState` (`QAbstractAnimation::State newState, QAbstractAnimation::State oldState`).
© 2026 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.