Adapter node that wraps a DecklistCardNode for use in the DeckListModel tree. More...
#include <deck_list_model.h>
Public Member Functions | |
| DecklistModelCardNode (DecklistCardNode *_dataNode, InnerDecklistNode *_parent, int position=-1) | |
| Constructs a model node wrapping a DecklistCardNode. | |
| 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 &_cardProviderId) override |
| QString | getCardSetShortName () const override |
| void | setCardSetShortName (const QString &_cardSetShortName) override |
| QString | getCardCollectorNumber () const override |
| void | setCardCollectorNumber (const QString &_cardSetNumber) override |
| DecklistCardNode * | getDataNode () const |
| Returns the underlying data node. | |
| bool | isDeckHeader () const override |
| Whether this node is the "deck header" (deck metadata). | |
| 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 | |
| DecklistCardNode * | dataNode |
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. | |
Adapter node that wraps a DecklistCardNode for use in the DeckListModel tree.
This class forwards all property accessors (name, number, provider ID, set info, etc.) to the underlying DecklistCardNode. It exists so the model can represent cards in the same hierarchy as InnerDecklistNode containers.
|
inline |
Constructs a model node wrapping a DecklistCardNode.
| _dataNode | The underlying DecklistCardNode to wrap. |
| _parent | The parent InnerDecklistNode in the model tree. |
| position | Optional position to insert in parent (-1 appends at end). |
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscard |
Returns the underlying data node.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Implements AbstractDecklistCardNode.
|
inlinenodiscardoverridevirtual |
Whether this node is the "deck header" (deck metadata).
This distinguishes special nodes that represent deck-level information rather than cards or groupings.
Implements AbstractDecklistNode.
|
inlineoverridevirtual |
| _cardSetNumber | Set the collector number. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _cardProviderId | Set the provider identifier for this card. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _cardSetShortName | Set the abbreviated set code. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _name | Set the display name of this card. |
Implements AbstractDecklistCardNode.
|
inlineoverridevirtual |
| _number | Set the number of copies of this card. |
Implements AbstractDecklistCardNode.
|
private |
Pointer to the underlying data node.