mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Add the option to background the oracle wizard, add an option to automatically launch oracle wizard in background every X days since last launch.
This commit is contained in:
parent
208f8349a6
commit
deb60b1bc2
11 changed files with 190 additions and 20 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,8 @@ public:
|
|||
{
|
||||
}
|
||||
void retranslateUi() override;
|
||||
protected:
|
||||
void initializePage() override;
|
||||
};
|
||||
|
||||
class LoadSetsPage : public OracleWizardPage
|
||||
|
|
@ -167,7 +181,7 @@ class LoadSpoilersPage : public SimpleDownloadFilePage
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LoadSpoilersPage(QWidget * = nullptr){};
|
||||
explicit LoadSpoilersPage(QWidget * = nullptr) {};
|
||||
void retranslateUi() override;
|
||||
|
||||
protected:
|
||||
|
|
@ -182,7 +196,7 @@ class LoadTokensPage : public SimpleDownloadFilePage
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LoadTokensPage(QWidget * = nullptr){};
|
||||
explicit LoadTokensPage(QWidget * = nullptr) {};
|
||||
void retranslateUi() override;
|
||||
|
||||
protected:
|
||||
|
|
@ -191,6 +205,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