QGamepadManager Class
Queries attached gamepads and related events. More...
| Header: | #include <QGamepadManager> |
| qmake: | QT += gamepad |
| Instantiated By: | GamepadManager |
| Inherits: | QObject |
Public Types
| flags | GamepadAxes |
| flags | GamepadButtons |
Public Functions
| const QList<int> | connectedGamepads() const |
| QString | gamepadName(int deviceId) const |
| bool | isGamepadConnected(int deviceId) const |
- 30 public functions inherited from QObject
Public Slots
| bool | configureAxis(int deviceId, QGamepadManager::GamepadAxis axis) |
| bool | configureButton(int deviceId, QGamepadManager::GamepadButton button) |
| bool | isConfigurationNeeded(int deviceId) const |
| void | resetConfiguration(int deviceId) |
| bool | setCancelConfigureButton(int deviceId, QGamepadManager::GamepadButton button) |
| void | setSettingsFile(const QString &file) |
- 1 public slot inherited from QObject
Signals
| void | connectedGamepadsChanged() |
- 2 signals inherited from QObject
Static Public Members
| QGamepadManager * | instance() |
- 9 static public members inherited from QObject
Related Non-Members
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| 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
Detailed Description
QGamepadManager provides a high-level interface for querying the attached gamepads and events related to all of the connected devices.
Member Function Documentation
[slot] bool QGamepadManager::configureAxis(int deviceId, QGamepadManager::GamepadAxis axis)
Configures axis on the gamepad with the specified deviceId. Returns true in case of success.
[slot] bool QGamepadManager::configureButton(int deviceId, QGamepadManager::GamepadButton button)
Configures the specified button on the gamepad with this deviceId. Returns true in case of success.
[slot] bool QGamepadManager::isConfigurationNeeded(int deviceId) const
Returns a boolean indicating whether configuration is needed for the specified deviceId.
[slot] void QGamepadManager::resetConfiguration(int deviceId)
Resets the configuration on the gamepad with the specified deviceId.
[slot] bool QGamepadManager::setCancelConfigureButton(int deviceId, QGamepadManager::GamepadButton button)
Configures button as the cancel button on the gamepad with id deviceId. Returns true in case of success.
[slot] void QGamepadManager::setSettingsFile(const QString &file)
Sets the name of the file that stores the button and axis configuration data.
const QList<int> QGamepadManager::connectedGamepads() const
Returns a list of integers containing the deviceId values of the connected gamepads.
Note: Getter function for property connectedGamepads.
QString QGamepadManager::gamepadName(int deviceId) const
Returns the name of the gamepad identified by deviceId. If deviceId does not identify a connected gamepad, returns an empty string.
This function was introduced in Qt 5.11.
[static] QGamepadManager *QGamepadManager::instance()
Returns the instance of the QGamepadManager.
bool QGamepadManager::isGamepadConnected(int deviceId) const
Returns a boolean indicating whether the gamepad with the specified deviceId is connected or not.