-
Notifications
You must be signed in to change notification settings - Fork 4
/
controller_fu.h
62 lines (54 loc) · 1.25 KB
/
controller_fu.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
56
57
58
59
60
61
62
#ifndef CONTROLLER_FU_H
#define CONTROLLER_FU_H
#include <QObject>
class Gui_FU;
class Downloader_FU;
struct Content_FU;
/*!
* \brief The Controller_FU class
* Main controller for update check
*/
class Controller_FU : public QObject
{
Q_OBJECT
Gui_FU *_gui = nullptr;
Downloader_FU *_downloader = nullptr;
int _curVersion = 0;
QString _checkVersionUrl;
public:
/*!
* \param version
* Software numeric version
* \param checkVersionUrl
* URL to JSON protocol file of updater on server
* \param versionBeauty
* User-like version string
*/
explicit Controller_FU(int version, const QString &checkVersionUrl,
const QString &versionBeauty = QString(), QObject *parent = nullptr);
~Controller_FU(){}
/*!
* \brief exec
* Starts controller
*/
int exec();
private slots:
/*!
* \brief checkUpdate
* Checks update
*/
void checkUpdate();
/*!
* \brief contentAvailable
* If update is available this slot will use
* \param content
* Struct with update data
*/
void contentAvailable(Content_FU *content);
/*!
* \brief install
* Starts install
*/
void install();
};
#endif // CONTROLLER_FU_H