Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
deck_list_model_custom_zones.h
Go to the documentation of this file.
1#ifndef DECK_LIST_MODEL_CUSTOM_ZONES_H
2#define DECK_LIST_MODEL_CUSTOM_ZONES_H
3
5#include <QList>
6#include <QPair>
7#include <QString>
8#include <qnamespace.h>
9
11
26
42{
43
47[[nodiscard]] bool isCustomZone(const AbstractDecklistNode *node);
48
62[[nodiscard]] InnerDecklistNode *findGroupChild(InnerDecklistNode *parent, const QString &name);
63
73void mirrorCustomZones(const InnerDecklistNode *deckBoardZone, InnerDecklistNode *shadowBoardZone);
74
81[[nodiscard]] DecklistModelSubZoneNode *findSubZoneByName(InnerDecklistNode *root, const QString &zoneName);
82
96[[nodiscard]] QList<QPair<int, int>>
97sortWithCustomZonesLast(InnerDecklistNode *root, InnerDecklistNode *node, Qt::SortOrder order);
98
99} // namespace DeckListModelCustomZones
100
101#endif // DECK_LIST_MODEL_CUSTOM_ZONES_H
Base class for all nodes in the deck list tree.
Definition abstract_deck_list_node.h:75
Model node representing a custom zone nested under a board zone.
Definition deck_list_model_custom_zones.h:22
InnerDecklistNode(QString _name=QString(), InnerDecklistNode *_parent=nullptr, int position=-1)
Construct a new InnerDecklistNode.
Definition inner_deck_list_node.h:84
Represents a container node in the deck list hierarchy (zones and groupings).
Definition inner_deck_list_node.h:73
InnerDecklistNode(QString _name=QString(), InnerDecklistNode *_parent=nullptr, int position=-1)
Construct a new InnerDecklistNode.
Definition inner_deck_list_node.h:84
Definition remote_connection_controller.h:20
Defines the InnerDecklistNode class, which represents structural nodes (zones and groups) in the deck...
Tree-level helpers for the deck list model's custom-zone shadow nodes.
Definition deck_list_model_custom_zones.cpp:14
QList< QPair< int, int > > sortWithCustomZonesLast(InnerDecklistNode *root, InnerDecklistNode *node, Qt::SortOrder order)
Sorts a shadow node's children, keeping a board's custom zones last.
Definition deck_list_model_custom_zones.cpp:150
void mirrorCustomZones(const InnerDecklistNode *deckBoardZone, InnerDecklistNode *shadowBoardZone)
Mirrors the custom zones of a deck board zone into its shadow board node.
Definition deck_list_model_custom_zones.cpp:44
InnerDecklistNode * findGroupChild(InnerDecklistNode *parent, const QString &name)
Finds a criteria-group child of parent by name, skipping custom zones.
Definition deck_list_model_custom_zones.cpp:57
bool isCustomZone(const AbstractDecklistNode *node)
Whether the given node is a custom zone (as opposed to a criteria group).
Definition deck_list_model_custom_zones.cpp:16
DecklistModelSubZoneNode * findSubZoneByName(InnerDecklistNode *root, const QString &zoneName)
Finds a custom zone in the shadow tree by deck-unique name.
Definition deck_list_model_custom_zones.cpp:72