A collection of cards grouped under a common identifier. More...
#include <card_set.h>
Public Types | |
| enum | Priority { PriorityFallback = 0 , PriorityPrimary = 10 , PrioritySecondary = 20 , PriorityReprint = 30 , PriorityOther = 40 , PriorityLowest = 100 } |
| Defines relative ordering and importance of sets. More... | |
Public Member Functions | |
| CardSet (ICardSetPriorityController *priorityController, const QString &_shortName=QString(), const QString &_longName=QString(), const QString &_setType=QString(), const QDate &_releaseDate=QDate(), const Priority _priority=PriorityFallback) | |
| Constructs a CardSet. | |
| QString | getCorrectedShortName () const |
| Returns a safe, sanitized version of the short name. | |
| QString | getShortName () const |
| QString | getLongName () const |
| QString | getSetType () const |
| QDate | getReleaseDate () const |
| Priority | getPriority () const |
| void | setLongName (const QString &_longName) |
| Sets the full name of the set. | |
| void | setSetType (const QString &_setType) |
| Sets the category/type of the set. | |
| void | setReleaseDate (const QDate &_releaseDate) |
| Sets the release date of the set. | |
| void | setPriority (const Priority _priority) |
| Updates the priority of the set. | |
| void | loadSetOptions () |
| Loads state values (enabled, known, sort key) from configuration. | |
| int | getSortKey () const |
| void | setSortKey (unsigned int _sortKey) |
| Assigns a new sort key to this set. | |
| bool | getEnabled () const |
| void | setEnabled (bool _enabled) |
| Enables or disables the set. | |
| bool | getIsKnown () const |
| void | setIsKnown (bool _isknown) |
| Marks the set as known or unknown. | |
| bool | getIsKnownIgnored () const |
| Determines whether the set has incomplete metadata and should be ignored. | |
Static Public Member Functions | |
| static CardSetPtr | newInstance (ICardSetPriorityController *priorityController, const QString &_shortName=QString(), const QString &_longName=QString(), const QString &_setType=QString(), const QDate &_releaseDate=QDate(), const Priority _priority=PriorityFallback) |
| Creates and returns a new shared CardSet instance. | |
Static Public Attributes | |
| static const char * | TOKENS_SETNAME = "TK" |
| Reserved identifier for token-like sets. | |
Private Attributes | |
| ICardSetPriorityController * | priorityController |
| Interface to the card set priority controller. | |
| QString | shortName |
| Short identifier for the set. | |
| QString | longName |
| Full name for the set. | |
| unsigned int | sortKey |
| Custom numeric sort key. | |
| QDate | releaseDate |
| Release date, may be empty if unknown. | |
| QString | setType |
| Type/category label for the set. | |
| Priority | priority |
| Priority level for sorting and relevance. | |
| bool | enabled |
| Whether the set is active/enabled. | |
| bool | isknown |
| Whether the set is considered known. | |
A collection of cards grouped under a common identifier.
A set serves both as metadata (identifier, title, category, release date, and priority) and as a container of all cards that belong to it. Each set can be enabled/disabled and marked as known/unknown depending on context.
The class inherits from QList<CardInfoPtr>, so it can be iterated over directly to access its contents.
Typical usage:
| enum CardSet::Priority |
Defines relative ordering and importance of sets.
|
explicit |
Constructs a CardSet.
| priorityController | Interface to a card set priority controller. |
| _shortName | Identifier string. |
| _longName | Full descriptive name. |
| _setType | Type/category string. |
| _releaseDate | Release date (optional). |
| _priority | Sorting/priority level. |
|
nodiscard |
Returns a safe, sanitized version of the short name.
Intended for file paths or identifiers where only certain characters are allowed.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
Determines whether the set has incomplete metadata and should be ignored.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
| void CardSet::loadSetOptions | ( | ) |
Loads state values (enabled, known, sort key) from configuration.
Reads external configuration and applies it to this set.
|
static |
Creates and returns a new shared CardSet instance.
| priorityController | Interface to a card set priority controller. |
| _shortName | Identifier string. |
| _longName | Full descriptive name. |
| _setType | Type/category string. |
| _releaseDate | Release date (optional). |
| _priority | Sorting/priority level. |
| void CardSet::setEnabled | ( | bool | _enabled | ) |
Enables or disables the set.
| _enabled | True to enable, false to disable. |
| void CardSet::setIsKnown | ( | bool | _isknown | ) |
Marks the set as known or unknown.
| _isknown | True if known, false if unknown. |
|
inline |
Sets the full name of the set.
| _longName | New full name. |
|
inline |
Updates the priority of the set.
| _priority | New priority value. |
|
inline |
Sets the release date of the set.
| _releaseDate | New release date. |
|
inline |
Sets the category/type of the set.
| _setType | New category string. |
| void CardSet::setSortKey | ( | unsigned int | _sortKey | ) |
Assigns a new sort key to this set.
| _sortKey | The numeric key to use for sorting. |
|
private |
Whether the set is active/enabled.
|
private |
Whether the set is considered known.
|
private |
Full name for the set.
|
private |
Interface to the card set priority controller.
|
private |
Release date, may be empty if unknown.
|
private |
Type/category label for the set.
|
private |
Short identifier for the set.
|
private |
Custom numeric sort key.
|
static |
Reserved identifier for token-like sets.