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 |
継承元: |
パブリックタイプ
enum | InputView { InputViewNone, InputViewOnPrimary, InputViewOnSecondary } |
プロパティ
- inputPosition : QPoint
- inputView : InputView
- scene : Q3DScene*
パブリック機能
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::InputViewNone | 0 | マウスまたはタッチがビュー上にない。 |
QAbstract3DInputHandler::InputViewOnPrimary | 1 | プライマリビュー領域でマウスまたはタッチ入力を受信した。inputView が InputViewOnPrimary になったときにセカンダリビューが表示されている場合、セカンダリビューは閉じられます。 |
QAbstract3DInputHandler::InputViewOnSecondary | 2 | セカンダリビュー領域でマウスまたはタッチ入力を受信した。 |
プロパティの説明
inputPosition : QPoint
本プロパティは、処理された入力イベントに基づく最後の入力位置を保持する。
アクセス関数
QPoint | inputPosition() const |
void | setInputPosition(const QPoint &position) |
ノーティファイアシグナル:
void | positionChanged(const QPoint &position) |
inputView : InputView
このプロパティは、処理された入力イベントのビューに基づいて、現在の列挙入力ビューを保持する。
InputView 列挙値の1つ。
ビューが変更されると、inputViewChanged
シグナルが発信される。
アクセス関数:
QAbstract3DInputHandler::InputView | inputView() const |
void | setInputView(QAbstract3DInputHandler::InputView inputView) |
Notifier シグナル:
void | inputViewChanged(QAbstract3DInputHandler::InputView view) |
InputViewも参照のこと 。
scene : Q3DScene*
このプロパティは、この抽象入力ハンドラが制御している3Dシーンを保持する。
つの入力ハンドラは、1つのシーンをコントロールすることができます。入力ハンドラにシーンを設定しても、シーンの所有権は移りません。
アクセス関数
Q3DScene * | scene() const |
void | setScene(Q3DScene *scene) |
Notifierシグナル
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 で指定されています。
© 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.