Sur cette page

Qt3DAnimation::QAbstractAnimation Class

class Qt3DAnimation::QAbstractAnimation

Une classe de base abstraite pour les animations Qt3D. En savoir plus...

En-tête : #include <QAbstractAnimation>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake : QT += 3danimation
En QML : AbstractAnimation
Hérite de : QObject
Hérité par :

Qt3DAnimation::QKeyframeAnimation, Qt3DAnimation::QMorphingAnimation, et Qt3DAnimation::QVertexBlendAnimation

Statut : Aperçu technologique

Cette classe est en préversion technologique et est susceptible d'être modifiée.

Types publics

enum AnimationType { KeyframeAnimation, MorphingAnimation, VertexBlendAnimation }

Propriétés

Fonctions publiques

QString animationName() const
Qt3DAnimation::QAbstractAnimation::AnimationType animationType() const
float duration() const
float position() const

Emplacements publics

void setAnimationName(const QString &name)
void setPosition(float position)

Signaux

void animationNameChanged(const QString &name)
void durationChanged(float duration)
void positionChanged(float position)

Fonctions protégées

void setDuration(float duration)

Description détaillée

Qt3DAnimation::QAbstractAnimation est une classe de base abstraite pour toutes les animations. Qt3DAnimation::QAbstractAnimation ne peut pas être instanciée directement, mais uniquement via ses sous-classes. QAbstractAnimation spécifie les propriétés communes à toutes les animations Qt3D, telles que le nom et le type de l'animation, la position actuelle et la durée de l'animation, tout en laissant aux sous-classes le soin de gérer l'animation proprement dite.

Documentation sur les types de membres

enum QAbstractAnimation::AnimationType

Cette énumération définit le type de l'animation

ConstanteValeurDescription
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation1Implémentation simple d'une animation par images clés pour le QTransform
Qt3DAnimation::QAbstractAnimation::MorphingAnimation2l'animation par morphing de formes de mélange
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation3l'animation par fusion de sommets

Documentation des propriétés

animationName : QString

Contient le nom de l'animation.

Fonctions d'accès :

QString animationName() const
void setAnimationName(const QString &name)

Signal de notification :

void animationNameChanged(const QString &name)

[read-only] animationType : const AnimationType

Contient le type de l'animation.

Fonctions d'accès :

Qt3DAnimation::QAbstractAnimation::AnimationType animationType() const

[read-only] duration : float

Contient la durée de l'animation.

Fonctions d'accès :

float duration() const

Signal de notification :

void durationChanged(float duration)

position : float

Contient la position actuelle de l'animation.

Fonctions d'accès :

float position() const
void setPosition(float position)

Signal de notification :

void positionChanged(float position)

Documentation des fonctions membres

[protected] void QAbstractAnimation::setDuration(float duration)

Définit l'duration de l'animation.

Voir aussi duration().

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