Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ICardSetPriorityController Class Referenceabstract

#include <interface_card_set_priority_controller.h>

Inheritance diagram for ICardSetPriorityController:
[legend]

Classes

struct  SetSaveData
struct  SetOptions
 Bundled per-set priority options, returned in a single call. More...

Public Member Functions

virtual ~ICardSetPriorityController ()=default
virtual void setSortKey (QString shortName, unsigned int sortKey)=0
virtual void setEnabled (QString shortName, bool enabled)=0
virtual void setIsKnown (QString shortName, bool isknown)=0
virtual unsigned int getSortKey (QString shortName) const =0
virtual bool isEnabled (QString shortName) const =0
virtual bool isKnown (QString shortName) const =0
virtual SetOptions getSetOptions (QString shortName) const =0
 Returns the bundled priority options for a set in a single call.
virtual QStringList getEnabledSetNames () const =0
 Returns the short names of every set currently marked as enabled.
virtual void saveSets (const QVector< SetSaveData > &data)=0
 Persists per-set options for every entry in a single settings flush.

Constructor & Destructor Documentation

◆ ~ICardSetPriorityController()

virtual ICardSetPriorityController::~ICardSetPriorityController ( )
virtualdefault

Member Function Documentation

◆ getEnabledSetNames()

virtual QStringList ICardSetPriorityController::getEnabledSetNames ( ) const
pure virtual

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.

Returns
The enabled set short names, sorted alphabetically.

Implemented in CardDatabaseSettings, and NoopCardSetPriorityController.

Here is the caller graph for this function:

◆ getSetOptions()

virtual SetOptions ICardSetPriorityController::getSetOptions ( QString shortName) const
pure virtual

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.

Implemented in CardDatabaseSettings, and NoopCardSetPriorityController.

Here is the caller graph for this function:

◆ getSortKey()

virtual unsigned int ICardSetPriorityController::getSortKey ( QString shortName) const
pure virtual

◆ isEnabled()

virtual bool ICardSetPriorityController::isEnabled ( QString shortName) const
pure virtual

◆ isKnown()

virtual bool ICardSetPriorityController::isKnown ( QString shortName) const
pure virtual

◆ saveSets()

virtual void ICardSetPriorityController::saveSets ( const QVector< SetSaveData > & data)
pure virtual

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.

Implemented in CardDatabaseSettings, and NoopCardSetPriorityController.

Here is the caller graph for this function:

◆ setEnabled()

virtual void ICardSetPriorityController::setEnabled ( QString shortName,
bool enabled )
pure virtual

Implemented in CardDatabaseSettings, and NoopCardSetPriorityController.

Here is the caller graph for this function:

◆ setIsKnown()

virtual void ICardSetPriorityController::setIsKnown ( QString shortName,
bool isknown )
pure virtual

Implemented in CardDatabaseSettings, and NoopCardSetPriorityController.

Here is the caller graph for this function:

◆ setSortKey()

virtual void ICardSetPriorityController::setSortKey ( QString shortName,
unsigned int sortKey )
pure virtual

Implemented in CardDatabaseSettings, and NoopCardSetPriorityController.

Here is the caller graph for this function:

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