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

Model node representing a custom zone nested under a board zone. More...

#include <deck_list_model_custom_zones.h>

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

Public Member Functions

 InnerDecklistNode (QString _name=QString(), InnerDecklistNode *_parent=nullptr, int position=-1)
 Construct a new InnerDecklistNode.
 InnerDecklistNode (InnerDecklistNode *other, InnerDecklistNode *_parent=nullptr)
 Copy constructor with parent reassignment.
Public Member Functions inherited from InnerDecklistNode
 InnerDecklistNode (QString _name=QString(), InnerDecklistNode *_parent=nullptr, int position=-1)
 Construct a new InnerDecklistNode.
 InnerDecklistNode (InnerDecklistNode *other, InnerDecklistNode *_parent=nullptr)
 Copy constructor with parent reassignment.
 ~InnerDecklistNode () override
 Destructor. Recursively deletes all child nodes.
void setSortMethod (DeckSortMethod method) override
 Set the sorting method for this node and all children.
QString getName () const override
void setName (const QString &_name)
virtual QString getVisibleName () const
 Get this node’s display-friendly name.
QString getCardProviderId () const override
QString getCardSetShortName () const override
QString getCardCollectorNumber () const override
bool isDeckHeader () const override
void clearTree ()
 Delete all children of this node, recursively.
AbstractDecklistNode * findChild (const QString &_name)
 Find a direct child node by name.
AbstractDecklistNode * findCardChildByNameProviderIdAndNumber (const QString &_name, const QString &_providerId="", const QString &_cardNumber="")
 Find a child card node by name, provider ID, and collector number.
int height () const override
 Compute the height of this node.
int recursiveCount (bool countTotalCards=false) const
 Count cards recursively under this node.
bool compare (AbstractDecklistNode *other) const override
 Compare this node against another for sorting.
bool compareNumber (AbstractDecklistNode *other) const
 Compare this node against another for sorting.
bool compareName (AbstractDecklistNode *other) const
 Compare this node against another for sorting.
QVector< QPair< int, int > > sort (Qt::SortOrder order=Qt::AscendingOrder)
 Sort this node’s children recursively.
int readElement (QXmlStreamReader *xml, int limit)
 Deserialize this node and its children from XML.
void writeElement (QXmlStreamWriter *xml) override
 Serialize this node and its children 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.
InnerDecklistNode * getParent () const
void setParent (InnerDecklistNode *newParent)
int depth () const
 Compute the depth of this node in the tree.

Additional Inherited Members

Static Public Member Functions inherited from InnerDecklistNode
static QString visibleNameFromName (const QString &_name)
 Translate an internal name into a user-visible name.
static const QList< QString > & boardZoneNames ()
 The standard board zone names, in display order.
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.

Detailed Description

Model node representing a custom zone nested under a board zone.

Custom zones group cards by user-defined names (e.g. "Removal", "Utility") inside a board zone. They are mirrored from the underlying deck tree so that they can be told apart from criteria group nodes by type.

Member Function Documentation

◆ InnerDecklistNode() [1/2]

InnerDecklistNode::InnerDecklistNode ( InnerDecklistNode * other,
InnerDecklistNode * _parent = nullptr )
explicit

Copy constructor with parent reassignment.

Parameters
otherNode to copy from (deep copy of children).
_parentParent node for the copy.

◆ InnerDecklistNode() [2/2]

InnerDecklistNode::InnerDecklistNode ( QString _name = QString(),
InnerDecklistNode * _parent = nullptr,
int position = -1 )
inlineexplicit

Construct a new InnerDecklistNode.

Parameters
_nameInternal name (e.g., "main", "side", "tokens", or group label).
_parentParent node (may be nullptr for the root).
positionOptional index for insertion into parent. -1 = append.

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