QMouseDevice 类

( Qt3DInput::QMouseDevice )

把鼠标事件委托给附加的 MouseHandler 对象。 更多...

头: #include <QMouseDevice>
qmake: QT += 3dinput
Since: Qt 5.5
实例化: 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 )

额外继承成员

详细描述

把鼠标事件委托给附加的 MouseHandler 对象。

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.

常量
Qt3DInput::QMouseDevice::X 0
Qt3DInput::QMouseDevice::Y 1
Qt3DInput::QMouseDevice::WheelX 2
Qt3DInput::QMouseDevice::WheelY 3

另请参阅 Qt3DInput::QAnalogAxisInput::setAxis .

特性文档编制

sensitivity : float

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

访问函数:

float sensitivity () const
void setSensitivity (float value )

通知程序信号:

void sensitivityChanged (float value )

成员函数文档编制

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

Default constructs an instance of QMouseDevice.

[虚拟] int QMouseDevice:: axisCount () const

重实现自 QAbstractPhysicalDevice::axisCount ().

Returns the axis count.

注意: Currently always returns 4.

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

重实现自 QAbstractPhysicalDevice::axisIdentifier ().

Convert axis name to axis identifier.

[虚拟] QStringList QMouseDevice:: axisNames () const

重实现自 QAbstractPhysicalDevice::axisNames ().

Returns the names of the axis.

注意: Currently always returns StringList["X", "Y"]

[虚拟] int QMouseDevice:: buttonCount () const

重实现自 QAbstractPhysicalDevice::buttonCount ().

Returns the button count.

注意: Currently always returns 3.

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

重实现自 QAbstractPhysicalDevice::buttonIdentifier ().

Returns the button identifier that corresponds with the specified name . The possible return values are documented in QMouseEvent::Buttons .

[虚拟] QStringList QMouseDevice:: buttonNames () const

重实现自 QAbstractPhysicalDevice::buttonNames ().

Returns the names of the buttons.

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