QMouseInput Class | Qt 3D 5.6

Qt 5.6 | Qt 3D | C++ Classes | QMouseInput

Qt 5.6.0 Reference Documentation

# QMouseInput Class

(Qt3DInput::QMouseInput)

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

- List of all members, including inherited members

## Properties

- containsMouse : const bool
- controller : Qt3DInput::QMouseController *

- 1 property inherited from Qt3DCore::QComponent
- 2 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject

## Public Functions

| QMouseInput(QNode *parent = 0)
| ~QMouseInput()
bool | containsMouse() const
QMouseController * | controller() const

- 2 public functions inherited from Qt3DCore::QComponent
- 6 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Public Slots

void | setController(QMouseController *controller)

- 1 public slot inherited from Qt3DCore::QComponent
- 2 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject

## Signals

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)

- 2 signals inherited from Qt3DCore::QComponent
- 2 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject

## Protected Functions

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

- 1 protected function inherited from Qt3DCore::QComponent
- 3 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject

### Additional Inherited Members

- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
- 1 static protected member inherited from Qt3DCore::QNode

## 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 = 0)

Constructs a new QMouseInput instance with parent parent.

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

### QMouseInput::~QMouseInput()

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)