Cockatrice 2026-01-14-Development-2.11.0-beta.46
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
sideboard_plan.h
Go to the documentation of this file.
1#ifndef COCKATRICE_SIDEBOARD_PLAN_H
2#define COCKATRICE_SIDEBOARD_PLAN_H
3
4#include <QList>
5#include <libcockatrice/protocol/pb/move_card_to_zone.pb.h>
6
7class QXmlStreamWriter;
8class QXmlStreamReader;
9
28{
29private:
30 QString name;
31 QList<MoveCard_ToZone> moveList;
32
33public:
39 explicit SideboardPlan(const QString &_name = "", const QList<MoveCard_ToZone> &_moveList = {});
40
46 bool readElement(QXmlStreamReader *xml);
47
52 void write(QXmlStreamWriter *xml) const;
53
55 [[nodiscard]] QString getName() const
56 {
57 return name;
58 }
59
61 [[nodiscard]] const QList<MoveCard_ToZone> &getMoveList() const
62 {
63 return moveList;
64 }
65
67 void setMoveList(const QList<MoveCard_ToZone> &_moveList);
68};
69
70#endif // COCKATRICE_SIDEBOARD_PLAN_H
const QList< MoveCard_ToZone > & getMoveList() const
Definition sideboard_plan.h:61
QString name
Human-readable name of this plan.
Definition sideboard_plan.h:30
QList< MoveCard_ToZone > moveList
List of move instructions for this plan.
Definition sideboard_plan.h:31
void setMoveList(const QList< MoveCard_ToZone > &_moveList)
Replace the move list with a new one.
Definition sideboard_plan.cpp:10
void write(QXmlStreamWriter *xml) const
Write this SideboardPlan to XML.
Definition sideboard_plan.cpp:47
SideboardPlan(const QString &_name="", const QList< MoveCard_ToZone > &_moveList={})
Construct a new SideboardPlan.
Definition sideboard_plan.cpp:5
bool readElement(QXmlStreamReader *xml)
Read a SideboardPlan from an XML stream.
Definition sideboard_plan.cpp:15
QString getName() const
Definition sideboard_plan.h:55