mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -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
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
#include <QTimer>
|
||||
#include <QWizard>
|
||||
#include <utility>
|
||||
|
||||
|
|
@ -56,12 +57,20 @@ public:
|
|||
}
|
||||
bool saveTokensToFile(const QString &fileName);
|
||||
|
||||
void runInBackground()
|
||||
{
|
||||
backgroundMode = true;
|
||||
hide();
|
||||
currentPage()->initializePage();
|
||||
}
|
||||
|
||||
public:
|
||||
OracleImporter *importer;
|
||||
QSettings *settings;
|
||||
QNetworkAccessManager *nam;
|
||||
bool downloadedPlainXml = false;
|
||||
QByteArray xmlData;
|
||||
bool backgroundMode = false;
|
||||
|
||||
private slots:
|
||||
void updateLanguage();
|
||||
|
|
@ -92,6 +101,9 @@ private:
|
|||
|
||||
private slots:
|
||||
void languageBoxChanged(int index);
|
||||
|
||||
protected slots:
|
||||
void initializePage() override;
|
||||
};
|
||||
|
||||
class OutroPage : public OracleWizardPage
|
||||
|
|
@ -102,6 +114,9 @@ public:
|
|||
{
|
||||
}
|
||||
void retranslateUi() override;
|
||||
|
||||
protected:
|
||||
void initializePage() override;
|
||||
};
|
||||
|
||||
class LoadSetsPage : public OracleWizardPage
|
||||
|
|
@ -191,6 +206,7 @@ protected:
|
|||
QString getDefaultSavePath() override;
|
||||
QString getWindowTitle() override;
|
||||
QString getFileType() override;
|
||||
void initializePage() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue