Q3DInputHandler Class
基本的なホイール・マウス・ベースの入力ハンドラ。もっと見る...
ヘッダー | #include <Q3DInputHandler> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
以来: | QtDataVisualization 1.0 |
QML で: | InputHandler3D |
を継承: | QAbstract3DInputHandler |
継承元: |
プロパティ
(since QtDataVisualization 1.2)
rotationEnabled : bool(since QtDataVisualization 1.2)
selectionEnabled : bool(since QtDataVisualization 1.2)
zoomAtTargetEnabled : bool(since QtDataVisualization 1.2)
zoomEnabled : bool
パブリック関数
Q3DInputHandler(QObject *parent = nullptr) | |
virtual | ~Q3DInputHandler() |
bool | isRotationEnabled() const |
bool | isSelectionEnabled() const |
bool | isZoomAtTargetEnabled() const |
bool | isZoomEnabled() const |
void | setRotationEnabled(bool enable) |
void | setSelectionEnabled(bool enable) |
void | setZoomAtTargetEnabled(bool enable) |
void | setZoomEnabled(bool enable) |
再実装パブリック関数
virtual void | mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos) override |
virtual void | mousePressEvent(QMouseEvent *event, const QPoint &mousePos) override |
virtual void | mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos) override |
virtual void | wheelEvent(QWheelEvent *event) override |
シグナル
void | rotationEnabledChanged(bool enable) |
void | selectionEnabledChanged(bool enable) |
void | zoomAtTargetEnabledChanged(bool enable) |
void | zoomEnabledChanged(bool enable) |
詳しい説明
Q3DInputHandlerはホイールマウスタイプの入力デバイスのための基本的な入力ハンドラです。
デフォルトの入力ハンドラは以下の機能を持っています:
マウスアクション | アクション |
---|---|
右ボタンでドラッグ | Q3DCamera に設定された範囲内でグラフを回転させる。 |
左クリック | カーソルの下にある項目を選択するか、選択項目がない場合は削除する。selection mode に応じてセカンダリビューを開くことができる。 |
マウスホイール | Q3DCamera に設定された許容ズーム範囲内でズームイン / アウトします。 |
セカンダリビューが表示されているときにプライマリビューを左クリックします。 | セカンダリビューを閉じます。 注: セカンダリー・ビューは、Q3DBars およびQ3DSurface グラフでのみ利用可能です。 |
回転、ズーム、および選択はそれぞれ、このクラスの対応するプロパティを使用して個別に無効にすることができます。
プロパティの説明
[since QtDataVisualization 1.2]
rotationEnabled : bool
このプロパティは、この入力ハンドラがグラフの回転を許可するかどうかを保持する。
デフォルトはtrue
です。
このプロパティは QtDataVisualization 1.2 で導入されました。
アクセス関数:
bool | isRotationEnabled() const |
void | setRotationEnabled(bool enable) |
Notifier シグナル:
void | rotationEnabledChanged(bool enable) |
[since QtDataVisualization 1.2]
selectionEnabled : bool
このプロパティは、この入力ハンドラがグラフからの選択を許可するかどうかを保持する。
デフォルトはtrue
です。
このプロパティは QtDataVisualization 1.2 で導入されました。
アクセス関数:
bool | isSelectionEnabled() const |
void | setSelectionEnabled(bool enable) |
Notifier シグナル:
void | selectionEnabledChanged(bool enable) |
[since QtDataVisualization 1.2]
zoomAtTargetEnabled : bool
このプロパティは、ズームが、ズーム後のグラフのズームされたポイントが同じ位置に留まるように、カメラターゲットを変更すべきかどうかを保持します。
デフォルトはtrue
です。
このプロパティは QtDataVisualization 1.2 で導入されました。
アクセス関数:
bool | isZoomAtTargetEnabled() const |
void | setZoomAtTargetEnabled(bool enable) |
通知シグナル:
void | zoomAtTargetEnabledChanged(bool enable) |
[since QtDataVisualization 1.2]
zoomEnabled : bool
このプロパティは、この入力ハンドラがグラフのズームを許可するかどうかを保持する。
デフォルトはtrue
です。
このプロパティは QtDataVisualization 1.2 で導入されました。
アクセス関数:
bool | isZoomEnabled() const |
void | setZoomEnabled(bool enable) |
Notifier シグナル:
void | zoomEnabledChanged(bool enable) |
メンバ関数 ドキュメント
[explicit]
Q3DInputHandler::Q3DInputHandler(QObject *parent = nullptr)
基本的なマウス入力ハンドラを構築する。オプションでparent パラメータを指定することができ、QObject コンストラクタに渡されます。
[virtual noexcept]
Q3DInputHandler::~Q3DInputHandler()
入力ハンドラを破棄する。
[override virtual]
void Q3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)
再実装:QAbstract3DInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)。
マウス移動イベントの処理を変更するためにオーバーライドします。マウス移動イベントはevent で、マウス位置はmousePos で与えられます。
[override virtual]
void Q3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)
再実装:QAbstract3DInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)。
マウス押下イベントの処理を変更するためにオーバーライドします。マウス押下イベントはevent で、マウス位置はmousePos で与えられます。
[override virtual]
void Q3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)
再実装:QAbstract3DInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)。
マウスリリースイベントの処理を変更するためにオーバーライドします。マウスリリースイベントはevent で、マウス位置はmousePos で与えられます。
[override virtual]
void Q3DInputHandler::wheelEvent(QWheelEvent *event)
再実装: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.