QMouseDevice Class
(Qt3DInput::QMouseDevice)Delegates mouse events to the attached MouseHandler objects. More...
Header: | #include <QMouseDevice> |
qmake: | QT += 3dinput |
Since: | Qt 5.5 |
Instantiated By: | MouseDevice |
Inherits: | Qt3DInput::QAbstractPhysicalDevice |
Public Types
enum | Axis { X, Y, WheelX, WheelY } |
Properties
- sensitivity : float
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QMouseDevice(Qt3DCore::QNode *parent = nullptr) | |
float | sensitivity() const |
Reimplemented Public Functions
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 public functions inherited from Qt3DInput::QAbstractPhysicalDevice
- 13 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject
Public Slots
void | setSensitivity(float value) |
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | sensitivityChanged(float value) |
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Additional Inherited Members
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
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.
See also QMouseHandler.
Member Type Documentation
enum QMouseDevice::Axis
The mouse axis.
Constant | Value |
---|---|
Qt3DInput::QMouseDevice::X |
0 |
Qt3DInput::QMouseDevice::Y |
1 |
Qt3DInput::QMouseDevice::WheelX |
2 |
Qt3DInput::QMouseDevice::WheelY |
3 |
See also Qt3DInput::QAnalogAxisInput::setAxis.
Property Documentation
sensitivity : float
Holds the sensitivity of the mouse device. The default is 0.1.
Access functions:
float | sensitivity() const |
void | setSensitivity(float value) |
Notifier signal:
void | sensitivityChanged(float value) |
Member Function Documentation
QMouseDevice::QMouseDevice(Qt3DCore::QNode *parent = nullptr)
Constructs a new QMouseDevice instance with parent parent.
[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
Reimplemented from QAbstractPhysicalDevice::buttonIdentifier().
Returns the button identifier that corresponds with the specified name. The possible return values are documented in QMouseEvent::Buttons.
[virtual]
QStringList QMouseDevice::buttonNames() const
Reimplemented from QAbstractPhysicalDevice::buttonNames().
Returns the names of the buttons.
Note: Currently always returns StringList["Left", "Right", "Center"]
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.12/qt3dinput-qmousedevice.html