Add loadFromFileAsync to deckLoader and connect VisualDeckStorageWidget to it. (#5456)

* Add loadFromFileAsync to deckLoader and connect VisualDeckStorageWidget to it.

* Address comments.

* Lint.

* Unlint something.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-01-14 04:02:33 +01:00 committed by GitHub
parent 6072df3522
commit 497e4f1be0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 77 additions and 15 deletions

View file

@ -3,11 +3,16 @@
#include "decklist.h"
class DeckLoader : public DeckList
#include <QLoggingCategory>
inline Q_LOGGING_CATEGORY(DeckLoaderLog, "deck_loader")
class DeckLoader : public DeckList
{
Q_OBJECT
signals:
void deckLoaded();
void loadFinished(bool success);
public:
enum FileFormat
@ -43,6 +48,7 @@ public:
static FileFormat getFormatFromName(const QString &fileName);
bool loadFromFile(const QString &fileName, FileFormat fmt, bool userRequest = false);
bool loadFromFileAsync(const QString &fileName, FileFormat fmt, bool userRequest);
bool loadFromRemote(const QString &nativeString, int remoteDeckId);
bool saveToFile(const QString &fileName, FileFormat fmt);
bool updateLastLoadedTimestamp(const QString &fileName, FileFormat fmt);