mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Automatic Card Database Updates (#6004)
* Add the option to background the oracle wizard, add an option to automatically launch oracle wizard in background every X days since last launch. * Mocks and a typo. * Lint. * Lint? * qOverload the spinBox. * Change to a prompt instead. * An Label. * Update window_main.cpp --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
parent
76fdbfaa2f
commit
f3913949b2
16 changed files with 360 additions and 17 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "servers_settings.h"
|
||||
#include "shortcuts_settings.h"
|
||||
|
||||
#include <QDate>
|
||||
#include <QLoggingCategory>
|
||||
#include <QObject>
|
||||
#include <QSize>
|
||||
|
|
@ -198,6 +199,11 @@ private:
|
|||
bool tabVisualDeckStorageOpen, tabServerOpen, tabAccountOpen, tabDeckStorageOpen, tabReplaysOpen, tabAdminOpen,
|
||||
tabLogOpen;
|
||||
bool checkUpdatesOnStartup;
|
||||
bool startupCardUpdateCheckPromptForUpdate;
|
||||
bool startupCardUpdateCheckAlwaysUpdate;
|
||||
bool checkCardUpdatesOnStartup;
|
||||
int cardUpdateCheckInterval;
|
||||
QDate lastCardUpdateCheck;
|
||||
bool notifyAboutUpdates;
|
||||
bool notifyAboutNewVersion;
|
||||
bool showTipsOnStartup;
|
||||
|
|
@ -438,6 +444,27 @@ public:
|
|||
{
|
||||
return checkUpdatesOnStartup;
|
||||
}
|
||||
bool getStartupCardUpdateCheckPromptForUpdate()
|
||||
{
|
||||
return startupCardUpdateCheckPromptForUpdate;
|
||||
}
|
||||
bool getStartupCardUpdateCheckAlwaysUpdate()
|
||||
{
|
||||
return startupCardUpdateCheckAlwaysUpdate;
|
||||
}
|
||||
int getCardUpdateCheckInterval() const
|
||||
{
|
||||
return cardUpdateCheckInterval;
|
||||
}
|
||||
QDate getLastCardUpdateCheck() const
|
||||
{
|
||||
return lastCardUpdateCheck;
|
||||
}
|
||||
bool getCardUpdateCheckRequired() const
|
||||
{
|
||||
return getLastCardUpdateCheck().daysTo(QDateTime::currentDateTime().date()) >= getCardUpdateCheckInterval() &&
|
||||
getLastCardUpdateCheck() != QDateTime::currentDateTime().date();
|
||||
}
|
||||
bool getNotifyAboutUpdates() const
|
||||
{
|
||||
return notifyAboutUpdates;
|
||||
|
|
@ -1007,6 +1034,10 @@ public slots:
|
|||
void setDefaultStartingLifeTotal(const int _defaultStartingLifeTotal);
|
||||
void setRememberGameSettings(const bool _rememberGameSettings);
|
||||
void setCheckUpdatesOnStartup(QT_STATE_CHANGED_T value);
|
||||
void setStartupCardUpdateCheckPromptForUpdate(bool value);
|
||||
void setStartupCardUpdateCheckAlwaysUpdate(bool value);
|
||||
void setCardUpdateCheckInterval(int value);
|
||||
void setLastCardUpdateCheck(QDate value);
|
||||
void setNotifyAboutUpdate(QT_STATE_CHANGED_T _notifyaboutupdate);
|
||||
void setNotifyAboutNewVersion(QT_STATE_CHANGED_T _notifyaboutnewversion);
|
||||
void setUpdateReleaseChannelIndex(int value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue