このページでは

QAbstract3DInputHandler Class

入力ハンドラの実装用の基底クラスです。詳細...

ヘッダー: #include <QAbstract3DInputHandler>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
バージョン: QtDataVisualization 1.0
QMLでの使用開始時期: AbstractInputHandler3D
継承元: QObject
継承元:

Q3DInputHandler

ステータス: 非推奨

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

パブリック型

enum InputView { InputViewNone, InputViewOnPrimary, InputViewOnSecondary }

プロパティ

パブリック関数

virtual ~QAbstract3DInputHandler()
QPoint inputPosition() const
QAbstract3DInputHandler::InputView inputView() const
virtual void mouseDoubleClickEvent(QMouseEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)
virtual void mousePressEvent(QMouseEvent *event, const QPoint &mousePos)
virtual void mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)
Q3DScene *scene() const
void setInputPosition(const QPoint &position)
void setInputView(QAbstract3DInputHandler::InputView inputView)
void setScene(Q3DScene *scene)
virtual void touchEvent(QTouchEvent *event)
virtual void wheelEvent(QWheelEvent *event)

シグナル

void inputViewChanged(QAbstract3DInputHandler::InputView view)
void positionChanged(const QPoint &position)
void sceneChanged(Q3DScene *scene)

保護された関数

QAbstract3DInputHandler(QObject *parent = nullptr)
int prevDistance() const
QPoint previousInputPos() const
void setPrevDistance(int distance)
void setPreviousInputPos(const QPoint &position)

詳細な説明

QAbstract3DInputHandler は、入力イベントを受け取り、それらをカメラやライトの動きに変換する、さまざまな入力処理の実装がサブクラス化する基底クラスです。また、入力ハンドラは、生の入力イベントをシーン内のスライシングや選択イベントに変換します。

メンバ型のドキュメント

enum QAbstract3DInputHandler::InputView

マウスおよびタッチ操作用の入力ハンドラ向けにあらかじめ定義された入力ビュー。

定数値説明
QAbstract3DInputHandler::InputViewNone0ビュー上ではないマウスまたはタッチ。
QAbstract3DInputHandler::InputViewOnPrimary1プライマリビュー領域でマウスまたはタッチ入力を受け取った場合。inputView がInputViewOnPrimaryになったときにセカンダリビューが表示されている場合、セカンダリビューは閉じられます。
QAbstract3DInputHandler::InputViewOnSecondary2セカンダリビュー領域でマウスまたはタッチ入力があった。

プロパティのドキュメント

inputPosition : QPoint

このプロパティは、処理済みの入力イベントに基づいて、最後に入力された位置を保持します。

アクセス関数:

QPoint inputPosition() const
void setInputPosition(const QPoint &position)

通知信号:

void positionChanged(const QPoint &position)

inputView : InputView

このプロパティは、処理済みの入力イベントのビューに基づいて、現在の列挙型入力ビューを保持します。

InputView 列挙型の値のいずれかです。

ビューが変更されると、inputViewChanged シグナルが発行されます。

アクセス関数:

QAbstract3DInputHandler::InputView inputView() const
void setInputView(QAbstract3DInputHandler::InputView inputView)

通知信号:

void inputViewChanged(QAbstract3DInputHandler::InputView view)

「InputView」も参照してください 。

scene : Q3DScene*

このプロパティには、この抽象入力ハンドラが制御している3Dシーンが格納されます。

1つの入力ハンドラは1つのシーンを制御できます。入力ハンドラにシーンを設定しても、そのシーンの所有権が移ることはありません。

アクセス関数:

Q3DScene *scene() const
void setScene(Q3DScene *scene)

通知シグナル:

void sceneChanged(Q3DScene *scene)

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

[explicit protected] QAbstract3DInputHandler::QAbstract3DInputHandler(QObject *parent = nullptr)

基底クラスを生成します。オプションのparent パラメータを指定することができ、その場合はQObject のコンストラクタに渡されます。

[virtual noexcept] QAbstract3DInputHandler::~QAbstract3DInputHandler()

基クラスを破棄します。

[virtual] void QAbstract3DInputHandler::mouseDoubleClickEvent(QMouseEvent *event)

マウスのダブルクリックイベントを処理するには、このメソッドをオーバーライドしてください。マウスのダブルクリックイベントは、event で発生します。

[virtual] void QAbstract3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)

マウスの移動イベントを処理するには、このメソッドをオーバーライドしてください。マウスの移動イベントは `event ` で、マウスの位置は `mousePos` で渡されます。

[virtual] void QAbstract3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)

マウスのクリックイベントを処理するには、このメソッドをオーバーライドしてください。クリックイベントはevent に、マウスの位置はmousePos に格納されています。

[virtual] void QAbstract3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)

マウスの離しイベントを処理するには、このメソッドをオーバーライドしてください。マウスの離しイベントはevent で、マウスの位置はmousePos でそれぞれ渡されます。

[protected] int QAbstract3DInputHandler::prevDistance() const

最後の2つの入力位置間のマンハッタン距離を返します。

setPrevDistance()も参照してください 。

[protected] QPoint QAbstract3DInputHandler::previousInputPos() const

直前の入力位置を返します。

setPreviousInputPos()も参照してください 。

[protected] void QAbstract3DInputHandler::setPrevDistance(int distance)

最後の2つの入力位置間のdistance (マンハッタン距離)を設定します。

prevDistance()も参照してください 。

[protected] void QAbstract3DInputHandler::setPreviousInputPos(const QPoint &position)

position で指定された位置を、前回の入力位置に設定します。

previousInputPos()も参照してください 。

[virtual] void QAbstract3DInputHandler::touchEvent(QTouchEvent *event)

タッチ入力イベントを処理するには、このメソッドをオーバーライドしてください。タッチイベントはevent で渡されます。

[virtual] void QAbstract3DInputHandler::wheelEvent(QWheelEvent *event)

ホイールイベントを処理するには、このメソッドをオーバーライドしてください。ホイールイベントはevent で渡されます。

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