Cockatrice 2026-10-19-Development-3.1.2-beta.2
A 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 <QString>
6#include <libcockatrice/protocol/pb/move_card_to_zone.pb.h>
7
8class QXmlStreamWriter;
9class QXmlStreamReader;
10
29{
30private:
31 QString name;
33
34public:
40 explicit SideboardPlan(const QString &_name = "", const QList<MoveCard_ToZone> &_moveList = {});
41
47 bool readElement(QXmlStreamReader *xml);
48
53 void write(QXmlStreamWriter *xml) const;
54
56 [[nodiscard]] QString getName() const
57 {
58 return name;
59 }
60
62 [[nodiscard]] const QList<MoveCard_ToZone> &getMoveList() const
63 {
64 return moveList;
65 }
66
68 void setMoveList(const QList<MoveCard_ToZone> &_moveList);
69};
70
71#endif // COCKATRICE_SIDEBOARD_PLAN_H
Definition remote_connection_controller.h:20
const QList< MoveCard_ToZone > & getMoveList() const
Definition sideboard_plan.h:62
QString name
Human-readable name of this plan.
Definition sideboard_plan.h:31
QList< MoveCard_ToZone > moveList
List of move instructions for this plan.
Definition sideboard_plan.h:32
void setMoveList(const QList< MoveCard_ToZone > &_moveList)
Replace the move list with a new one.
Definition sideboard_plan.cpp:42
void write(QXmlStreamWriter *xml) const
Write this SideboardPlan to XML.
Definition sideboard_plan.cpp:65
SideboardPlan(const QString &_name="", const QList< MoveCard_ToZone > &_moveList={})
Construct a new SideboardPlan.
Definition sideboard_plan.cpp:37
bool readElement(QXmlStreamReader *xml)
Read a SideboardPlan from an XML stream.
Definition sideboard_plan.cpp:47
QString getName() const
Definition sideboard_plan.h:56