QGamepad Class▲
-
Header: QGamepad
-
qmake: QT += gamepad
-
Inherited By:
-
Instantiated By: qml-qtgamepad-gamepad.xml
-
Inherits: QObject
Detailed Description▲
QGamepad is used to access the current state of gamepad hardware connected to a system.
Property Documentation▲
[read-only] axisLeftX : const double▲
The value of the left thumbstick's X axis. The axis values range from -1.0 to 1.0.
Access functions:
-
double axisLeftX() const
Notifier signal:
-
void axisLeftXChanged(double value)
[read-only] axisLeftY : const double▲
The value of the left thumbstick's Y axis. The axis values range from -1.0 to 1.0.
Access functions:
-
double axisLeftY() const
Notifier signal:
-
void axisLeftYChanged(double value)
[read-only] axisRightX : const double▲
This value of the right thumbstick's X axis. The axis values range from -1.0 to 1.0.
Access functions:
-
double axisRightX() const
Notifier signal:
-
void axisRightXChanged(double value)
[read-only] axisRightY : const double▲
This value of the right thumbstick's Y axis. The axis values range from -1.0 to 1.0.
Access functions:
-
double axisRightY() const
Notifier signal:
-
void axisRightYChanged(double value)
[read-only] buttonL1 : const bool▲
Access functions:
-
bool buttonL1() const
Notifier signal:
-
void buttonL1Changed(bool value)
[read-only] buttonL2 : const double▲
Access functions:
-
double buttonL2() const
Notifier signal:
-
void buttonL2Changed(double value)
[read-only] buttonL3 : const bool▲
Access functions:
-
bool buttonL3() const
Notifier signal:
-
void buttonL3Changed(bool value)
[read-only] buttonR1 : const bool▲
Access functions:
-
bool buttonR1() const
Notifier signal:
-
void buttonR1Changed(bool value)
[read-only] buttonR2 : const double▲
Access functions:
-
double buttonR2() const
Notifier signal:
-
void buttonR2Changed(double value)
[read-only] buttonR3 : const bool▲
Access functions:
-
bool buttonR3() const
Notifier signal:
-
void buttonR3Changed(bool value)
[read-only] buttonA : const bool▲
Access functions:
-
bool buttonA() const
Notifier signal:
-
void buttonAChanged(bool value)
[read-only] buttonB : const bool▲
Access functions:
-
bool buttonB() const
Notifier signal:
-
void buttonBChanged(bool value)
[read-only] buttonCenter : const bool▲
Access functions:
-
bool buttonCenter() const
Notifier signal:
-
void buttonCenterChanged(bool value)
[read-only] buttonDown : const bool▲
Access functions:
-
bool buttonDown() const
Notifier signal:
-
void buttonDownChanged(bool value)
[read-only] buttonGuide : const bool▲
Access functions:
-
bool buttonGuide() const
Notifier signal:
-
void buttonGuideChanged(bool value)
[read-only] buttonLeft : const bool▲
Access functions:
-
bool buttonLeft() const
Notifier signal:
-
void buttonLeftChanged(bool value)
[read-only] buttonRight : const bool▲
Access functions:
-
bool buttonRight() const
Notifier signal:
-
void buttonRightChanged(bool value)
[read-only] buttonSelect : const bool▲
Access functions:
-
bool buttonSelect() const
Notifier signal:
-
void buttonSelectChanged(bool value)
[read-only] buttonStart : const bool▲
Access functions:
-
bool buttonStart() const
Notifier signal:
-
void buttonStartChanged(bool value)
[read-only] buttonUp : const bool▲
Access functions:
-
bool buttonUp() const
Notifier signal:
-
void buttonUpChanged(bool value)
[read-only] buttonX : const bool▲
Access functions:
-
bool buttonX() const
Notifier signal:
-
void buttonXChanged(bool value)
[read-only] buttonY : const bool▲
Access functions:
-
bool buttonY() const
Notifier signal:
-
void buttonYChanged(bool value)
[read-only] connected : const bool▲
The connectivity state of the gamepad device. If a gamepad is connected, this property will be true, otherwise false.
Access functions:
-
bool isConnected() const
Notifier signal:
-
void connectedChanged(bool value)
deviceId : int▲
This property holds the deviceId of the gamepad device. Multiple gamepad devices can be connected at any given time, so setting this property defines which gamepad to use.
Access functions:
-
int deviceId() const
-
void setDeviceId(int number)
Notifier signal:
-
void deviceIdChanged(int value)
See Also▲
See also QGamepadManager::connectedGamepads()
[read-only] name : const QString▲
The reported name of the gamepad if one is available.
Access functions:
-
name() const
Notifier signal:
-
void nameChanged( value)