diff options
author | saturneric <[email protected]> | 2025-02-01 23:21:59 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-01 23:21:59 +0000 |
commit | d06c31abe7e2540518c4d3471acd381edfababa3 (patch) | |
tree | 7efec63216119a6a3b77208328ba59419acd905f /src/ui/dialog/Wizard.cpp | |
parent | fix: issues found on unit test mode (diff) | |
download | GpgFrontend-d06c31abe7e2540518c4d3471acd381edfababa3.tar.gz GpgFrontend-d06c31abe7e2540518c4d3471acd381edfababa3.zip |
feat: upgrade KeyGenDialog to meet easy and advanced requirements
Diffstat (limited to 'src/ui/dialog/Wizard.cpp')
-rw-r--r-- | src/ui/dialog/Wizard.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ui/dialog/Wizard.cpp b/src/ui/dialog/Wizard.cpp index ee70239a..32d88b31 100644 --- a/src/ui/dialog/Wizard.cpp +++ b/src/ui/dialog/Wizard.cpp @@ -29,14 +29,16 @@ #include "Wizard.h" #include "core/function/GlobalSettingStation.h" +#include "ui/GpgFrontendUI.h" +#include "ui/dialog/key_generate/KeyGenDialog.h" namespace GpgFrontend::UI { Wizard::Wizard(QWidget* parent) : QWizard(parent) { - setPage(Page_Intro, new IntroPage(this)); - setPage(Page_Choose, new ChoosePage(this)); - setPage(Page_GenKey, new KeyGenPage(this)); - setPage(Page_Conclusion, new ConclusionPage(this)); + setPage(kPAGE_INTRO, new IntroPage(this)); + setPage(kPAGE_CHOOSE, new ChoosePage(this)); + setPage(kPAGE_GEN_KEY, new KeyGenPage(this)); + setPage(kPAGE_CONCLUSION, new ConclusionPage(this)); #ifndef Q_WS_MAC setWizardStyle(ModernStyle); #endif @@ -98,7 +100,7 @@ IntroPage::IntroPage(QWidget* parent) : QWizardPage(parent) { setLayout(layout); } -int IntroPage::nextId() const { return Wizard::Page_Choose; } +int IntroPage::nextId() const { return Wizard::kPAGE_CHOOSE; } ChoosePage::ChoosePage(QWidget* parent) : QWizardPage(parent) { setTitle(tr("Choose your action...")); @@ -143,7 +145,7 @@ ChoosePage::ChoosePage(QWidget* parent) : QWizardPage(parent) { layout->addWidget(encr_decy_text_label); layout->addWidget(sign_verify_text_label); setLayout(layout); - next_page_ = Wizard::Page_Conclusion; + next_page_ = Wizard::kPAGE_CONCLUSION; } int ChoosePage::nextId() const { return next_page_; } @@ -190,7 +192,7 @@ KeyGenPage::KeyGenPage(QWidget* parent) : QWizardPage(parent) { setLayout(layout); } -int KeyGenPage::nextId() const { return Wizard::Page_Conclusion; } +int KeyGenPage::nextId() const { return Wizard::kPAGE_CONCLUSION; } void KeyGenPage::slot_generate_key_dialog() { (new KeyGenDialog(kGpgFrontendDefaultChannel, this))->show(); |