이 페이지에서

Qt3DAnimation::QCallbackMapping Class

class Qt3DAnimation::QCallbackMapping

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

헤더: #include <qcallbackmapping.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
상속: Qt3DAnimation::QAbstractChannelMapping
상태: 기술 미리보기

이 클래스는 기술 미리보기 단계에 있으며 변경될 수 있습니다.

속성

공개 함수

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)

상세 설명

속성 설명

channelName : QString

콜백 매핑에 대한 채널 이름을 저장합니다.

액세스 함수:

QString channelName() const
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)의 경우, type 는 QVariant 에 저장된 값의 유형임을 유의하십시오.

참고: callback 포인터는 관련 애니메이터가 실행 중인 동안 유효한 상태를 유지해야 합니다.

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