QcGamepadSettings Struct
The gamepad part of the settings (decisions E-541, E-610, E-611): the profile all pads use (standard, stored as gamepad/<key> as before), the pad models with a profile of their own (by SDL's GUID, stored as gamepadControllers/<n>/<key>, at most maxControllers) and whether the hotbar shows only the slot in the hand (radialOnly, decision E-614). More...
| Header: | #include <clientcore/settings/QcGamepadSettings.h> |
Public Types
| struct | Controller |
Public Functions
| const QcGamepadSettings::Controller * | controller(const QString &guid) const |
| const QcGamepadProfile & | profileFor(const QString &guid) const |
| void | removeProfile(const QString &guid) |
| void | save(QSettings &file) const |
| void | setProfile(const QString &guid, const QString &name, const QcGamepadProfile &profile, const QStringList &keep = {}) |
Public Variables
| QList<QcGamepadSettings::Controller> | controllers |
| bool | radialOnly |
| QcGamepadProfile | standard |
Static Public Members
| QcGamepadSettings | load(const QSettings &file) |
| const qsizetype | maxControllers |
Detailed Description
Member Function Documentation
const QcGamepadSettings::Controller *QcGamepadSettings::controller(const QString &guid) const
Returns the model's own entry; nullptr when it uses the standard profile (or guid is empty).
[static] QcGamepadSettings QcGamepadSettings::load(const QSettings &file)
Returns the gamepad settings stored in file; defaults for missing values.
const QcGamepadProfile &QcGamepadSettings::profileFor(const QString &guid) const
Returns the profile of the model guid: its own, else the standard one.
void QcGamepadSettings::removeProfile(const QString &guid)
The model guid uses the standard profile again.
void QcGamepadSettings::save(QSettings &file) const
Stores the gamepad settings in file.
void QcGamepadSettings::setProfile(const QString &guid, const QString &name, const QcGamepadProfile &profile, const QStringList &keep = {})
Stores profile as the own of the model guid named name and moves its entry last: the entries are kept in the order of their last change. Beyond maxControllers the entry changed longest ago goes, but never one of the models in keep (the connected pads).
Member Variable Documentation
QList<QcGamepadSettings::Controller> QcGamepadSettings::controllers
The pad models with a profile of their own, the one changed longest ago first.
const qsizetype QcGamepadSettings::maxControllers
Pad models with a profile of their own, at most.
bool QcGamepadSettings::radialOnly
Whether the hotbar shows only the slot in the hand.
QcGamepadProfile QcGamepadSettings::standard
The profile all pads use that have none of their own.