AboutDialog.h
#ifndef __ABOUTDIALOG_H__
#define __ABOUTDIALOG_H__
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
#include "ui/dialog/GeneralDialog.h"
#include "ui/struct/SoftwareVersion.h"
namespace GpgFrontend::UI {
class InfoTab : public QWidget {
Q_OBJECT
public:
explicit InfoTab(QWidget* parent = nullptr);
};
class TranslatorsTab : public QWidget {
Q_OBJECT
public:
explicit TranslatorsTab(QWidget* parent = nullptr);
};
class UpdateTab : public QWidget {
Q_OBJECT
QLabel* current_version_label_;
QLabel* latest_version_label_;
QLabel* upgrade_label_;
QProgressBar* pb_;
QString current_version_;
QPushButton* download_button_;
public:
explicit UpdateTab(QWidget* parent = nullptr);
void getLatestVersion();
private slots:
void slot_show_version_status(const SoftwareVersion& version);
signals:
void SignalReplyFromUpdateServer(QByteArray data);
};
class AboutDialog : public GeneralDialog {
Q_OBJECT
public:
explicit AboutDialog(int defaultIndex, QWidget* parent);
protected:
void showEvent(QShowEvent* ev) override;
private:
UpdateTab* update_tab_;
};
} // namespace GpgFrontend::UI
#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:198
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:38
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:71
GpgFrontend::UI::TranslatorsTab::TranslatorsTab
TranslatorsTab(QWidget *parent=nullptr)
Construct a new Translators Tab object.
Definition: AboutDialog.cpp:114
GpgFrontend::UI::UpdateTab::UpdateTab
UpdateTab(QWidget *parent=nullptr)
Construct a new Update Tab object.
Definition: AboutDialog.cpp:146
GpgFrontend::UI::InfoTab::InfoTab
InfoTab(QWidget *parent=nullptr)
Construct a new Info Tab object.
Definition: AboutDialog.cpp:76
GpgFrontend::UI::UpdateTab::slot_show_version_status
void slot_show_version_status(const SoftwareVersion &version)
Definition: AboutDialog.cpp:213
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::UpdateTab::SignalReplyFromUpdateServer
void SignalReplyFromUpdateServer(QByteArray data)