QCallbackMapping Class

class Qt3DAnimation::QCallbackMapping

클립 내의 채널을 콜백 객체의 호출에 매핑할 수 있습니다. 더 보기...

Header: #include <QCallbackMapping>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
상속합니다: Qt3DAnimation::QAbstractChannelMapping
상태: Deprecated

공용 함수

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

공용 슬롯

void setChannelName(const QString &channelName)

시그널

void channelNameChanged(QString channelName)

상세 설명

멤버 함수 문서

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

callback 개체를 이 채널 매핑에 연결합니다.

이러한 매핑에는 대상 객체와 속성 이름이 없어도 됩니다. callback 객체가 설정되면 애니메이션 값이 변경될 때마다 gui/메인 스레드 또는 스레드 풀의 작업자 스레드 중 하나에서 직접 콜백의 valueChanged 함수를 호출하게 됩니다. 이것은 flags 에 의해 제어됩니다.

type 는 애니메이션 값의 유형(예: QMetaType::QVector3D, QMetaType::QColor, 또는 QMetaType::Float)을 지정합니다. 노드 속성을 애니메이션할 때는 이 값을 별도로 제공할 필요가 없지만 콜백만 있는 경우에는 이 값을 제공하는 것이 중요합니다.

참고: 매핑은 노드 프로퍼티와 콜백 모두에 연결할 수 있습니다. 그러나 이 경우 type 이 속성 유형과 일치하는 것이 중요합니다. 또한 QVariant 유형(예: QParameter::value)의 속성의 경우 typeQVariant 에 저장된 값의 유형입니다.

참고: callback 포인터는 연결된 애니메이터가 실행되는 동안 유효하게 유지될 것으로 예상됩니다.

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