QActionInput Class | Qt 3D 5.9

Qt 5.9 | Qt 3D | C++ Classes | QActionInput

Qt 5.9.9 Reference Documentation

# QActionInput Class

(Qt3DInput::QActionInput)

QActionInput stores Device and Buttons used to trigger an input event. More...

Header: | #include <QActionInput>
qmake: | QT += 3dinput
Since: | Qt 5.7
Instantiated By: | ActionInput
Inherits: | Qt3DInput::QAbstractActionInput

- List of all members, including inherited members

## Properties

- buttons : QVector<int>
- sourceDevice : Qt3DInput::QAbstractPhysicalDevice *

- 3 properties inherited from Qt3DCore::QNode

## Public Functions

| QActionInput(Qt3DCore::QNode *parent = nullptr)
QVector<int> | buttons() const
QAbstractPhysicalDevice * | sourceDevice() const

- 11 public functions inherited from Qt3DCore::QNode

## Public Slots

void | setButtons(const QVector<int> &buttons)
void | setSourceDevice(QAbstractPhysicalDevice *sourceDevice)

- 3 public slots inherited from Qt3DCore::QNode

## Signals

void | buttonsChanged(const QVector<int> &buttons)
void | sourceDeviceChanged(QAbstractPhysicalDevice *sourceDevice)

- 4 signals inherited from Qt3DCore::QNode

### Additional Inherited Members

- 2 protected functions inherited from Qt3DCore::QNode

## Detailed Description

QActionInput stores Device and Buttons used to trigger an input event.

## Property Documentation

### buttons : QVector<int>

Holds the buttons that can trigger this Action.

Access functions:

QVector<int> | buttons() const
void | setButtons(const QVector<int> &buttons)

Notifier signal:

void | buttonsChanged(const QVector<int> &buttons)

### sourceDevice : Qt3DInput::QAbstractPhysicalDevice *

The current source device of the QActionInput.

Access functions:

QAbstractPhysicalDevice * | sourceDevice() const
void | setSourceDevice(QAbstractPhysicalDevice *sourceDevice)

Notifier signal:

void | sourceDeviceChanged(QAbstractPhysicalDevice *sourceDevice)

## Member Function Documentation

### QActionInput::QActionInput(Qt3DCore::QNode *parent = nullptr)

Constructs a new QActionInput instance with parent.

### `[signal]` void QActionInput::buttonsChanged(const QVector<int> &buttons)

This signal is emitted when the buttons associated with the action input is changed. The buttons changed are buttons

Note: Notifier signal for property buttons.

### `[slot]` void QActionInput::setButtons(const QVector<int> &buttons)

Set the buttons to trigger the QActionInput instance to buttons.

Note: Setter function for property buttons.

See also buttons().

### `[signal]` void QActionInput::sourceDeviceChanged(QAbstractPhysicalDevice *sourceDevice)

This signal is emitted when the source device associated with the action input is changed to sourceDevice.

Note: Notifier signal for property sourceDevice.