mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
[Client+Server] Deck version history with restore
This commit is contained in:
parent
fa6c2d75d6
commit
cd94de6e4b
17 changed files with 436 additions and 0 deletions
|
|
@ -42,3 +42,14 @@ void DeckSyncSettings::setSyncIntervalMinutes(int _syncIntervalMinutes)
|
|||
setValue(_syncIntervalMinutes, "syncIntervalMinutes");
|
||||
emit syncIntervalMinutesChanged(_syncIntervalMinutes);
|
||||
}
|
||||
|
||||
int DeckSyncSettings::getHistoryLimit() const
|
||||
{
|
||||
return qBound(1, getValue("historyLimit", QString(), QString(), 20).toInt(), 100);
|
||||
}
|
||||
|
||||
void DeckSyncSettings::setHistoryLimit(int _historyLimit)
|
||||
{
|
||||
setValue(_historyLimit, "historyLimit");
|
||||
emit historyLimitChanged(_historyLimit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,11 +30,14 @@ public:
|
|||
void setAutoSync(bool _autoSync);
|
||||
[[nodiscard]] int getSyncIntervalMinutes() const;
|
||||
void setSyncIntervalMinutes(int _syncIntervalMinutes);
|
||||
[[nodiscard]] int getHistoryLimit() const;
|
||||
void setHistoryLimit(int _historyLimit);
|
||||
|
||||
signals:
|
||||
void conflictDefaultChanged(int conflictDefault);
|
||||
void autoSyncChanged(bool autoSync);
|
||||
void syncIntervalMinutesChanged(int syncIntervalMinutes);
|
||||
void historyLimitChanged(int historyLimit);
|
||||
|
||||
private:
|
||||
DeckSyncSettings(const DeckSyncSettings & /*other*/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue