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"]