QAbstractClipAnimator Class

class Qt3DAnimation::QAbstractClipAnimator

QAbstractClipAnimator ist die Basisklasse für Typen, die die Wiedergabe von Animationen ermöglichen. Mehr...

Kopfzeile: #include <QAbstractClipAnimator>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
In QML: AbstractClipAnimator
Vererbt: Qt3DCore::QComponent
Geerbt von:

Qt3DAnimation::QBlendedClipAnimator und Qt3DAnimation::QClipAnimator

Status: Veraltet

Öffentliche Typen

enum Loops { Infinite }

Eigenschaften

Öffentliche Funktionen

Qt3DAnimation::QChannelMapper *channelMapper() const
Qt3DAnimation::QClock *clock() const
bool isRunning() const
int loopCount() const
float normalizedTime() const

Öffentliche 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()

Signale

void channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper)
void clockChanged(Qt3DAnimation::QClock *clock)
void loopCountChanged(int loops)
void normalizedTimeChanged(float index)
void runningChanged(bool running)

Detaillierte Beschreibung

Unterklassen von QAbstractClipAnimator können von einer QEntity aggregiert werden, um Animationsfähigkeiten bereitzustellen. Die Animator-Komponenten bieten eine Schnittstelle zur Steuerung der Animation (z.B. Start, Stop). Jeder Animator-Typ benötigt eine Form von Animationsdaten, wie z.B. QAbstractAnimationClip, sowie eine QChannelMapper, die beschreibt, wie die Kanäle im Animationsclip auf die Eigenschaften der zu animierenden Objekte abgebildet werden sollen.

Die folgenden Unterklassen sind verfügbar:

Mitgliedstyp Dokumentation

enum QAbstractClipAnimator::Loops

Enthält die Anzahl der Wiederholungen der Animation.

KonstanteWertBeschreibung
Qt3DAnimation::QAbstractClipAnimator::Infinite-1Die Schleife wird so lange wiederholt, bis sie explizit gestoppt wird.

Dokumentation der Eigenschaft

channelMapper : Qt3DAnimation::QChannelMapper*

Diese Eigenschaft enthält den ChannelMapper, der steuert, wie die Kanäle im Animationsclip auf die Eigenschaften der Zielobjekte abgebildet werden.

Zugriffsfunktionen:

Qt3DAnimation::QChannelMapper *channelMapper() const
void setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper)

Benachrichtigungssignal:

void channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper)

clock : Qt3DAnimation::QClock*

Der Taktgeber steuert die Geschwindigkeit, mit der eine Animation abgespielt wird.

Zugriffsfunktionen:

Qt3DAnimation::QClock *clock() const
void setClock(Qt3DAnimation::QClock *clock)

Benachrichtigungssignal:

void clockChanged(Qt3DAnimation::QClock *clock)

loops : int

Gibt an, wie oft die Animation abgespielt werden soll.

Der Wert ist standardmäßig 1: Die Animation wird einmal abgespielt und dann angehalten.

Bei QAbstractClipAnimator::Infinite wird die Animation so lange wiederholt, bis sie explizit gestoppt wird.

Zugriffsfunktionen:

int loopCount() const
void setLoopCount(int loops)

Benachrichtigungssignal:

void loopCountChanged(int loops)

normalizedTime : float

Diese Eigenschaft enthält die normalisierte Zeit der Clips.

Zugriffsfunktionen:

float normalizedTime() const
void setNormalizedTime(float timeFraction)

Melder-Signal:

void normalizedTimeChanged(float index)

running : bool

Diese Eigenschaft enthält einen booleschen Wert, der angibt, ob die Animation gerade läuft.

Zugriffsfunktionen:

bool isRunning() const
void setRunning(bool running)

Benachrichtigungssignal:

void runningChanged(bool running)

Member Function Dokumentation

bool QAbstractClipAnimator::isRunning() const

Gibt einen booleschen Wert zurück, der angibt, ob die Animation gerade läuft.

Hinweis: Getter-Funktion für die Eigenschaft running.

int QAbstractClipAnimator::loopCount() const

Gibt zurück, wie oft die Animation abgespielt werden soll.

Der Wert ist standardmäßig 1: Die Animation wird einmal durchgespielt und dann gestoppt.

Bei QAbstractClipAnimator::Infinite wird die Animation so lange wiederholt, bis sie explizit gestoppt wird.

Hinweis: Getter-Funktion für die Eigenschaft loops.

Siehe auch setLoopCount().

[slot] void QAbstractClipAnimator::start()

Startet die Animation.

[slot] void QAbstractClipAnimator::stop()

Hält die Animation an.

© 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.