216e1a9f71
Commit the original Caesium 1.7.0 codebase with some adjustment. You can also get the original source at: https://sourceforge.net/projects/caesium/files/1.7.0/ Since the file names listed in the Qt resource file have encoding issue which can cause compile failure, these files get removed. Adjustments: + .gitignore M icons.qrc - *.pro.user(.*) - icons/language/*.png
42 lines
847 B
C++
42 lines
847 B
C++
#ifndef UPDATER_H
|
|
#define UPDATER_H
|
|
|
|
#include <QtWidgets/QDialog>
|
|
#include <QtWidgets/QMessageBox>
|
|
#include <QCloseEvent>
|
|
#include <QFile>
|
|
#include <QTimer>
|
|
#include <QtNetwork>
|
|
|
|
namespace Ui {
|
|
class Updater;
|
|
}
|
|
|
|
class Updater : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Updater(QWidget *parent = 0);
|
|
~Updater();
|
|
|
|
private:
|
|
Ui::Updater *ui;
|
|
QFile file;
|
|
QWidget *u_parent;
|
|
|
|
private slots:
|
|
void on_closeButton_clicked();
|
|
void on_startButton_clicked();
|
|
void initGetCurrentVersion();
|
|
void getCurrentVersion(QNetworkReply*);
|
|
void getUrl(QNetworkReply*);
|
|
void initDownload(QString);
|
|
void updateProgressBar(qint64, qint64);
|
|
void closeEvent(QCloseEvent *event);
|
|
void getChangelog();
|
|
void getChangelogHTML(QNetworkReply*);
|
|
};
|
|
|
|
#endif // UPDATER_H
|