2022-08-25 07:34:23 +04:00
|
|
|
/*
|
|
|
|
* updatedialog_moc.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
2022-08-25 03:14:12 +04:00
|
|
|
#include <QDialog>
|
2022-08-26 03:07:07 +04:00
|
|
|
#include <QNetworkAccessManager>
|
2022-08-25 03:14:12 +04:00
|
|
|
|
2022-08-25 05:09:20 +04:00
|
|
|
class JsonNode;
|
|
|
|
|
2022-08-25 03:14:12 +04:00
|
|
|
namespace Ui {
|
|
|
|
class UpdateDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class UpdateDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-08-26 03:11:35 +04:00
|
|
|
explicit UpdateDialog(bool calledManually, QWidget *parent = nullptr);
|
2022-08-25 03:14:12 +04:00
|
|
|
~UpdateDialog();
|
|
|
|
|
2022-08-25 06:45:31 +04:00
|
|
|
static void showUpdateDialog(bool isManually);
|
2022-08-25 03:14:12 +04:00
|
|
|
|
2022-08-25 03:43:58 +04:00
|
|
|
private slots:
|
|
|
|
void on_checkOnStartup_stateChanged(int state);
|
|
|
|
|
2022-08-25 03:14:12 +04:00
|
|
|
private:
|
|
|
|
Ui::UpdateDialog *ui;
|
2022-08-25 05:09:20 +04:00
|
|
|
|
2022-08-25 05:34:36 +04:00
|
|
|
std::string currentVersion;
|
2022-08-25 05:09:20 +04:00
|
|
|
std::string platformParameter = "other";
|
|
|
|
|
2022-08-26 03:07:07 +04:00
|
|
|
QNetworkAccessManager networkManager;
|
|
|
|
|
2022-08-25 06:45:31 +04:00
|
|
|
bool calledManually;
|
|
|
|
|
2022-08-25 05:09:20 +04:00
|
|
|
void loadFromJson(const JsonNode & node);
|
2022-08-25 03:14:12 +04:00
|
|
|
};
|