Concrete node type representing an actual card entry in the deck. More...
#include <deck_list_card_node.h>
Public Member Functions | |
| DecklistCardNode (QString _name=QString(), int _number=1, InnerDecklistNode *_parent=nullptr, int position=-1, QString _cardSetShortName=QString(), QString _cardSetNumber=QString(), QString _cardProviderId=QString()) | |
| Construct a new DecklistCardNode. | |
| DecklistCardNode (DecklistCardNode *other, InnerDecklistNode *_parent) | |
| Copy constructor with new parent assignment. | |
| int | getNumber () const override |
| void | setNumber (int _number) override |
| QString | getName () const override |
| void | setName (const QString &_name) override |
| QString | getCardProviderId () const override |
| void | setCardProviderId (const QString &_providerId) override |
| QString | getCardSetShortName () const override |
| void | setCardSetShortName (const QString &_cardSetShortName) override |
| QString | getCardCollectorNumber () const override |
| void | setCardCollectorNumber (const QString &_cardSetNumber) override |
| bool | isDeckHeader () const override |
| CardRef | toCardRef () const |
| Convert this node to a CardRef. | |
| Public Member Functions inherited from AbstractDecklistCardNode | |
| AbstractDecklistCardNode (InnerDecklistNode *_parent=nullptr, int position=-1) | |
| Construct a new AbstractDecklistCardNode. | |
| int | height () const override |
| Get the height of this node in the tree. | |
| bool | compare (AbstractDecklistNode *other) const override |
| Compare this card node against another for sorting. | |
| bool | compareNumber (AbstractDecklistNode *other) const |
| Compare this card node to another by quantity. | |
| bool | compareName (AbstractDecklistNode *other) const |
| Compare this card node to another by name. | |
| bool | readElement (QXmlStreamReader *xml) override |
| Deserialize this node’s properties from XML. | |
| void | writeElement (QXmlStreamWriter *xml) override |
| Serialize this node’s properties to XML. | |
| Public Member Functions inherited from AbstractDecklistNode | |
| AbstractDecklistNode (InnerDecklistNode *_parent=nullptr, int position=-1) | |
| Construct a new AbstractDecklistNode and insert it into its parent. | |
| virtual | ~AbstractDecklistNode ()=default |
| Virtual destructor. Child classes must clean up their resources. | |
| virtual void | setSortMethod (DeckSortMethod method) |
| Set the sort method for this node’s children. | |
| InnerDecklistNode * | getParent () const |
| int | depth () const |
| Compute the depth of this node in the tree. | |
Private Attributes | |
| QString | name |
| Display name of the card. | |
| int | number |
| Quantity of this card in the deck. | |
| QString | cardSetShortName |
| Short set code (e.g., "NEO"). | |
| QString | cardSetNumber |
| Collector number within the set. | |
| QString | cardProviderId |
| External provider identifier (e.g., UUID). | |
Additional Inherited Members | |
| Protected Attributes inherited from AbstractDecklistNode | |
| InnerDecklistNode * | parent |
| Pointer to the parent node, or nullptr if this is the root. | |
| DeckSortMethod | sortMethod |
| Current sorting strategy for this node's children. | |
Concrete node type representing an actual card entry in the deck.
This class extends AbstractDecklistCardNode to hold all information needed to uniquely identify a card printing within the deck.
name: Card’s display name.number: Quantity of this card in the deck.cardSetShortName: Abbreviation of the set (e.g., "NEO" for Neon Dynasty).cardSetNumber: Collector number within the set.cardProviderId: External provider identifier (e.g., UUID or MTGJSON ID).CardRef for database lookups or cross-references.
|
inlineexplicit |
Construct a new DecklistCardNode.
| _name | Display name of the card. |
| _number | Quantity of this card (default = 1). |
| _parent | Parent node in the tree (zone or group). May be nullptr. |
| position | Index to insert into parent’s children. -1 = append. |
| _cardSetShortName | Short set code (e.g., "NEO"). |
| _cardSetNumber | Collector number within the set. |
| _cardProviderId | External provider ID (e.g., UUID). |
On construction, if a parent is provided, this node is inserted into the parent’s children list automatically.
|
explicit |
Copy constructor with new parent assignment.
| other | Existing DecklistCardNode to copy. |
| _parent | Parent node for the copy. |
Creates a deep copy of the card node’s properties, but attaches the new instance to a different parent in the tree.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistNode.
|
inlineoverridevirtual |
| _cardSetNumber | Set the collector number. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _providerId | Set the provider identifier for this card. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _cardSetShortName | Set the short set code. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _name | Set the display name of this card. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _number | Set the quantity of this card. |
Implements AbstractDecklistCardNode.
|
inlinenodiscard |
|
private |
External provider identifier (e.g., UUID).
|
private |
Collector number within the set.
|
private |
Short set code (e.g., "NEO").
|
private |
Display name of the card.
|
private |
Quantity of this card in the deck.