このページでは

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.