![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include "deck_list.h"#include "deck_list_memento.h"#include "deck_list_plain_text_parser.h"#include "libcockatrice/deck_list/deck_list_node_tree.h"#include "libcockatrice/deck_list/sideboard_plan.h"#include "libcockatrice/utility/playmat_params.h"#include "tree/deck_list_card_node.h"#include "tree/inner_deck_list_node.h"#include <QAnyStringView>#include <QDebug>#include <QSet>#include <QSharedPointer>#include <QStringView>#include <QTextStream>#include <QXmlStreamAttributes>#include <QXmlStreamReader>#include <QXmlStreamWriter>#include <QtGlobal>#include <algorithm>#include <iterator>#include <libcockatrice/utility/card_ref.h>#include <qlogging.h>Functions | |
| static double | parseClampedParam (const QString &valueString, double fallback, double min, double max) |
| Parses a floating point XML attribute into a clamped playmat parameter. | |
| static CardRef | readBannerCard (QXmlStreamReader *xml) |
| Reads a bannerCard element from the XML stream. | |
| static PlaymatInfo | readPlaymatCard (QXmlStreamReader *xml) |
| Reads a playmatCard element from the XML stream. | |
Variables | |
| static const QString | CURRENT_SIDEBOARD_PLAN_KEY = "" |
|
static |
Parses a floating point XML attribute into a clamped playmat parameter.
Falls back to fallback when the attribute is missing or malformed, so malformed deck files cannot produce degenerate art rectangles (e.g. a zoom of 0 dividing by zero).
| valueString | Raw attribute text. |
| fallback | Value used when the text cannot be parsed. |
| min | Lower clamp bound. |
| max | Upper clamp bound. |
fallback.
|
static |
Reads a bannerCard element from the XML stream.
| xml | Reader positioned at the element. |
|
static |
Reads a playmatCard element from the XML stream.
Attribute values are read before readElementText consumes the element, and the params are clamped to the same ranges as the settings dialog and the remote player-properties path so malformed deck files cannot produce degenerate art rectangles (e.g. a zoom of 0 dividing by zero).
| xml | Reader positioned at the element. |
|
static |