QMouseDevice Class

class Qt3DInput::QMouseDevice

マウスイベントをアタッチされたMouseHandler オブジェクトに委譲する。詳細...

ヘッダ #include <QMouseDevice>
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 }

プロパティ

パブリック関数

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::X0
Qt3DInput::QMouseDevice::Y1
Qt3DInput::QMouseDevice::WheelX2
Qt3DInput::QMouseDevice::WheelY3

Qt3DInput::QAnalogAxisInput::setAxisも参照してください

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

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)

親を持つ新しい QMouseDevice インスタンスをparent で構築します。

[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"] を返します。

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