![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <card_database_settings.h>
Public Member Functions | |
| void | setSortKey (QString shortName, unsigned int sortKey) override |
| void | setEnabled (QString shortName, bool enabled) override |
| void | setIsKnown (QString shortName, bool isknown) override |
| unsigned int | getSortKey (QString shortName) const override |
| bool | isEnabled (QString shortName) const override |
| bool | isKnown (QString shortName) const override |
| SetOptions | getSetOptions (QString shortName) const override |
| Returns the bundled priority options for a set in a single call. | |
| QStringList | getEnabledSetNames () const override |
| Returns the short names of every set currently marked as enabled. | |
| void | saveSets (const QVector< SetSaveData > &data) override |
| Persists per-set options for every entry in a single settings flush. | |
| Public Member Functions inherited from SettingsManager | |
| SettingsManager (const QString &settingPath, const QString &defaultGroup=QString(), const QString &defaultSubGroup=QString(), QObject *parent=nullptr) | |
| QVariant | getValue (const QString &name) const |
| QVariant | getValue (const QString &name, const QString &group, const QString &subGroup=QString()) const |
| QVariant | getValue (const QString &name, const QString &group, const QString &subGroup, const QVariant &defaultValue) const |
| void | batchWrite (std::function< void(QSettings &)> batchWriteFunction) |
| void | sync () |
| Public Member Functions inherited from ICardSetPriorityController | |
| virtual | ~ICardSetPriorityController ()=default |
Private Member Functions | |
| CardDatabaseSettings (const QString &settingPath, QObject *parent=nullptr) | |
| void | ensureSetOptionsLoaded () const |
Private Attributes | |
| QMutex | setOptionsMutex |
| QHash< QString, SetOptions > | setOptionsCache |
| bool | setOptionsLoaded = false |
Friends | |
| class | SettingsCache |
Additional Inherited Members | |
| Protected Member Functions inherited from SettingsManager | |
| QSettings | getSettings () const |
| void | setValue (const QVariant &value, const QString &name) |
| void | setValue (const QVariant &value, const QString &name, const QString &group, const QString &subGroup=QString()) |
| void | deleteValue (const QString &name) |
| void | deleteValue (const QString &name, const QString &group, const QString &subGroup=QString()) |
| Protected Attributes inherited from SettingsManager | |
| QString | settingPath |
| QString | defaultGroup |
| QString | defaultSubGroup |
|
explicitprivate |
|
private |
|
overridevirtual |
Returns the short names of every set currently marked as enabled.
Callers fold this into the card database cache source hash so that toggling set enablement invalidates the cache.
Implements ICardSetPriorityController.
|
overridevirtual |
Returns the bundled priority options for a set in a single call.
| shortName | The set's short name. |
Implements ICardSetPriorityController.
|
overridevirtual |
Implements ICardSetPriorityController.
|
overridevirtual |
Implements ICardSetPriorityController.
|
overridevirtual |
Implements ICardSetPriorityController.
|
overridevirtual |
Persists per-set options for every entry in a single settings flush.
Each individual setSortKey/setEnabled/setIsKnown call re-opens and re-syncs the whole .ini when backed by QSettings, so persisting hundreds of sets one option at a time freezes the GUI thread for seconds. Callers that touch more than a handful of sets must bundle the records and call this once.
Implements ICardSetPriorityController.
|
overridevirtual |
Implements ICardSetPriorityController.
|
overridevirtual |
Implements ICardSetPriorityController.
|
overridevirtual |
Implements ICardSetPriorityController.
|
friend |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |