IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QGamepadManager Class

Queries attached gamepads and related events.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QGamepadManager Class

  • Header: QGamepadManager

  • qmake: QT += gamepad

  • Inherited By:

  • Instantiated By: qml-qtgamepad-gamepadmanager.xml

  • Inherits: QObject

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

 

bool QGamepadManager::configureAxis(int deviceId, QGamepadManager::GamepadAxis axis)

Configures axis on the gamepad with the specified deviceId. Returns true in case of success.

bool QGamepadManager::configureButton(int deviceId, QGamepadManager::GamepadButton button)

Configures the specified button on the gamepad with this deviceId. Returns true in case of success.

const QList<int> QGamepadManager::connectedGamepads() const

Returns a list of integers containing the deviceId values of the connected gamepads.

Getter function for property connectedGamepads.

[since 5.11] 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::isConfigurationNeeded(int deviceId) const

Returns a boolean indicating whether configuration is needed for the specified deviceId.

bool QGamepadManager::isGamepadConnected(int deviceId) const

Returns a boolean indicating whether the gamepad with the specified deviceId is connected or not.

void QGamepadManager::resetConfiguration(int deviceId)

Resets the configuration on the gamepad with the specified deviceId.

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.

void QGamepadManager::setSettingsFile(const QString &file)

Sets the name of the file that stores the button and axis configuration data.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+