diff options
author | Saturn&Eric <[email protected]> | 2022-07-23 14:54:51 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-07-23 14:54:51 +0000 |
commit | b244320b2d228189767aa6d59febceb6b64527fb (patch) | |
tree | 179d34e2a3e84231fad72c4bbe9f74673d0b74d0 /src/ui/dialog/help/AboutDialog.cpp | |
parent | Merge pull request #68 from saturneric/develop-2.0.8 (diff) | |
parent | feat(project): add rpm package support (diff) | |
download | GpgFrontend-2.0.9.tar.gz GpgFrontend-2.0.9.zip |
Merge pull request #70 from saturneric/dev/2.0.8/saturnericv2.0.9
Develop 2.0.9.1
Diffstat (limited to '')
-rw-r--r-- | src/ui/dialog/help/AboutDialog.cpp (renamed from src/ui/help/AboutDialog.cpp) | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/ui/help/AboutDialog.cpp b/src/ui/dialog/help/AboutDialog.cpp index e8fbeb1b..6b6e4356 100644 --- a/src/ui/help/AboutDialog.cpp +++ b/src/ui/dialog/help/AboutDialog.cpp @@ -26,39 +26,43 @@ * */ -#include "ui/help/AboutDialog.h" +#include "AboutDialog.h" #include "GpgFrontendBuildInfo.h" #include "core/function/GlobalSettingStation.h" #include "core/thread/TaskRunnerGetter.h" +#include "ui/dialog/help/GnupgTab.h" #include "ui/thread/VersionCheckTask.h" namespace GpgFrontend::UI { -AboutDialog::AboutDialog(int defaultIndex, QWidget* parent) : QDialog(parent) { +AboutDialog::AboutDialog(int defaultIndex, QWidget* parent) + : GeneralDialog(typeid(AboutDialog).name(), parent) { this->setWindowTitle(QString(_("About")) + " " + qApp->applicationName()); - auto* tabWidget = new QTabWidget; - auto* infoTab = new InfoTab(); - auto* translatorsTab = new TranslatorsTab(); + auto* tab_widget = new QTabWidget; + auto* info_tab = new InfoTab(); + auto* gnupg_tab = new GnupgTab(); + auto* translators_tab = new TranslatorsTab(); update_tab_ = new UpdateTab(); - tabWidget->addTab(infoTab, _("About Software")); - tabWidget->addTab(translatorsTab, _("Translators")); - tabWidget->addTab(update_tab_, _("Update")); + tab_widget->addTab(info_tab, _("About GpgFrontend")); + tab_widget->addTab(gnupg_tab, _("GnuPG")); + tab_widget->addTab(translators_tab, _("Translators")); + tab_widget->addTab(update_tab_, _("Update")); - connect(tabWidget, &QTabWidget::currentChanged, this, + connect(tab_widget, &QTabWidget::currentChanged, this, [&](int index) { LOG(INFO) << "Current Index" << index; }); - if (defaultIndex < tabWidget->count() && defaultIndex >= 0) { - tabWidget->setCurrentIndex(defaultIndex); + if (defaultIndex < tab_widget->count() && defaultIndex >= 0) { + tab_widget->setCurrentIndex(defaultIndex); } auto* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok); connect(buttonBox, &QDialogButtonBox::accepted, this, &AboutDialog::close); auto* mainLayout = new QVBoxLayout; - mainLayout->addWidget(tabWidget); + mainLayout->addWidget(tab_widget); mainLayout->addWidget(buttonBox); setLayout(mainLayout); |