QGamepadKeyNavigation Class

Provides support for keyboard events triggered by gamepads. More...

Header: #include <QGamepadKeyNavigation>
qmake: QT += gamepad
Inherits: QObject

Properties

  • 1 property inherited from QObject

Public Functions

QGamepadKeyNavigation(QObject *parent = nullptr)
bool active() const
Qt::Key buttonAKey() const
Qt::Key buttonBKey() const
Qt::Key buttonGuideKey() const
Qt::Key buttonL1Key() const
Qt::Key buttonL2Key() const
Qt::Key buttonL3Key() const
Qt::Key buttonR1Key() const
Qt::Key buttonR2Key() const
Qt::Key buttonR3Key() const
Qt::Key buttonSelectKey() const
Qt::Key buttonStartKey() const
Qt::Key buttonXKey() const
Qt::Key buttonYKey() const
Qt::Key downKey() const
QGamepad *gamepad() const
Qt::Key leftKey() const
Qt::Key rightKey() const
Qt::Key upKey() const
  • 32 public functions inherited from QObject

Public Slots

void setActive(bool isActive)
void setButtonAKey(Qt::Key key)
void setButtonBKey(Qt::Key key)
void setButtonGuideKey(Qt::Key key)
void setButtonL1Key(Qt::Key key)
void setButtonL2Key(Qt::Key key)
void setButtonL3Key(Qt::Key key)
void setButtonR1Key(Qt::Key key)
void setButtonR2Key(Qt::Key key)
void setButtonR3Key(Qt::Key key)
void setButtonSelectKey(Qt::Key key)
void setButtonStartKey(Qt::Key key)
void setButtonXKey(Qt::Key key)
void setButtonYKey(Qt::Key key)
void setDownKey(Qt::Key key)
void setGamepad(QGamepad *gamepad)
void setLeftKey(Qt::Key key)
void setRightKey(Qt::Key key)
void setUpKey(Qt::Key key)
  • 1 public slot inherited from QObject

Signals

void activeChanged(bool isActive)
void buttonAKeyChanged(Qt::Key key)
void buttonBKeyChanged(Qt::Key key)
void buttonGuideKeyChanged(Qt::Key key)
void buttonL1KeyChanged(Qt::Key key)
void buttonL2KeyChanged(Qt::Key key)
void buttonL3KeyChanged(Qt::Key key)
void buttonR1KeyChanged(Qt::Key key)
void buttonR2KeyChanged(Qt::Key key)
void buttonR3KeyChanged(Qt::Key key)
void buttonSelectKeyChanged(Qt::Key key)
void buttonStartKeyChanged(Qt::Key key)
void buttonXKeyChanged(Qt::Key key)
void buttonYKeyChanged(Qt::Key key)
void downKeyChanged(Qt::Key key)
void gamepadChanged(QGamepad *gamepad)
void leftKeyChanged(Qt::Key key)
void rightKeyChanged(Qt::Key key)
void upKeyChanged(Qt::Key key)

Additional Inherited Members

  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

Provides support for keyboard events triggered by gamepads.

QGamepadKeyNavigation provides support for keyboard events triggered by gamepads.

Property Documentation

active : bool

Access functions:

bool active() const
void setActive(bool isActive)

Notifier signal:

void activeChanged(bool isActive)

buttonAKey : Qt::Key

Access functions:

Qt::Key buttonAKey() const
void setButtonAKey(Qt::Key key)

Notifier signal:

void buttonAKeyChanged(Qt::Key key)

buttonBKey : Qt::Key

Access functions:

Qt::Key buttonBKey() const
void setButtonBKey(Qt::Key key)

Notifier signal:

void buttonBKeyChanged(Qt::Key key)

buttonGuideKey : Qt::Key

Access functions:

Qt::Key buttonGuideKey() const
void setButtonGuideKey(Qt::Key key)

Notifier signal:

void buttonGuideKeyChanged(Qt::Key key)

buttonL1Key : Qt::Key

Access functions:

Qt::Key buttonL1Key() const
void setButtonL1Key(Qt::Key key)

Notifier signal:

void buttonL1KeyChanged(Qt::Key key)

buttonL2Key : Qt::Key

Access functions:

Qt::Key buttonL2Key() const
void setButtonL2Key(Qt::Key key)

Notifier signal:

void buttonL2KeyChanged(Qt::Key key)

buttonL3Key : Qt::Key

Access functions:

Qt::Key buttonL3Key() const
void setButtonL3Key(Qt::Key key)

Notifier signal:

void buttonL3KeyChanged(Qt::Key key)

buttonR1Key : Qt::Key

Access functions:

Qt::Key buttonR1Key() const
void setButtonR1Key(Qt::Key key)

Notifier signal:

void buttonR1KeyChanged(Qt::Key key)

buttonR2Key : Qt::Key

Access functions:

Qt::Key buttonR2Key() const
void setButtonR2Key(Qt::Key key)

Notifier signal:

void buttonR2KeyChanged(Qt::Key key)

buttonR3Key : Qt::Key

Access functions:

Qt::Key buttonR3Key() const
void setButtonR3Key(Qt::Key key)

Notifier signal:

void buttonR3KeyChanged(Qt::Key key)

buttonSelectKey : Qt::Key

Access functions:

Qt::Key buttonSelectKey() const
void setButtonSelectKey(Qt::Key key)

Notifier signal:

void buttonSelectKeyChanged(Qt::Key key)

buttonStartKey : Qt::Key

Access functions:

Qt::Key buttonStartKey() const
void setButtonStartKey(Qt::Key key)

Notifier signal:

void buttonStartKeyChanged(Qt::Key key)

buttonXKey : Qt::Key

Access functions:

Qt::Key buttonXKey() const
void setButtonXKey(Qt::Key key)

Notifier signal:

void buttonXKeyChanged(Qt::Key key)

buttonYKey : Qt::Key

Access functions:

Qt::Key buttonYKey() const
void setButtonYKey(Qt::Key key)

Notifier signal:

void buttonYKeyChanged(Qt::Key key)

downKey : Qt::Key

Access functions:

Qt::Key downKey() const
void setDownKey(Qt::Key key)

Notifier signal:

void downKeyChanged(Qt::Key key)

gamepad : QGamepad *

Access functions:

QGamepad *gamepad() const
void setGamepad(QGamepad *gamepad)

Notifier signal:

void gamepadChanged(QGamepad *gamepad)

leftKey : Qt::Key

Access functions:

Qt::Key leftKey() const
void setLeftKey(Qt::Key key)

Notifier signal:

void leftKeyChanged(Qt::Key key)

rightKey : Qt::Key

Access functions:

Qt::Key rightKey() const
void setRightKey(Qt::Key key)

Notifier signal:

void rightKeyChanged(Qt::Key key)

upKey : Qt::Key

Access functions:

Qt::Key upKey() const
void setUpKey(Qt::Key key)

Notifier signal:

void upKeyChanged(Qt::Key key)

Member Function Documentation

QGamepadKeyNavigation::QGamepadKeyNavigation(QObject *parent = nullptr)

Constructs a QGamepadNavigation object with the given parent.

bool QGamepadKeyNavigation::active() const

* Returns whether key navigation on the gamepad is active or not.

Note: Getter function for property active.

See also setActive().

Qt::Key QGamepadKeyNavigation::buttonAKey() const

Returns the key mapping of A button.

Note: Getter function for property buttonAKey.

See also setButtonAKey().

Qt::Key QGamepadKeyNavigation::buttonBKey() const

Returns the key mapping of the B button.

Note: Getter function for property buttonBKey.

See also setButtonBKey().

Qt::Key QGamepadKeyNavigation::buttonGuideKey() const

Returns the key mapping of the Guide button.

Note: Getter function for property buttonGuideKey.

See also setButtonGuideKey().

Qt::Key QGamepadKeyNavigation::buttonL1Key() const

Returns the key mapping of the left shoulder button.

Note: Getter function for property buttonL1Key.

See also setButtonL1Key().

Qt::Key QGamepadKeyNavigation::buttonL2Key() const

Returns the key mapping of the left trigger button.

Note: Getter function for property buttonL2Key.

See also setButtonL2Key().

Qt::Key QGamepadKeyNavigation::buttonL3Key() const

Returns the key mapping of the left stick button.

Note: Getter function for property buttonL3Key.

See also setButtonL3Key().

Qt::Key QGamepadKeyNavigation::buttonR1Key() const

Returns the key mapping of the Right shoulder button.

Note: Getter function for property buttonR1Key.

See also setButtonR1Key().

Qt::Key QGamepadKeyNavigation::buttonR2Key() const

Returns the key mapping of the Right trigger button.

Note: Getter function for property buttonR2Key.

See also setButtonR2Key().

Qt::Key QGamepadKeyNavigation::buttonR3Key() const

Returns the key mapping of the right stick button.

Note: Getter function for property buttonR3Key.

See also setButtonR3Key().

Qt::Key QGamepadKeyNavigation::buttonSelectKey() const

Returns the key mapping of the Select button.

Note: Getter function for property buttonSelectKey.

See also setButtonSelectKey().

Qt::Key QGamepadKeyNavigation::buttonStartKey() const

Returns the key mapping of the Start button.

Note: Getter function for property buttonStartKey.

See also setButtonStartKey().

Qt::Key QGamepadKeyNavigation::buttonXKey() const

Returns the key mapping of the X button.

Note: Getter function for property buttonXKey.

See also setButtonXKey().

Qt::Key QGamepadKeyNavigation::buttonYKey() const

Returns the key mapping of the Y button.

Note: Getter function for property buttonYKey.

See also setButtonYKey().

Qt::Key QGamepadKeyNavigation::downKey() const

Returns the key mapping of the Down button.

Note: Getter function for property downKey.

See also setDownKey().

QGamepad *QGamepadKeyNavigation::gamepad() const

Returns a pointer the current QGamepad

Note: Getter function for property gamepad.

See also setGamepad().

Qt::Key QGamepadKeyNavigation::leftKey() const

Returns the key mapping of the Left button.

Note: Getter function for property leftKey.

See also setLeftKey().

Qt::Key QGamepadKeyNavigation::rightKey() const

Returns the key mapping of the Right button.

Note: Getter function for property rightKey.

See also setRightKey().

[slot] void QGamepadKeyNavigation::setActive(bool isActive)

Activates key navigation if isActive is true, disables it otherwise.

Note: Setter function for property active.

See also active().

[slot] void QGamepadKeyNavigation::setButtonAKey(Qt::Key key)

* Sets the mapping of the A button with the keycode * specified in key.

Note: Setter function for property buttonAKey.

See also buttonAKey().

[slot] void QGamepadKeyNavigation::setButtonBKey(Qt::Key key)

* Sets the mapping of the B button with the keycode * specified in key.

Note: Setter function for property buttonBKey.

See also buttonBKey().

[slot] void QGamepadKeyNavigation::setButtonGuideKey(Qt::Key key)

* Sets the mapping of the Guide button with the keycode * specified in key.

Note: Setter function for property buttonGuideKey.

See also buttonGuideKey().

[slot] void QGamepadKeyNavigation::setButtonL1Key(Qt::Key key)

* Sets the mapping of the left shoulder button with the * keycode specified in key.

Note: Setter function for property buttonL1Key.

See also buttonL1Key().

[slot] void QGamepadKeyNavigation::setButtonL2Key(Qt::Key key)

* Sets the mapping of the left trigger button with the * keycode specified in key.

Note: Setter function for property buttonL2Key.

See also buttonL2Key().

[slot] void QGamepadKeyNavigation::setButtonL3Key(Qt::Key key)

* Sets the mapping of the left stick button with the * keycode specified in key.

Note: Setter function for property buttonL3Key.

See also buttonL3Key().

[slot] void QGamepadKeyNavigation::setButtonR1Key(Qt::Key key)

* Sets the mapping of the right shoulder button with the * keycode specified in key.

Note: Setter function for property buttonR1Key.

See also buttonR1Key().

[slot] void QGamepadKeyNavigation::setButtonR2Key(Qt::Key key)

* Sets the mapping of the right trigger button with the * keycode specified in key.

Note: Setter function for property buttonR2Key.

See also buttonR2Key().

[slot] void QGamepadKeyNavigation::setButtonR3Key(Qt::Key key)

* Sets the mapping of the right stick button with the * keycode specified in key.

Note: Setter function for property buttonR3Key.

See also buttonR3Key().

[slot] void QGamepadKeyNavigation::setButtonSelectKey(Qt::Key key)

* Sets the mapping of the Select button with the * keycode specified in key.

Note: Setter function for property buttonSelectKey.

See also buttonSelectKey().

[slot] void QGamepadKeyNavigation::setButtonStartKey(Qt::Key key)

* Sets the mapping of the Start button with the * keycode specified in key.

Note: Setter function for property buttonStartKey.

See also buttonStartKey().

[slot] void QGamepadKeyNavigation::setButtonXKey(Qt::Key key)

* Sets the mapping of the X button with the * keycode specified in key.

Note: Setter function for property buttonXKey.

See also buttonXKey().

[slot] void QGamepadKeyNavigation::setButtonYKey(Qt::Key key)

* Sets the mapping of the Y button with the * keycode specified in key.

Note: Setter function for property buttonYKey.

See also buttonYKey().

[slot] void QGamepadKeyNavigation::setDownKey(Qt::Key key)

* Sets the mapping of the Down button with the * keycode specified in key.

Note: Setter function for property downKey.

See also downKey().

[slot] void QGamepadKeyNavigation::setGamepad(QGamepad *gamepad)

* Selects the specified gamepad.

Note: Setter function for property gamepad.

See also gamepad().

[slot] void QGamepadKeyNavigation::setLeftKey(Qt::Key key)

* Sets the mapping of the Left button with the * keycode specified in key.

Note: Setter function for property leftKey.

See also leftKey().

[slot] void QGamepadKeyNavigation::setRightKey(Qt::Key key)

* Sets the mapping of the Right button with the * keycode specified in key.

Note: Setter function for property rightKey.

See also rightKey().

[slot] void QGamepadKeyNavigation::setUpKey(Qt::Key key)

* Sets the mapping of the Up button with the * keycode specified in key.

Note: Setter function for property upKey.

See also upKey().

Qt::Key QGamepadKeyNavigation::upKey() const

Returns the key mapping of the Up button.

Note: Getter function for property upKey.

See also setUpKey().

© 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.