GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
AboutDialog.h
1 
29 #ifndef __ABOUTDIALOG_H__
30 #define __ABOUTDIALOG_H__
31 
32 #include "core/GpgContext.h"
33 #include "ui/GpgFrontendUI.h"
34 #include "ui/dialog/GeneralDialog.h"
35 #include "ui/struct/SoftwareVersion.h"
36 
37 namespace GpgFrontend::UI {
38 
43 class InfoTab : public QWidget {
44  Q_OBJECT
45 
46  public:
52  explicit InfoTab(QWidget* parent = nullptr);
53 };
54 
59 class TranslatorsTab : public QWidget {
60  Q_OBJECT
61 
62  public:
68  explicit TranslatorsTab(QWidget* parent = nullptr);
69 };
70 
75 class UpdateTab : public QWidget {
76  Q_OBJECT
77 
78  QLabel* current_version_label_;
79  QLabel* latest_version_label_;
80  QLabel* upgrade_label_;
81  QProgressBar* pb_;
82  QString current_version_;
83  QPushButton* download_button_;
84 
85  public:
91  explicit UpdateTab(QWidget* parent = nullptr);
92 
97  void getLatestVersion();
98 
99  private slots:
105  void slot_show_version_status(const SoftwareVersion& version);
106 
107  signals:
113  void SignalReplyFromUpdateServer(QByteArray data);
114 };
115 
120 class AboutDialog : public GeneralDialog {
121  Q_OBJECT
122 
123  public:
130  explicit AboutDialog(int defaultIndex, QWidget* parent);
131 
132  protected:
138  void showEvent(QShowEvent* ev) override;
139 
140  private:
141  UpdateTab* update_tab_;
142 };
143 
144 } // namespace GpgFrontend::UI
145 
146 #endif // __ABOUTDIALOG_H__
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::UI::VersionCheckTask::SignalUpgradeVersion
void SignalUpgradeVersion(SoftwareVersion version)
GpgFrontend::UI::TranslatorsTab
Class containing the translator tab of about dialog.
Definition: AboutDialog.h:59
GpgFrontend::UI::UpdateTab::getLatestVersion
void getLatestVersion()
Get the Latest Version object.
Definition: AboutDialog.cpp:201
GpgFrontend::SingletonFunctionObject< GpgContext >::GetInstance
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::UI::SoftwareVersion
Definition: SoftwareVersion.h:39
GpgFrontend::UI::GeneralDialog
Definition: GeneralDialog.h:35
GpgFrontend::UI::InfoTab
Class containing the main tab of about dialog.
Definition: AboutDialog.h:43
GpgFrontend::GlobalSettingStation::GetResourceDir
std::filesystem::path GetResourceDir() const
Get the Resource Dir object.
Definition: GlobalSettingStation.h:125
GpgFrontend::UI::AboutDialog::AboutDialog
AboutDialog(int defaultIndex, QWidget *parent)
Construct a new About Dialog object.
Definition: AboutDialog.cpp:39
GpgFrontend::UI::SoftwareVersion::VersionWithDrawn
bool VersionWithDrawn() const
Definition: SoftwareVersion.h:76
GpgFrontend::UI::SoftwareVersion::CurrentVersionReleased
bool CurrentVersionReleased() const
Definition: SoftwareVersion.h:87
GpgFrontend::UI::AboutDialog::showEvent
void showEvent(QShowEvent *ev) override
Definition: AboutDialog.cpp:74
GpgFrontend::UI::TranslatorsTab::TranslatorsTab
TranslatorsTab(QWidget *parent=nullptr)
Construct a new Translators Tab object.
Definition: AboutDialog.cpp:117
GpgFrontend::UI::UpdateTab::UpdateTab
UpdateTab(QWidget *parent=nullptr)
Construct a new Update Tab object.
Definition: AboutDialog.cpp:149
GpgFrontend::UI::InfoTab::InfoTab
InfoTab(QWidget *parent=nullptr)
Construct a new Info Tab object.
Definition: AboutDialog.cpp:79
GpgFrontend::UI::UpdateTab::slot_show_version_status
void slot_show_version_status(const SoftwareVersion &version)
Definition: AboutDialog.cpp:216
GpgFrontend::UI::AboutDialog
Class for handling the about dialog.
Definition: AboutDialog.h:120
GpgFrontend::UI::SoftwareVersion::NeedUpgrade
bool NeedUpgrade() const
Definition: SoftwareVersion.h:65
GpgFrontend::UI::VersionCheckTask
Definition: VersionCheckTask.h:45
GpgFrontend::UI::UpdateTab
Class containing the main tab of about dialog.
Definition: AboutDialog.h:75
GpgFrontend::UI::GnupgTab
Definition: GnupgTab.h:39
GpgFrontend::UI::UpdateTab::SignalReplyFromUpdateServer
void SignalReplyFromUpdateServer(QByteArray data)