FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Loading...
Searching...
No Matches
updater.h
1/*
2This file is part of Fast Track.
3
4 FastTrack is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 FastTrack is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with FastTrack. If not, see <https://www.gnu.org/licenses/>.
16*/
17
18#ifndef UPDATER_H
19#define UPDATER_H
20
21#include <QAbstractButton>
22#include <QCoreApplication>
23#include <QDesktopServices>
24#include <QLabel>
25#include <QMainWindow>
26#include <QMessageBox>
27#include <QNetworkAccessManager>
28#include <QNetworkReply>
29#include <QNetworkRequest>
30#include <QProcess>
31#include <QPushButton>
32#include <QStatusBar>
33#include <QUrl>
34#include <QWidget>
35
36class Updater : public QWidget {
37 Q_OBJECT
38 public:
39 Updater(QWidget *parent = 0);
40 Updater(const Updater &T) = delete;
41 Updater &operator=(const Updater &T) = delete;
42 Updater &operator=(Updater &&T) = delete;
43 Updater(Updater &&T) = delete;
44 ~Updater();
50 };
51 void checkForUpdate();
52 updateStatus isUpdate() const;
53 void displayUpdate(const QByteArray &version, const QByteArray &message);
54 void displayWarning(const QByteArray &warning);
55
56 private:
57 updateStatus status;
58 QUrl remoteURL = QUrl(QStringLiteral("https://www.fasttrack.sh/download/FastTrack/platforms.txt"));
59 signals:
60 void hasUpdate(QByteArray version, QByteArray message);
61 void hasWarning(QByteArray warning);
62};
63
64#endif
updateStatus isUpdate() const
Gets update avaibility.
Definition updater.cpp:156
updateStatus
Definition updater.h:46
@ NoUpdate
Definition updater.h:47
@ NotSupported
Definition updater.h:48
@ HasUpdate
Definition updater.h:46
@ NoNetwork
Definition updater.h:49
void displayWarning(const QByteArray &warning)
Displays a warning box if warning messages are available on the remote server.
Definition updater.cpp:143
void checkForUpdate()
Check if updates are available on an remote server.
Definition updater.cpp:40
void displayUpdate(const QByteArray &version, const QByteArray &message)
Displays a message box to help the user to upgrade FastTrack.
Definition updater.cpp:115