-
Notifications
You must be signed in to change notification settings - Fork 10
/
updater.h
55 lines (48 loc) · 1.33 KB
/
updater.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef UPDATER_H
#define UPDATER_H
#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QDomDocument>
#include <QMessageBox>
#include <log.h>
#include <QSettings>
#include <downloadupdatedialog.h>
//#include <dialog/changelogdialog.h>
#include <QStringList>
#include <QProgressDialog>
#include <QPushButton>
class Updater : public QObject
{
Q_OBJECT
public:
explicit Updater(QObject *parent = 0);
virtual ~Updater();
void loadSettings();
void checkForUpdates();
private:
QNetworkAccessManager *manager;
//bool notifyUpdates = true;
QString latestVersion;
int numPluginsUpdating;
QMessageBox updateMsgBox, pluginUpdateMsgBox;
//ChangelogDialog changelogDialog;
public:
const static int NoNotification = 1;
const static int ForceNotification = 2;
Q_SIGNALS:
void newVersionAvailable(QString versionNumber);
void versionNumberRecieved(QString versionNumber, bool outdated);
void pluginsUpdated();
void updateProgessRange(int, int);
void updateDialogsRejected();
public Q_SLOTS:
void showUpdateNotificationDialog();
void showNoUpdateNotificationDialog();
void rejectNotificationDialogs();
void showChangelog();
void progressUpdate(int);
void replyFinished(QNetworkReply* reply);
};
#endif // UPDATER_H