Represents metadata for a specific variation of a card within a set.
More...
#include <printing_info.h>
|
| CardSetPtr | set |
| | The set this variation belongs to.
|
| QVariantHash | properties |
| | Key-value store for variation-specific attributes.
|
Represents metadata for a specific variation of a card within a set.
A card can have multiple variations across sets. PrintingInfo associates a card with one such variation, and provides per-printing attributes such as identifiers or additional properties.
Equality is defined as both the set and the property values being equal.
◆ PrintingInfo()
| PrintingInfo::PrintingInfo |
( |
const CardSetPtr & | _set = nullptr | ) |
|
|
explicit |
Constructs a PrintingInfo associated with a specific set.
- Parameters
-
| _set | The set this printing belongs to (defaults to null). |
◆ ~PrintingInfo()
| PrintingInfo::~PrintingInfo |
( |
| ) |
|
|
default |
Destroys the PrintingInfo.
Defaulted since no special cleanup is required.
◆ getFlavorName()
| QString PrintingInfo::getFlavorName |
( |
| ) |
const |
|
nodiscard |
Returns the flavorName for this printing.
- Returns
- The flavorName, or empty if it isn't present.
◆ getProperties()
| QStringList PrintingInfo::getProperties |
( |
| ) |
const |
|
inlinenodiscard |
Returns the list of property names defined for this printing.
- Returns
- List of keys stored in the properties map.
◆ getProperty()
| QString PrintingInfo::getProperty |
( |
const QString & | propertyName | ) |
const |
|
inlinenodiscard |
Retrieves the value of a specific property.
- Parameters
-
| propertyName | The key name of the property to query. |
- Returns
- The property value as a string, or an empty string if not set.
◆ getSet()
Returns the set this printing belongs to.
- Returns
- Pointer to the associated CardSet.
◆ getUuid()
| QString PrintingInfo::getUuid |
( |
| ) |
const |
|
nodiscard |
Returns the providerID for this printing.
- Returns
- A string representing the providerID.
Gets the uuid property of the printing, or an empty string if the property isn't present
◆ operator==()
| bool PrintingInfo::operator== |
( |
const PrintingInfo & | other | ) |
const |
|
inline |
Equality operator.
Two PrintingInfo objects are equal if they refer to the same set and contain the exact same property key/value pairs.
- Parameters
-
- Returns
- True if both set and properties are equal, otherwise false.
◆ setProperty()
| void PrintingInfo::setProperty |
( |
const QString & | _name, |
|
|
const QString & | _value ) |
|
inline |
Sets or updates the value of a specific property.
If the property already exists, its value is replaced.
- Parameters
-
| _name | The name of the property. |
| _value | The string value to assign. |
◆ properties
| QVariantHash PrintingInfo::properties |
|
private |
Key-value store for variation-specific attributes.
◆ set
The set this variation belongs to.
The documentation for this class was generated from the following files: