aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2017-03-09 12:52:30 +0100
committerNico Vertriest <nico.vertriest@qt.io>2017-03-09 13:06:52 +0000
commit115080e0d7459f2a7e7039944cc5a57518b6dd16 (patch)
tree783a78b9514209cc70e5063cdfec69af50eb9617 /src
parentfdce0bd433f4a219a371db4091b18cc48209b04f (diff)
Doc: documented methods qgamepadmanager.cpp
Change-Id: I5334ccd62324fa836c760903184f5b2c9951e141 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gamepad/qgamepadmanager.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gamepad/qgamepadmanager.cpp b/src/gamepad/qgamepadmanager.cpp
index 9628f0e..32d7642 100644
--- a/src/gamepad/qgamepadmanager.cpp
+++ b/src/gamepad/qgamepadmanager.cpp
@@ -172,54 +172,91 @@ QGamepadManager::~QGamepadManager()
d->gamepadBackend->deleteLater();
}
+/*!
+ Returns the instance of the QGamepadManager.
+*/
QGamepadManager *QGamepadManager::instance()
{
static QGamepadManager instance;
return &instance;
}
+/*!
+ Returns a boolean indicating whether the gamepad with
+ the specified \a deviceId is connected or not.
+*/
bool QGamepadManager::isGamepadConnected(int deviceId) const
{
Q_D(const QGamepadManager);
return d->connectedGamepads.contains(deviceId);
}
+/*!
+ Returns a QList containing the \l {QGamepad::}{deviceId}
+ values of the connected gamepads.
+*/
const QList<int> QGamepadManager::connectedGamepads() const
{
Q_D(const QGamepadManager);
return d->connectedGamepads.toList();
}
+/*!
+ Returns a boolean indicating whether configuration
+ is needed for the specified \a deviceId.
+*/
bool QGamepadManager::isConfigurationNeeded(int deviceId) const
{
Q_D(const QGamepadManager);
return d->gamepadBackend->isConfigurationNeeded(deviceId);
}
+/*!
+ Configures the specified \a button on the gamepad with
+ this \a deviceId.
+ Returns \c true in case of success.
+*/
bool QGamepadManager::configureButton(int deviceId, QGamepadManager::GamepadButton button)
{
Q_D(QGamepadManager);
return d->gamepadBackend->configureButton(deviceId, button);
}
+/*!
+ Configures \a axis on the gamepad with the specified \a deviceId.
+ Returns \c true in case of success.
+*/
bool QGamepadManager::configureAxis(int deviceId, QGamepadManager::GamepadAxis axis)
{
Q_D(QGamepadManager);
return d->gamepadBackend->configureAxis(deviceId, axis);
}
+/*!
+ Configures \a button as the cancel button on the gamepad with
+ id \a deviceId.
+ Returns \c true in case of success.
+*/
bool QGamepadManager::setCancelConfigureButton(int deviceId, QGamepadManager::GamepadButton button)
{
Q_D(QGamepadManager);
return d->gamepadBackend->setCancelConfigureButton(deviceId, button);
}
+/*!
+ Resets the configuration on the gamepad with the
+ specified \a deviceId.
+*/
void QGamepadManager::resetConfiguration(int deviceId)
{
Q_D(QGamepadManager);
d->gamepadBackend->resetConfiguration(deviceId);
}
+/*!
+ Sets the name of the \a file that stores the button and axis
+ configuration data.
+*/
void QGamepadManager::setSettingsFile(const QString &file)
{
Q_D(QGamepadManager);