QAbstractClipAnimator Class
(Qt3DAnimation::QAbstractClipAnimator)QAbstractClipAnimator is the base class for types providing animation playback capabilities. More...
| Header: | #include <QAbstractClipAnimator> |
| qmake: | QT += 3danimation |
| Since: | Qt 5.9 |
| Instantiated By: | AbstractClipAnimator |
| Inherits: | Qt3DCore::QComponent |
| Inherited By: | Qt3DAnimation::QBlendedClipAnimator and Qt3DAnimation::QClipAnimator |
This class was introduced in Qt 5.9.
Public Types
| enum | Loops { Infinite } |
Properties
|
|
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
| Qt3DAnimation::QChannelMapper * | channelMapper() const |
| Qt3DAnimation::QClock * | clock() const |
| bool | isRunning() const |
| int | loopCount() const |
| float | normalizedTime() const |
- 2 public functions inherited from Qt3DCore::QComponent
- 13 public functions inherited from Qt3DCore::QNode
- 30 public functions inherited from QObject
Public Slots
| void | setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper) |
| void | setClock(Qt3DAnimation::QClock *clock) |
| void | setLoopCount(int loops) |
| void | setNormalizedTime(float timeFraction) |
| void | setRunning(bool running) |
| void | start() |
| void | stop() |
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
| void | channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper) |
| void | clockChanged(Qt3DAnimation::QClock *clock) |
| void | loopCountChanged(int loops) |
| void | normalizedTimeChanged(float index) |
| void | runningChanged(bool running) |
- 3 signals inherited from Qt3DCore::QComponent
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Related Non-Members
| typedef | QNodePtr |
| typedef | QNodeVector |
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| Qt3DCore::QNodeId | qIdForNode(Qt3DCore::QNode *node) |
| Qt3DCore::QNodeIdVector | qIdsForNodes(const T &nodes) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO(Name, Value) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
- 9 static public members inherited from QObject
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
Subclasses of QAbstractClipAnimator can be aggregated by a QEntity to provide animation capabilities. The animator components provide an interface for controlling the animation (e.g. start, stop). Each animator type requires some form of animation data such as a QAbstractAnimationClip as well as a QChannelMapper which describes how the channels in the animation clip should be mapped onto the properties of the objects you wish to animate.
The following subclasses are available:
Member Type Documentation
enum QAbstractClipAnimator::Loops
Holds the number of times the animation should play.
| Constant | Value | Description |
|---|---|---|
Qt3DAnimation::QAbstractClipAnimator::Infinite | -1 | This will repeat the loop continuously until it is explicitly stopped. |
Property Documentation
channelMapper : Qt3DAnimation::QChannelMapper*
This property holds the ChannelMapper that controls how the channels in the animation clip map onto the properties of the target objects.
Access functions:
| Qt3DAnimation::QChannelMapper * | channelMapper() const |
| void | setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper) |
Notifier signal:
| void | channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper) |
clock : Qt3DAnimation::QClock*
The clock controls the speed with which an animation is played.
Access functions:
| Qt3DAnimation::QClock * | clock() const |
| void | setClock(Qt3DAnimation::QClock *clock) |
Notifier signal:
| void | clockChanged(Qt3DAnimation::QClock *clock) |
loops : int
Holds the number of times the animation should play.
The value is 1 by default: the animation will be played once and then stop.
If set to QAbstractClipAnimator::Infinite, the animation will continuously repeat until it is explicitly stopped.
Access functions:
| int | loopCount() const |
| void | setLoopCount(int loops) |
Notifier signal:
| void | loopCountChanged(int loops) |
normalizedTime : float
This property holds the clips normalized time.
Access functions:
| float | normalizedTime() const |
| void | setNormalizedTime(float timeFraction) |
Notifier signal:
| void | normalizedTimeChanged(float index) |
running : bool
This property holds a boolean indicating whether the animation is currently running.
Access functions:
| bool | isRunning() const |
| void | setRunning(bool running) |
Notifier signal:
| void | runningChanged(bool running) |
Member Function Documentation
[slot] void QAbstractClipAnimator::start()
Starts the animation.
[slot] void QAbstractClipAnimator::stop()
Stops the animation.
bool QAbstractClipAnimator::isRunning() const
Returns a boolean indicating whether the animation is currently running.
Note: Getter function for property running.
int QAbstractClipAnimator::loopCount() const
Returns the number of times the animation should play.
The value is 1 by default: the animation will play through once and then stop.
If set to QAbstractClipAnimator::Infinite, the animation will continuously repeat until it is explicitly stopped.
Note: Getter function for property loops.
See also setLoopCount().