QMouseInput Class


Provides a means of being notified about mouse events when attached to a QMouseController instance. More...

Header: #include <QMouseInput>
qmake: QT += 3dinput
Since: Qt 5.5
Instantiated By: MouseInput
Inherits: Qt3DCore::QComponent


Public Functions

QMouseInput(QNode *parent = Q_NULLPTR)
bool containsMouse() const
QMouseController *controller() const

Public Slots

void setController(QMouseController *controller)


void clicked(Qt3DInput::QMouseEvent *mouse)
void containsMouseChanged(bool containsMouse)
void controllerChanged(QMouseController *controller)
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 wheel(Qt3DInput::QWheelEvent *wheel)

Protected Functions

QMouseInput(QMouseInputPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR)
void copy(const Qt3DCore::QNode *ref)
void mouseEvent(Qt3DInput::QMouseEvent *event)
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)
void setContainsMouse(bool contains)

Additional Inherited Members

Detailed Description

Provides a means of being notified about mouse events when attached to a QMouseController instance.

Note: QMouseInput components shouldn't be shared, not respecting that condition will most likely result in undefined behaviors.

See also QMouseController.

Property Documentation

containsMouse : const bool

Access functions:

bool containsMouse() const

Notifier signal:

void containsMouseChanged(bool containsMouse)

controller : Qt3DInput::QMouseController *

Access functions:

QMouseController *controller() const
void setController(QMouseController *controller)

Notifier signal:

void controllerChanged(QMouseController *controller)

Member Function Documentation

QMouseInput::QMouseInput(QNode *parent = Q_NULLPTR)

Constructs a new QMouseInput instance with parent parent.

[protected] QMouseInput::QMouseInput(QMouseInputPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR)

Copy constructor.


Destroys this QMouseInput object

[signal] void QMouseInput::clicked(Qt3DInput::QMouseEvent *mouse)

bool QMouseInput::containsMouse() const

Returns true if the QMouseInput 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 QMouseInput instance component.

Note: Getter function for property containsMouse.

See also setContainsMouse().

QMouseController *QMouseInput::controller() const

Returns the current mouse controller of the QMouseInput instance.

Note: Getter function for property controller.

See also setController().

[protected] void QMouseInput::copy(const Qt3DCore::QNode *ref)

[signal] void QMouseInput::doubleClicked(Qt3DInput::QMouseEvent *mouse)

[signal] void QMouseInput::entered()

[signal] void QMouseInput::exited()

[protected] void QMouseInput::mouseEvent(Qt3DInput::QMouseEvent *event)

[signal] void QMouseInput::positionChanged(Qt3DInput::QMouseEvent *mouse)

[signal] void QMouseInput::pressAndHold(Qt3DInput::QMouseEvent *mouse)

[signal] void QMouseInput::pressed(Qt3DInput::QMouseEvent *mouse)

[signal] void QMouseInput::released(Qt3DInput::QMouseEvent *mouse)

[protected] void QMouseInput::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)

[protected] void QMouseInput::setContainsMouse(bool contains)

See also containsMouse().

[slot] void QMouseInput::setController(QMouseController *controller)

Sets the mouse controller of the QMouseInput instance to controller.

Note: Setter function for property controller.

See also controller().

[signal] void QMouseInput::wheel(Qt3DInput::QWheelEvent *wheel)

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.