aboutsummaryrefslogtreecommitdiffstats
path: root/include/ui/help
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-07-12 09:23:37 +0000
committerGitHub <[email protected]>2021-07-12 09:23:37 +0000
commit1ccc36606b9e4238ea24f36756c5ab3ad43453fe (patch)
tree72043033991b643a2cce437f22497a961d73a745 /include/ui/help
parentUpdate Documents; (diff)
parentProject structure adjustment; (diff)
downloadGpgFrontend-1ccc36606b9e4238ea24f36756c5ab3ad43453fe.tar.gz
GpgFrontend-1ccc36606b9e4238ea24f36756c5ab3ad43453fe.zip
Merge pull request #10 from saturneric/developv1.1.3
Develop Version 1.1.3
Diffstat (limited to '')
-rw-r--r--include/ui/help/AboutDialog.h (renamed from include/ui/AboutDialog.h)25
-rw-r--r--include/ui/help/VersionCheckThread.h32
2 files changed, 56 insertions, 1 deletions
diff --git a/include/ui/AboutDialog.h b/include/ui/help/AboutDialog.h
index b7d54544..74391b5a 100644
--- a/include/ui/AboutDialog.h
+++ b/include/ui/help/AboutDialog.h
@@ -52,6 +52,29 @@ public:
};
/**
+ * @brief Class containing the main tab of about dialog
+ *
+ */
+class UpdateTab : public QWidget {
+Q_OBJECT
+
+ QLabel *currentVersionLabel;
+
+ QLabel *latestVersionLabel;
+
+ QLabel *upgradeLabel;
+
+ QProgressBar *pb;
+
+ QString currentVersion;
+
+public:
+ explicit UpdateTab(QWidget *parent = nullptr);
+
+ void getLatestVersion();
+};
+
+/**
* @brief Class for handling the about dialog
*
*/
@@ -59,7 +82,7 @@ class AboutDialog : public QDialog {
Q_OBJECT
public:
- explicit AboutDialog(QWidget *parent = nullptr);
+ explicit AboutDialog(int defaultIndex, QWidget *parent);
};
#endif // __ABOUTDIALOG_H__
diff --git a/include/ui/help/VersionCheckThread.h b/include/ui/help/VersionCheckThread.h
new file mode 100644
index 00000000..10c9da87
--- /dev/null
+++ b/include/ui/help/VersionCheckThread.h
@@ -0,0 +1,32 @@
+//
+// Created by Administrator on 2021/7/12.
+//
+
+#ifndef GPGFRONTEND_VERSIONCHECKTHREAD_H
+#define GPGFRONTEND_VERSIONCHECKTHREAD_H
+
+#include "GpgFrontend.h"
+
+class VersionCheckThread : public QThread {
+Q_OBJECT
+
+public:
+
+ VersionCheckThread(QNetworkReply *networkReply);
+
+signals:
+
+ void upgradeVersion(const QString &currentVersion, const QString &latestVersion);
+
+protected:
+
+ void run() override;
+
+private:
+
+ QNetworkReply* mNetworkReply;
+
+};
+
+
+#endif //GPGFRONTEND_VERSIONCHECKTHREAD_H