Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
CardDatabaseSettings Class Reference

#include <card_database_settings.h>

Inheritance diagram for CardDatabaseSettings:
[legend]
Collaboration diagram for CardDatabaseSettings:
[legend]

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.
void saveSets (const QVector< SetSaveData > &data) override
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, SetOptionssetOptionsCache
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

Detailed Description

Todo
Document this file.

Constructor & Destructor Documentation

◆ CardDatabaseSettings()

CardDatabaseSettings::CardDatabaseSettings ( const QString & settingPath,
QObject * parent = nullptr )
explicitprivate
Here is the call graph for this function:

Member Function Documentation

◆ ensureSetOptionsLoaded()

void CardDatabaseSettings::ensureSetOptionsLoaded ( ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSetOptions()

ICardSetPriorityController::SetOptions CardDatabaseSettings::getSetOptions ( QString shortName) const
overridevirtual

Returns the bundled priority options for a set in a single call.

Parameters
shortNameThe set's short name.
Returns
The sort key, enabled and known flags for the set.

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ getSortKey()

unsigned int CardDatabaseSettings::getSortKey ( QString shortName) const
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ isEnabled()

bool CardDatabaseSettings::isEnabled ( QString shortName) const
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ isKnown()

bool CardDatabaseSettings::isKnown ( QString shortName) const
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ saveSets()

void CardDatabaseSettings::saveSets ( const QVector< SetSaveData > & data)
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ setEnabled()

void CardDatabaseSettings::setEnabled ( QString shortName,
bool enabled )
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ setIsKnown()

void CardDatabaseSettings::setIsKnown ( QString shortName,
bool isknown )
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ setSortKey()

void CardDatabaseSettings::setSortKey ( QString shortName,
unsigned int sortKey )
overridevirtual

Implements ICardSetPriorityController.

Here is the call graph for this function:

◆ SettingsCache

friend class SettingsCache
friend

Member Data Documentation

◆ setOptionsCache

QHash<QString, SetOptions> CardDatabaseSettings::setOptionsCache
mutableprivate

◆ setOptionsLoaded

bool CardDatabaseSettings::setOptionsLoaded = false
mutableprivate

◆ setOptionsMutex

QMutex CardDatabaseSettings::setOptionsMutex
mutableprivate

The documentation for this class was generated from the following files: