Skip to content

PythonQt.QtCore.QAbstractAnimation

QAbstractAnimation

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

The class defines the functions for the functionality shared by all animations. By inheriting this class, you can create custom animations that plug into the rest of the animation framework.

The progress of an animation is given by its current time (currentLoopTime()), which is measured in milliseconds from the start of the animation (0) to its end (duration()). The value is updated automatically while the animation is running. It can also be set directly with setCurrentTime().

At any point an animation is in one of three states: Running, Stopped, or Paused--as defined by the State enum. The current state can be changed by calling start(), stop(), pause(), or resume(). An animation will always reset its current time when it is started. If paused, it will continue with the same current time when resumed. When an animation is stopped, it cannot be resumed, but will keep its current time (until started again). QAbstractAnimation will emit stateChanged() whenever its state changes.

An animation can loop any number of times by setting the loopCount property. When an animation's current time reaches its duration(), it will reset the current time and keep running. A loop count of 1 (the default value) means that the animation will run one time. Note that a duration of -1 means that the animation will run until stopped; the current time will increase indefinitely. When the current time equals duration() and the animation is in its final loop, the Stopped state is entered, and the finished() signal is emitted.

QAbstractAnimation provides pure virtual functions used by subclasses to track the progress of the animation: duration() and updateCurrentTime(). The duration() function lets you report a duration for the animation (as discussed above). The animation framework calls updateCurrentTime() when current time has changed. By reimplementing this function, you can track the animation progress. Note that neither the interval between calls nor the number of calls to this function are defined; though, it will normally be 60 updates per second.

By reimplementing updateState(), you can track the animation's state changes, which is particularly useful for animations that are not driven by time.

Source: https://doc.qt.io/archives/qt-5.15/qabstractanimation.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
Backward attribute Any
DeleteWhenStopped attribute Any
DeletionPolicy attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
Direction attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
Forward attribute Any
KeepWhenStopped attribute Any
Paused attribute Any
Running attribute Any
State attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
Stopped attribute Any
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
blockSignals function (self, b: Any) -> bool X.blockSignals(b) -> bool
childEvent function (self, event: Any) -> Any
children function (self) -> tuple X.children() -> tuple
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object
connect function (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool X.connect(signal, receiver, slot, type) -> bool
currentLoop attribute int This property holds the current loop of the animation
currentLoopChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtCore.QAbstractAnimation.currentLoopChanged; argument details are not documented.
currentLoopTime function (self) -> int X.currentLoopTime() -> int
currentTime attribute int This property holds the current time and progress of the animation
customEvent function (self, event: Any) -> Any
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!)
deleteLater function (self) -> Any
destroyed function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtCore.QAbstractAnimation.destroyed; argument details are not documented.
direction attribute Any This property holds the direction of the animation when it is in [Running](https://doc.qt.io/archives/qt-5.15/qabstractanimation.html#State-enum) state.
directionChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtCore.QAbstractAnimation.directionChanged; argument details are not documented.
disconnect function (self, signal: Any, receiver: Any, slot: Any) -> bool X.disconnect(signal, receiver, slot) -> bool
dumpObjectInfo function (self) -> Any
dumpObjectTree function (self) -> Any
duration attribute int This property holds the duration of the animation.
dynamicPropertyNames function (self) -> Any
event function (self, event: Any) -> bool X.event(event) -> bool
eventFilter function (self, watched: Any, event: Any) -> bool X.eventFilter(watched, event) -> bool
findChild function (self, type: Any, name: Any) -> Any X.findChild(type, name) -> PythonQt.private.QObject
findChildren function (self, type: Any, name: Any) -> tuple X.findChildren(type, name) -> tuple
finished function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtCore.QAbstractAnimation.finished; argument details are not documented.
group function (self) -> Any X.group() -> PythonQt.QtCore.QAnimationGroup
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name
installEventFilter function (self, filterObj: Any) -> Any
isSignalConnected function (self, signal: Any) -> bool X.isSignalConnected(signal) -> bool
isWidgetType function (self) -> bool X.isWidgetType() -> bool
isWindowType function (self) -> bool X.isWindowType() -> bool
killTimer function (self, id: Any) -> Any
loopCount attribute int This property holds the loop count of the animation
metaObject function (self) -> Any X.metaObject() -> PythonQt.QtCore.QMetaObject
moveToThread function (self, thread: Any) -> Any
objectName attribute Any
objectNameChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtCore.QAbstractAnimation.objectNameChanged; argument details are not documented.
parent function (self) -> Any X.parent() -> PythonQt.private.QObject
pause function (self) -> None Pauses the animation.
property function (self, name: Any) -> Any X.property(name) -> object
removeEventFilter function (self, obj: Any) -> Any
resume function (self) -> None Resumes the animation after it was paused.
sender function (self) -> Any X.sender() -> PythonQt.private.QObject
senderSignalIndex function (self) -> int X.senderSignalIndex() -> int
setCurrentTime function (self, msecs: int) -> None
setDirection function (self, direction: Any) -> None
setLoopCount function (self, loopCount: int) -> None
setObjectName function (self, name: Any) -> Any
setParent function (self, parent: Any) -> Any
setPaused function (self, a: Any) -> None If paused is true, the animation is paused.
setProperty function (self, name: Any, value: Any) -> bool X.setProperty(name, value) -> bool
signalsBlocked function (self) -> bool X.signalsBlocked() -> bool
start function (self, policy: Any) -> None Starts the animation.
startTimer function (self, interval: Any, timerType: Any) -> int X.startTimer(interval, timerType) -> int
state attribute Any State of the animation.
stateChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.QtCore.QAbstractAnimation.stateChanged; argument details are not documented.
stop function (self) -> None Stops the animation.
thread function (self) -> Any
timerEvent function (self, event: Any) -> Any
totalDuration function (self) -> int X.totalDuration() -> int
tr function (self, text: Any, ambig: Any, n: Any) -> str X.tr(text, ambig, n) -> str
updateCurrentTime function (self, currentTime: int) -> None This pure virtual function is called every time the animation's currentTime changes.
updateDirection function (self, direction: Any) -> None This virtual function is called by [QAbstractAnimation](https://doc.qt.io/archives/qt-5.15/qabstractanimation.html) when the direction of the animation is changed.
updateState function (self, newState: Any, oldState: Any) -> None X.updateState(newState, oldState)