QMouseHandler Class
(Qt3DInput::QMouseHandler)Provides a means of being notified about mouse events when attached to a QMouseDevice instance. More...
| Header: | #include <Qt3DInput/QMouseHandler> |
| qmake: | QT += 3dinput |
| Since: | Qt 5.5 |
| Instantiated By: | MouseHandler |
| Inherits: | Qt3DCore::QComponent |
This class was introduced in Qt 5.5.
Properties
- containsMouse : const bool
- sourceDevice : Qt3DInput::QMouseDevice*
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
| QMouseHandler(Qt3DCore::QNode *parent = nullptr) | |
| bool | containsMouse() const |
| Qt3DInput::QMouseDevice * | sourceDevice() const |
- 2 public functions inherited from Qt3DCore::QComponent
- 13 public functions inherited from Qt3DCore::QNode
- 30 public functions inherited from QObject
Public Slots
| void | setSourceDevice(Qt3DInput::QMouseDevice *mouseDevice) |
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
| void | clicked(Qt3DInput::QMouseEvent *mouse) |
| void | containsMouseChanged(bool containsMouse) |
| void | doubleClicked(Qt3DInput::QMouseEvent *mouse) |
| void | entered() |
| void | exited() |
| void | positionChanged(Qt3DInput::QMouseEvent *mouse) |
| void | pressAndHold(Qt3DInput::QMouseEvent *mouse) |
| void | pressed(Qt3DInput::QMouseEvent *mouse) |
| void | released(Qt3DInput::QMouseEvent *mouse) |
| void | sourceDeviceChanged(Qt3DInput::QMouseDevice *mouseDevice) |
| void | wheel(Qt3DInput::QWheelEvent *wheel) |
- 3 signals inherited from Qt3DCore::QComponent
- 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
Note: QMouseHandler components shouldn't be shared, not respecting that condition will most likely result in undefined behaviors.
See also QMouseDevice and QMouseEvent.
Property Documentation
containsMouse : const bool
Holds true if the QMouseHandler currently contains the mouse.
Note: In this context, contains mean that the ray originating from the mouse is intersecting with the Qt3DCore::QEntity that aggregates the current QMouseHandler instance component.
Access functions:
| bool | containsMouse() const |
Notifier signal:
| void | containsMouseChanged(bool containsMouse) |
sourceDevice : Qt3DInput::QMouseDevice*
Holds the current mouse source device of the QMouseHandler instance.
Access functions:
| Qt3DInput::QMouseDevice * | sourceDevice() const |
| void | setSourceDevice(Qt3DInput::QMouseDevice *mouseDevice) |
Notifier signal:
| void | sourceDeviceChanged(Qt3DInput::QMouseDevice *mouseDevice) |
Member Function Documentation
QMouseHandler::QMouseHandler(Qt3DCore::QNode *parent = nullptr)
Constructs a new QMouseHandler instance with parent parent.
[signal] void QMouseHandler::clicked(Qt3DInput::QMouseEvent *mouse)
This signal is emitted when a mouse button is clicked with the event details being contained within mouse
[signal] void QMouseHandler::doubleClicked(Qt3DInput::QMouseEvent *mouse)
This signal is emitted when a mouse button is double clicked with the event details being contained within mouse
[signal] void QMouseHandler::entered()
[signal] void QMouseHandler::exited()
[signal] void QMouseHandler::positionChanged(Qt3DInput::QMouseEvent *mouse)
This signal is emitted when the mouse position changes with the event details being contained within mouse
[signal] void QMouseHandler::pressAndHold(Qt3DInput::QMouseEvent *mouse)
This signal is emitted when a mouse button is pressed and held down with the event details being contained within mouse
[signal] void QMouseHandler::pressed(Qt3DInput::QMouseEvent *mouse)
This signal is emitted when a mouse button is pressed with the event details being contained within mouse
[signal] void QMouseHandler::released(Qt3DInput::QMouseEvent *mouse)
This signal is emitted when a mouse button is released with the event details being contained within mouse
[slot] void QMouseHandler::setSourceDevice(Qt3DInput::QMouseDevice *mouseDevice)
Sets the mouse device of the QMouseHandler instance to mouseDevice.
Note: Setter function for property sourceDevice.
See also sourceDevice().
[signal] void QMouseHandler::wheel(Qt3DInput::QWheelEvent *wheel)
This signal is emitted when the mouse wheel is used with the event details being contained within wheel