QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCVersionCheck.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QLoggingCategory>
4#include <QtCore/QObject>
5#include <QtCore/QString>
6
7Q_DECLARE_LOGGING_CATEGORY(QGCVersionCheckLog)
8
9
11class QGCVersionCheck : public QObject
12{
13 Q_OBJECT
14
15public:
16 explicit QGCVersionCheck(QObject* parent = nullptr);
17
18 static QGCVersionCheck* instance();
19
21 void start();
22
24 QString newStableVersion() const { return _newStableVersion; }
25
27 [[nodiscard]] static bool isNewerVersion(const QString& currentVersion, const QString& latestVersion);
28
30 [[nodiscard]] static bool shouldNotify(const QString& latestVersion, const QString& lastNotifiedVersion);
31
32signals:
34
35private:
36 void _downloadComplete(bool success, const QString& localFile, const QString& errorMsg);
37
38 QString _newStableVersion;
39};
QString newStableVersion() const
Newer stable version available for download, empty if none.
void newStableVersionChanged()