En esta página

Qt3DAnimation::QCallbackMapping Class

class Qt3DAnimation::QCallbackMapping

Permite mapear los canales dentro del clip en una invocación de un objeto callback. Más...

Cabecera: #include <QCallbackMapping>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
Inherits: Qt3DAnimation::QAbstractChannelMapping
Status: Obsoleto

Propiedades

Funciones públicas

QString channelName() const
void setCallback(int type, Qt3DAnimation::QAnimationCallback *callback, Qt3DAnimation::QAnimationCallback::Flags flags = QAnimationCallback::OnOwningThread)

Ranuras públicas

void setChannelName(const QString &channelName)

Señales

void channelNameChanged(QString channelName)

Descripción detallada

Documentación de propiedades

channelName : QString

Contiene el nombre del canal para la asignación de la llamada de retorno.

Funciones de acceso:

QString channelName() const
void setChannelName(const QString &channelName)

Señal del notificador:

void channelNameChanged(QString channelName)

Documentación de la función miembro

void QCallbackMapping::setCallback(int type, Qt3DAnimation::QAnimationCallback *callback, Qt3DAnimation::QAnimationCallback::Flags flags = QAnimationCallback::OnOwningThread)

Asocia un objeto callback a esta asignación de canales.

Tales mapeos no tienen que tener un objeto de destino y un nombre de propiedad. Cuando se establece el objeto callback, cada cambio en el valor animado llevará a invocar la función de callback valueChanged ya sea en el hilo gui/main, o directamente en uno de los hilos worker del pool de hilos. Esto se controla mediante flags.

type especifica el tipo (por ejemplo, QMetaType::QVector3D, QMetaType::QColor, o QMetaType::Float) del valor animado. Cuando se animan propiedades de nodo no es necesario proporcionar esto por separado, sin embargo es importante proporcionar esto cuando sólo hay una llamada de retorno.

Nota: Una asignación puede asociarse tanto a una propiedad de nodo como a una llamada de retorno. Sin embargo, es importante que type coincida con el tipo de la propiedad en este caso. Ten en cuenta también que para propiedades de tipo QVariant (por ejemplo, QParameter::value), el type es el tipo del valor almacenado en el QVariant.

Nota: Se espera que el puntero callback permanezca válido mientras se estén ejecutando los animadores asociados.

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