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

#include <noop_card_set_priority_controller.h>

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

Public Member Functions

void setSortKey (QString, unsigned int) override
void setEnabled (QString, bool) override
void setIsKnown (QString, bool) override
unsigned int getSortKey (QString) const override
bool isEnabled (QString) const override
bool isKnown (QString) const override
SetOptions getSetOptions (QString) 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 > &) override
 Persists per-set options for every entry in a single settings flush.
Public Member Functions inherited from ICardSetPriorityController
virtual ~ICardSetPriorityController ()=default

Member Function Documentation

◆ getEnabledSetNames()

QStringList NoopCardSetPriorityController::getEnabledSetNames ( ) const
inlineoverridevirtual

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.

Implements ICardSetPriorityController.

◆ getSetOptions()

SetOptions NoopCardSetPriorityController::getSetOptions ( QString shortName) const
inlineoverridevirtual

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.

◆ getSortKey()

unsigned int NoopCardSetPriorityController::getSortKey ( QString ) const
inlineoverridevirtual

◆ isEnabled()

bool NoopCardSetPriorityController::isEnabled ( QString ) const
inlineoverridevirtual

◆ isKnown()

bool NoopCardSetPriorityController::isKnown ( QString ) const
inlineoverridevirtual

◆ saveSets()

void NoopCardSetPriorityController::saveSets ( const QVector< SetSaveData > & data)
inlineoverridevirtual

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.

◆ setEnabled()

void NoopCardSetPriorityController::setEnabled ( QString ,
bool  )
inlineoverridevirtual

◆ setIsKnown()

void NoopCardSetPriorityController::setIsKnown ( QString ,
bool  )
inlineoverridevirtual

◆ setSortKey()

void NoopCardSetPriorityController::setSortKey ( QString ,
unsigned int  )
inlineoverridevirtual

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