QCallbackMapping Class

class Qt3DAnimation::QCallbackMapping

クリップ内のチャンネルをコールバックオブジェクトの呼び出しにマッピングできます。詳細

ヘッダ #include <QCallbackMapping>
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)

詳細説明

メンバー関数ドキュメント

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

callback オブジェクトをこのチャンネル・マッピングに関連付ける。

このようなマッピングは、ターゲット・オブジェクトとプロパティ名を持つ必要はありません。callback オブジェクトが設定されると、アニメーションの値が変更されるたびに、コールバックのvalueChanged 関数がgui/メイン・スレッド上で呼び出されるか、スレッド・プールのワーカー・スレッド上で直接呼び出される。これは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.