Qt3DInput::QMouseDevice Class
class Qt3DInput::QMouseDeviceマウスイベントを、関連付けられたMouseHandler オブジェクトに委譲します。詳細...
| ヘッダー: | #include <qmousedevice.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
| qmake: | QT += 3dinput |
| QML内: | MouseDevice |
| 継承元: | Qt3DInput::QAbstractPhysicalDevice |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨しません。
パブリック型
| enum | Axis { X, Y, WheelX, WheelY } |
プロパティ
- sensitivity : float
- updateAxesContinuously : bool
パブリック関数
| QMouseDevice(Qt3DCore::QNode *parent = nullptr) | |
| float | sensitivity() const |
| bool | updateAxesContinuously() const |
再実装されたパブリック関数
| virtual int | axisCount() const override |
| virtual int | axisIdentifier(const QString &name) const override |
| virtual QStringList | axisNames() const override |
| virtual int | buttonCount() const override |
| virtual int | buttonIdentifier(const QString &name) const override |
| virtual QStringList | buttonNames() const override |
パブリックスロット
| void | setSensitivity(float value) |
| void | setUpdateAxesContinuously(bool updateAxesContinuously) |
シグナル
| void | sensitivityChanged(float value) |
| void | updateAxesContinuouslyChanged(bool updateAxesContinuously) |
詳細な説明
QMouseDeviceは、物理的なマウスデバイスからのマウスイベントをQMouseHandler オブジェクトに委譲します。マウスの感度は、QMouseDevice::sensitivity プロパティで制御できます。このプロパティは、マウスの物理的な動きに応じて論理的なマウス座標が変化する頻度を指定します。
「QMouseHandler」も参照してください 。
メンバ型のドキュメント
enum QMouseDevice::Axis
マウスの軸。
| 定数 | 値 |
|---|---|
Qt3DInput::QMouseDevice::X | 0 |
Qt3DInput::QMouseDevice::Y | 1 |
Qt3DInput::QMouseDevice::WheelX | 2 |
Qt3DInput::QMouseDevice::WheelY | 3 |
プロパティのドキュメント
sensitivity : float
マウスデバイスの感度を保持します。デフォルト値は 0.1 です。
アクセス関数:
| float | sensitivity() const |
| void | setSensitivity(float value) |
通知シグナル:
| void | sensitivityChanged(float value) |
updateAxesContinuously : bool
true の場合、マウスボタンが押されているかどうかに関係なく、座標軸は変更があるたびに更新されます。それ以外の場合は、マウスボタンのいずれかが押されているときにのみ座標軸が更新されます。
デフォルト値は `false` です。
アクセス関数:
| bool | updateAxesContinuously() const |
| void | setUpdateAxesContinuously(bool updateAxesContinuously) |
Notifierシグナル:
| void | updateAxesContinuouslyChanged(bool updateAxesContinuously) |
メンバ関数のドキュメント
[explicit] QMouseDevice::QMouseDevice(Qt3DCore::QNode *parent = nullptr)
親としてparent を持つ新しいQMouseDeviceインスタンスを作成します。
[override virtual] int QMouseDevice::axisCount() const
QAbstractPhysicalDevice::axisCount() const を再実装します。
軸の数を返します。
注:現在は 常に 4 を返します。
[override virtual] int QMouseDevice::axisIdentifier(const QString &name) const
QAbstractPhysicalDevice::axisIdentifier(const QString &name) const を再実装します。
name を軸識別子に変換します。
[override virtual] QStringList QMouseDevice::axisNames() const
QAbstractPhysicalDevice::axisNames() const を再実装します。
軸の名前を返します。
注: 現在は 常に StringList["X", "Y"] を返します。
[override virtual] int QMouseDevice::buttonCount() const
QAbstractPhysicalDevice::buttonCount() const を再実装します。
ボタンの数を返します。
注:現在は 常に 3 を返します。
[override virtual] int QMouseDevice::buttonIdentifier(const QString &name) const
QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const の再実装です。
指定されたname に対応するボタン識別子を返します。可能な戻り値については、QMouseEvent::Buttons に記載されています。
[override virtual] QStringList QMouseDevice::buttonNames() const
QAbstractPhysicalDevice::buttonNames() const を再実装します。
ボタンの名前を返します。
注:現在は 常に StringList["Left", "Right", "Center"] を返します。
© 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.