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 } |
属性
- sensitivity : float
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
公有函数
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 |
- 9 个公有函数继承自 Qt3DInput::QAbstractPhysicalDevice
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
公有槽函数
void | setSensitivity(float value) |
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
信号
void | sensitivityChanged(float value) |
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 1 个受保护的函数继承自 Qt3DInput::QAbstractPhysicalDevice
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
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.
Constant | Value |
---|---|
Qt3DInput::QMouseDevice::X | 0 |
Qt3DInput::QMouseDevice::Y | 1 |
Qt3DInput::QMouseDevice::WheelX | 2 |
Qt3DInput::QMouseDevice::WheelY | 3 |
属性
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"]