Skip to content

SequentialAnimationGroup

Qt Base Class: QSequentialAnimationGroup

Signature: QSequentialAnimationGroup(self, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
AnimationGroupMixin
prettyqt.core.animationgroup
QSequentialAnimationGroup
PySide6.QtCore
QSequentialAnimationGroup(self, parent: Optional[PySide6.QtCore.QObject] \= None) -> None

⋔ Inheritance diagram

graph TD
  1473299830640["core.SequentialAnimationGroup"]
  1473299826736["core.AnimationGroupMixin"]
  1473299791600["core.AbstractAnimationMixin"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473289040368["QtCore.QSequentialAnimationGroup"]
  1473289072576["QtCore.QAnimationGroup"]
  1473289055008["QtCore.QAbstractAnimation"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299826736 --> 1473299830640
  1473299791600 --> 1473299826736
  1473299815024 --> 1473299791600
  140713234304496 --> 1473299815024
  1473289040368 --> 1473299830640
  1473289072576 --> 1473289040368
  1473289055008 --> 1473289072576
  1473288842240 --> 1473289055008
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: AnimationGroupMixin, QSequentialAnimationGroup

Sequential group of animations.

Source code in prettyqt\core\sequentialanimationgroup.py
class SequentialAnimationGroup(core.AnimationGroupMixin, core.QSequentialAnimationGroup):
    """Sequential group of animations."""

    def reverse(self):
        """Reverse animation in-place by switching start and end values."""
        for anim in reversed(list(self)):
            old_start = anim.startValue()
            old_end = anim.endValue()
            anim.setStartValue(old_end)
            anim.setEndValue(old_start)

    def reversed(self) -> SequentialAnimationGroup:
        """Return a reversed copy of the animation."""
        new = core.MetaObject(self.metaObject()).copy(self)
        for anim in reversed(list(self)):
            animation = core.MetaObject(anim.get_metaobject()).copy(anim)
            animation = animation.reversed()
            new.addAnimation(animation)
        return new

    def append_reversed(self) -> core.SequentialAnimationGroup:
        """Return copy of animation with appended reverse animation."""
        revers = self.reversed()
        animation = core.SequentialAnimationGroup()
        animation.addAnimation(self)
        animation.addAnimation(revers)
        return animation

append_reversed() -> core.SequentialAnimationGroup

Return copy of animation with appended reverse animation.

Source code in prettyqt\core\sequentialanimationgroup.py
def append_reversed(self) -> core.SequentialAnimationGroup:
    """Return copy of animation with appended reverse animation."""
    revers = self.reversed()
    animation = core.SequentialAnimationGroup()
    animation.addAnimation(self)
    animation.addAnimation(revers)
    return animation

reverse()

Reverse animation in-place by switching start and end values.

Source code in prettyqt\core\sequentialanimationgroup.py
def reverse(self):
    """Reverse animation in-place by switching start and end values."""
    for anim in reversed(list(self)):
        old_start = anim.startValue()
        old_end = anim.endValue()
        anim.setStartValue(old_end)
        anim.setEndValue(old_start)

reversed() -> SequentialAnimationGroup

Return a reversed copy of the animation.

Source code in prettyqt\core\sequentialanimationgroup.py
def reversed(self) -> SequentialAnimationGroup:
    """Return a reversed copy of the animation."""
    new = core.MetaObject(self.metaObject()).copy(self)
    for anim in reversed(list(self)):
        animation = core.MetaObject(anim.get_metaobject()).copy(anim)
        animation = animation.reversed()
        new.addAnimation(animation)
    return new

⌗ Property table

Qt Property Type Doc
objectName QString
state QAbstractAnimation::State
loopCount int
currentTime int
currentLoop int
direction QAbstractAnimation::Direction
duration int
currentAnimation QAbstractAnimation