Qt3DAnimation::QCallbackMapping Class
class Qt3DAnimation::QCallbackMappingPermet de faire correspondre les canaux du clip à l'invocation d'un objet de rappel. Plus d'informations...
| En-tête : | #include <QCallbackMapping> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS 3danimation)target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake : | QT += 3danimation |
| Hérite : | Qt3DAnimation::QAbstractractChannelMapping |
| Statut : | Déclassé |
Propriétés
- channelName : QString
Fonctions publiques
| QString | channelName() const |
| void | setCallback(int type, Qt3DAnimation::QAnimationCallback *callback, Qt3DAnimation::QAnimationCallback::Flags flags = QAnimationCallback::OnOwningThread) |
Emplacements publics
| void | setChannelName(const QString &channelName) |
Signaux
| void | channelNameChanged(QString channelName) |
Propriété Documentation
channelName : QString
Contient le nom du canal pour le mappage du rappel.
Fonctions d'accès :
| QString | channelName() const |
| void | setChannelName(const QString &channelName) |
Signal du notificateur :
| void | channelNameChanged(QString channelName) |
Fonction membre Documentation
void QCallbackMapping::setCallback(int type, Qt3DAnimation::QAnimationCallback *callback, Qt3DAnimation::QAnimationCallback::Flags flags = QAnimationCallback::OnOwningThread)
Associe un objet callback à ce mappage de canaux.
Il n'est pas nécessaire que ces mappings aient un objet cible et un nom de propriété. Lorsque l'objet callback est défini, chaque modification de la valeur animée entraîne l'invocation de la fonction de rappel valueChanged, soit sur le thread principal de l'interface utilisateur, soit directement sur l'un des threads de travail du pool de threads. Ceci est contrôlé par flags.
type spécifie le type (par exemple, QMetaType::QVector3D, QMetaType::QColor, ou QMetaType::Float) de la valeur animée. Lors de l'animation de propriétés de nœuds, il n'est pas nécessaire de fournir cette information séparément, mais il devient important de le faire lorsqu'il n'y a qu'un rappel.
Remarque : un mapping peut être associé à la fois à une propriété de nœud et à un callback. Il est toutefois important que type corresponde au type de la propriété dans ce cas. Notez également que pour les propriétés de type QVariant (par exemple, QParameter::value), type est le type de la valeur stockée dans QVariant.
Remarque : le pointeur callback est censé rester valide tant que les animateurs associés sont en cours d'exécution.
© 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.