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 |
This class was introduced in Qt 5.5.
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 override |
| virtual int | axisIdentifier(const QString &name) const override |
| virtual QStringList | axisNames() const override |
| virtual int | buttonCount() const override |
| virtual int | buttonIdentifier(const QString &name) const override |
| virtual QStringList | buttonNames() const override |
- 9 public functions inherited from Qt3DInput::QAbstractPhysicalDevice
- 13 public functions inherited from Qt3DCore::QNode
- 30 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
Related Non-Members
| typedef | QNodePtr |
| typedef | QNodeVector |
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| Qt3DCore::QNodeId | qIdForNode(Qt3DCore::QNode *node) |
| Qt3DCore::QNodeIdVector | qIdsForNodes(const T &nodes) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO(Name, Value) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
- 9 static public members inherited from QObject
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
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.
[override virtual] int QMouseDevice::axisCount() const
Reimplements: QAbstractPhysicalDevice::axisCount() const.
Returns the axis count.
Note: Currently always returns 4.
[override virtual] int QMouseDevice::axisIdentifier(const QString &name) const
Reimplements: QAbstractPhysicalDevice::axisIdentifier(const QString &name) const.
Convert axis name to axis identifier.
[override virtual] QStringList QMouseDevice::axisNames() const
Reimplements: QAbstractPhysicalDevice::axisNames() const.
Returns the names of the axis.
Note: Currently always returns StringList["X", "Y"]
[override virtual] int QMouseDevice::buttonCount() const
Reimplements: QAbstractPhysicalDevice::buttonCount() const.
Returns the button count.
Note: Currently always returns 3.
[override virtual] int QMouseDevice::buttonIdentifier(const QString &name) const
Reimplements: QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const.
Returns the button identifier that corresponds with the specified name. The possible return values are documented in QMouseEvent::Buttons.
[override virtual] QStringList QMouseDevice::buttonNames() const
Reimplements: QAbstractPhysicalDevice::buttonNames() const.
Returns the names of the buttons.
Note: Currently always returns StringList["Left", "Right", "Center"]