12#include <QLoggingCategory>
58 bool loadFromRemote(
const QString &nativeString,
int remoteDeckId);
64 static void saveToClipboard(
const DeckList &deckList,
bool addComments =
true,
bool addSetNameAndNumber =
true);
67 bool addComments =
true,
68 bool addSetNameAndNumber =
true);
98 bool addComments =
true,
99 bool addSetNameAndNumber =
true);
102 QList<DecklistCardNode *> cards,
103 bool addComments =
true,
104 bool addSetNameAndNumber =
true);
Represents a complete deck, including metadata, zones, cards, and sideboard plans.
Definition deck_list.h:63
static void printDeckList(QPrinter *printer, const DeckList &deckList)
Prints the decklist to the provided QPrinter.
Definition deck_loader.cpp:546
bool hasNotBeenLoaded() const
Definition deck_loader.h:51
const LoadedDeck & getDeck() const
Definition deck_loader.h:83
static void saveToStream_DeckHeader(QTextStream &out, const DeckList &deckList)
Definition deck_loader.cpp:342
bool loadFromFile(const QString &fileName, DeckFileFormat::Format fmt, bool userRequest=false)
Definition deck_loader.cpp:32
static const QStringList ACCEPTED_FILE_EXTENSIONS
Definition deck_loader.h:23
void setDeck(const LoadedDeck &deck)
Definition deck_loader.h:87
DeckLoader(QObject *parent)
Definition deck_loader.cpp:28
void loadFinished(bool success)
bool loadFromRemote(const QString &nativeString, int remoteDeckId)
Definition deck_loader.cpp:128
static void printDeckListNode(QTextCursor *cursor, const InnerDecklistNode *node)
Definition deck_loader.cpp:486
static void saveToStream_DeckZone(QTextStream &out, const InnerDecklistNode *zoneNode, bool addComments=true, bool addSetNameAndNumber=true)
Definition deck_loader.cpp:357
bool loadFromFileAsync(const QString &fileName, DeckFileFormat::Format fmt, bool userRequest)
Definition deck_loader.cpp:78
LoadedDeck & getDeck()
Definition deck_loader.h:79
static QString exportDeckToDecklist(const DeckList &deckList, DecklistWebsite website)
Definition deck_loader.cpp:290
DeckLoader & operator=(const DeckLoader &)=delete
bool convertToCockatriceFormat(const QString &fileName)
Definition deck_loader.cpp:437
bool updateLastLoadedTimestamp(const QString &fileName, DeckFileFormat::Format fmt)
Definition deck_loader.cpp:173
static void saveToClipboard(const DeckList &deckList, bool addComments=true, bool addSetNameAndNumber=true)
Definition deck_loader.cpp:313
DeckLoader(const DeckLoader &)=delete
bool saveToFile(const QString &fileName, DeckFileFormat::Format fmt)
Definition deck_loader.cpp:141
LoadedDeck loadedDeck
Definition deck_loader.h:44
DecklistWebsite
Definition deck_loader.h:38
@ DecklistOrg
Definition deck_loader.h:39
@ DecklistXyz
Definition deck_loader.h:40
static void saveToStream_DeckZoneCards(QTextStream &out, const InnerDecklistNode *zoneNode, QList< DecklistCardNode * > cards, bool addComments=true, bool addSetNameAndNumber=true)
Definition deck_loader.cpp:404
static const QStringList FILE_NAME_FILTERS
Definition deck_loader.h:25
static bool saveToStream_Plain(QTextStream &out, const DeckList &deckList, bool addComments=true, bool addSetNameAndNumber=true)
Definition deck_loader.cpp:322
Represents a container node in the deck list hierarchy (zones and groupings).
Definition inner_deck_list_node.h:62
Defines the DeckList class, which manages a full deck structure including cards, zones,...
Q_LOGGING_CATEGORY(DeckLoaderLog, "deck_loader")
Represents a deck that was loaded from somewhere. Contains the DeckList itself, as well as info about...
Definition loaded_deck.h:14