QcGamepadProfile Struct
How one pad steers the player (decisions E-541, E-610, E-611): dead zones, outer zone and response curve of sticks and triggers (QcGamepadResponse), the turning speed of the right stick at full deflection, whether pushing it up looks down, how far a trigger is pulled before it acts, whether the pad vibrates and the buttons of the actions. More...
| Header: | #include <clientcore/settings/QcGamepadProfile.h> |
Public Functions
Public Variables
| QcGamepadMapping::Bindings | bindings |
| bool | invertLook |
| double | lookSpeed |
| QcGamepadResponse | response |
| float | triggerThreshold |
| bool | vibration |
Static Public Members
| double | clampLookSpeed(double degreesPerSecond) |
| float | clampTriggerThreshold(float share) |
| const double | defaultLookSpeed |
| const float | defaultTriggerThreshold |
| QcGamepadProfile | load(const QSettings &file, const QString &prefix) |
| const double | maxLookSpeed |
| const float | maxTriggerThreshold |
| const double | minLookSpeed |
| const float | minTriggerThreshold |
Detailed Description
The settings keep one for all pads and one per pad model that has its own (QcGamepadSettings). Stored below a key prefix ("gamepad/<key>"); values out of range are clamped, unusable ones give the defaults.
Member Function Documentation
[static] double QcGamepadProfile::clampLookSpeed(double degreesPerSecond)
Returns degreesPerSecond clamped to minLookSpeed..maxLookSpeed; NaN and infinities give the default.
[static] float QcGamepadProfile::clampTriggerThreshold(float share)
Returns share clamped to minTriggerThreshold..maxTriggerThreshold; NaN gives the default.
[static] QcGamepadProfile QcGamepadProfile::load(const QSettings &file, const QString &prefix)
Returns the profile stored as "<prefix>/<key>" in file (prefix without the slash); missing keys give the defaults.
QcGamepadProfile QcGamepadProfile::sanitized() const
Returns the profile with every value in its range; a button table in conflict (a file edited by hand) gives the default buttons.
void QcGamepadProfile::save(QSettings &file, const QString &prefix) const
Stores the profile in file as "<prefix>/<key>" (prefix without the slash).
Member Variable Documentation
QcGamepadMapping::Bindings QcGamepadProfile::bindings
The buttons of the actions.
const double QcGamepadProfile::defaultLookSpeed
Turning speed of a new profile, in degrees per second.
const float QcGamepadProfile::defaultTriggerThreshold
Trigger threshold of a new profile: the share of the travel at which a press counts.
bool QcGamepadProfile::invertLook
Whether pushing the right stick up looks down.
double QcGamepadProfile::lookSpeed
Degrees per second at full deflection of the right stick.
const double QcGamepadProfile::maxLookSpeed
Fastest turning speed that can be set.
const float QcGamepadProfile::maxTriggerThreshold
Highest trigger threshold that can be set.
const double QcGamepadProfile::minLookSpeed
Slowest turning speed that can be set.
const float QcGamepadProfile::minTriggerThreshold
Lowest trigger threshold that can be set.
QcGamepadResponse QcGamepadProfile::response
Dead zones, outer zone and response curve of sticks and triggers.
float QcGamepadProfile::triggerThreshold
A trigger acts beyond this share of its travel (after dead zone and curve) and lets go again 0.2 below it (QcGamepadMapping::releaseFor).
bool QcGamepadProfile::vibration
The pad vibrates when the player is hurt (decision E-615).