mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
[DeckSync] Move SyncSummary into DeckSyncManager per review
This commit is contained in:
parent
1cac2ae7b2
commit
f597e9bd9f
2 changed files with 11 additions and 8 deletions
|
|
@ -44,6 +44,15 @@ public:
|
||||||
/** @brief Computes the color identity string uploaded alongside a deck. May be empty. */
|
/** @brief Computes the color identity string uploaded alongside a deck. May be empty. */
|
||||||
using ColorIdentityProvider = std::function<QString(const DeckList &)>;
|
using ColorIdentityProvider = std::function<QString(const DeckList &)>;
|
||||||
|
|
||||||
|
/** @brief Outcome counts for a finished sync run; mirrors syncFinished() parameters. */
|
||||||
|
struct SyncSummary
|
||||||
|
{
|
||||||
|
int uploaded = 0;
|
||||||
|
int downloaded = 0;
|
||||||
|
int unchanged = 0;
|
||||||
|
int skipped = 0;
|
||||||
|
};
|
||||||
|
|
||||||
explicit DeckSyncManager(QObject *parent = nullptr);
|
explicit DeckSyncManager(QObject *parent = nullptr);
|
||||||
|
|
||||||
void setClient(AbstractClient *_client);
|
void setClient(AbstractClient *_client);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include "../interface/widgets/server/remote/remote_decklist_tree_widget.h"
|
#include "../interface/widgets/server/remote/remote_decklist_tree_widget.h"
|
||||||
#include "tab.h"
|
#include "tab.h"
|
||||||
|
|
||||||
|
#include "../deck_sync/deck_sync_manager.h"
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
@ -29,7 +30,6 @@ class QLabel;
|
||||||
class CommandContainer;
|
class CommandContainer;
|
||||||
class Response;
|
class Response;
|
||||||
class ShareBarWidget;
|
class ShareBarWidget;
|
||||||
class DeckSyncManager;
|
|
||||||
class QAction;
|
class QAction;
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
class TabSupervisor;
|
class TabSupervisor;
|
||||||
|
|
@ -64,13 +64,7 @@ private:
|
||||||
Finished,
|
Finished,
|
||||||
Failed
|
Failed
|
||||||
};
|
};
|
||||||
struct SyncSummary
|
using SyncSummary = DeckSyncManager::SyncSummary;
|
||||||
{
|
|
||||||
int uploaded = 0;
|
|
||||||
int downloaded = 0;
|
|
||||||
int unchanged = 0;
|
|
||||||
int skipped = 0;
|
|
||||||
};
|
|
||||||
SyncStatusType syncStatusType = SyncStatusType::Idle;
|
SyncStatusType syncStatusType = SyncStatusType::Idle;
|
||||||
QString syncStatusDetail;
|
QString syncStatusDetail;
|
||||||
SyncSummary lastSyncSummary;
|
SyncSummary lastSyncSummary;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue