QMouseDevice Class

(Qt3DInput::QMouseDevice)

Delegates mouse events to the attached MouseHandler objects. 更多...

头文件: #include <QMouseDevice>
qmake: QT += 3dinput
开始支持版本: Qt 5.5
Instantiated By: MouseDevice
基类: Qt3DInput::QAbstractPhysicalDevice

公有类型

enum Axis { X, Y, WheelX, WheelY }

属性

公有函数

QMouseDevice(Qt3DCore::QNode *parent = nullptr)
float sensitivity() const

重新实现的公有函数

virtual int axisCount() const
virtual int axisIdentifier(const QString &name) const
virtual QStringList axisNames() const
virtual int buttonCount() const
virtual int buttonIdentifier(const QString &name) const
virtual QStringList buttonNames() const

公有槽函数

void setSensitivity(float value)

信号

void sensitivityChanged(float value)

其他继承的成员

详细描述

Delegates mouse events to the attached MouseHandler objects.

A QMouseDevice delegates mouse events from physical mouse device to QMouseHandler objects. The sensitivity of the mouse can be controlled with the QMouseDevice::sensitivity property, which specifies the rate in which the logical mouse coordinates change in response to physical movement of the mouse.

参见 QMouseHandler.

成员类型

enum QMouseDevice::Axis

The mouse axis.

ConstantValue
Qt3DInput::QMouseDevice::X0
Qt3DInput::QMouseDevice::Y1
Qt3DInput::QMouseDevice::WheelX2
Qt3DInput::QMouseDevice::WheelY3

参见 Qt3DInput::QAnalogAxisInput::setAxis.

属性

sensitivity : float

Holds the sensitivity of the mouse device. The default is 0.1.

访问函数:

float sensitivity() const
void setSensitivity(float value)

Notifier signal:

void sensitivityChanged(float value)

成员函数

QMouseDevice::QMouseDevice(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QMouseDevice.

[virtual] int QMouseDevice::axisCount() const

Reimplemented from QAbstractPhysicalDevice::axisCount().

Returns the axis count.

Note: Currently always returns 4.

[virtual] int QMouseDevice::axisIdentifier(const QString &name) const

Reimplemented from QAbstractPhysicalDevice::axisIdentifier().

Convert axis name to axis identifier.

[virtual] QStringList QMouseDevice::axisNames() const

Reimplemented from QAbstractPhysicalDevice::axisNames().

Returns the names of the axis.

Note: Currently always returns StringList["X", "Y"]

[virtual] int QMouseDevice::buttonCount() const

Reimplemented from QAbstractPhysicalDevice::buttonCount().

Returns the button count.

Note: Currently always returns 3.

[virtual] int QMouseDevice::buttonIdentifier(const QString &name) const

[virtual] QStringList QMouseDevice::buttonNames() const

Reimplemented from QAbstractPhysicalDevice::buttonNames().

Returns the names of the buttons.

Note: Currently always returns StringList["Left", "Right", "Center"]