diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui/help/AboutDialog.h (renamed from include/ui/help/AboutDialog.h) | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/include/ui/help/AboutDialog.h b/src/ui/help/AboutDialog.h index dee2c018..4d43600e 100644 --- a/include/ui/help/AboutDialog.h +++ b/src/ui/help/AboutDialog.h @@ -1,7 +1,7 @@ /** - * This file is part of GPGFrontend. + * This file is part of GpgFrontend. * - * GPGFrontend is free software: you can redistribute it and/or modify + * GpgFrontend is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -25,19 +25,19 @@ #ifndef __ABOUTDIALOG_H__ #define __ABOUTDIALOG_H__ -#include <GpgFrontend.h> - #include "gpg/GpgContext.h" +#include "ui/GpgFrontendUI.h" +namespace GpgFrontend::UI { /** * @brief Class containing the main tab of about dialog * */ class InfoTab : public QWidget { -Q_OBJECT + Q_OBJECT -public: - explicit InfoTab(QWidget *parent = nullptr); + public: + explicit InfoTab(QWidget* parent = nullptr); }; /** @@ -45,10 +45,10 @@ public: * */ class TranslatorsTab : public QWidget { -Q_OBJECT + Q_OBJECT -public: - explicit TranslatorsTab(QWidget *parent = nullptr); + public: + explicit TranslatorsTab(QWidget* parent = nullptr); }; /** @@ -56,28 +56,30 @@ public: * */ class UpdateTab : public QWidget { -Q_OBJECT + Q_OBJECT + + QLabel* currentVersionLabel; - QLabel *currentVersionLabel; + QLabel* latestVersionLabel; - QLabel *latestVersionLabel; + QLabel* upgradeLabel; - QLabel *upgradeLabel; + QProgressBar* pb; - QProgressBar *pb; + QString currentVersion; - QString currentVersion; + QNetworkAccessManager* manager = new QNetworkAccessManager(this); -public: - explicit UpdateTab(QWidget *parent = nullptr); + public: + explicit UpdateTab(QWidget* parent = nullptr); - void getLatestVersion(); + void getLatestVersion(); -private slots: - void processReplyDataFromUpdateServer(const QByteArray& data);; + private slots: + void slotShowVersionStatus(const QString& current, const QString& server); -signals: - void replyFromUpdateServer(QByteArray data); + signals: + void replyFromUpdateServer(QByteArray data); }; /** @@ -85,18 +87,18 @@ signals: * */ class AboutDialog : public QDialog { -Q_OBJECT - -public: - explicit AboutDialog(int defaultIndex, QWidget *parent); + Q_OBJECT + public: + explicit AboutDialog(int defaultIndex, QWidget* parent); -protected: - void showEvent(QShowEvent *ev) override; + protected: + void showEvent(QShowEvent* ev) override; -private: - UpdateTab *updateTab; + private: + UpdateTab* updateTab; }; -#endif // __ABOUTDIALOG_H__ +} // namespace GpgFrontend::UI +#endif // __ABOUTDIALOG_H__ |