GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
Wizard.h
1 
29 #ifndef WIZARD_H
30 #define WIZARD_H
31 
32 #include "core/GpgConstants.h"
33 #include "ui/GpgFrontendUI.h"
34 #include "ui/KeyMgmt.h"
35 #include "ui/key_generate/KeygenDialog.h"
36 #include "ui/settings/SettingsDialog.h"
37 
38 namespace GpgFrontend::UI {
39 
44 class Wizard : public QWizard {
45  Q_OBJECT
46  Q_ENUMS(WizardPages)
47 
48  public:
49  enum WizardPages { Page_Intro, Page_Choose, Page_GenKey, Page_Conclusion };
50 
56  explicit Wizard(QWidget* parent = nullptr);
57 
58  private slots:
63  void slot_wizard_accepted();
64 
65  signals:
71  void SignalOpenHelp(QString page);
72 };
73 
78 class IntroPage : public QWizardPage {
79  Q_OBJECT
80 
81  public:
87  explicit IntroPage(QWidget* parent = nullptr);
88 
89  protected:
95  [[nodiscard]] int nextId() const override;
96 };
97 
98 class ChoosePage : public QWizardPage {
99  Q_OBJECT
100 
101  public:
107  explicit ChoosePage(QWidget* parent = nullptr);
108 
109  private slots:
110 
116  void slot_jump_page(const QString& page);
117 
118  protected:
124  [[nodiscard]] int nextId() const override;
125 
126  int next_page_;
127 };
128 
133 class KeyGenPage : public QWizardPage {
134  Q_OBJECT
135 
136  public:
142  explicit KeyGenPage(QWidget* parent = nullptr);
143 
149  [[nodiscard]] int nextId() const override;
150 
151  private slots:
152 
157  void slot_generate_key_dialog();
158 };
159 
164 class ConclusionPage : public QWizardPage {
165  Q_OBJECT
166 
167  public:
173  explicit ConclusionPage(QWidget* parent = nullptr);
174 
180  [[nodiscard]] int nextId() const override;
181 
182  private:
183  QCheckBox* dont_show_wizard_checkbox_;
184  QCheckBox* open_help_check_box_;
185 };
186 
187 } // namespace GpgFrontend::UI
188 
189 #endif
GpgFrontend::UI
Definition: VerifyDetailsDialog.cpp:33
GpgFrontend::UI::Wizard::Wizard
Wizard(QWidget *parent=nullptr)
Construct a new Wizard object.
Definition: Wizard.cpp:35
GpgFrontend::UI::KeyGenPage
Definition: Wizard.h:133
GpgFrontend::GlobalSettingStation::SyncSettings
void SyncSettings() noexcept
sync the settings to the file
Definition: GlobalSettingStation.cpp:33
GpgFrontend::UI::KeyGenPage::KeyGenPage
KeyGenPage(QWidget *parent=nullptr)
Construct a new Key Gen Page object.
Definition: Wizard.cpp:190
GpgFrontend::SingletonFunctionObject< GlobalSettingStation >::GetInstance
static GlobalSettingStation & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:57
GpgFrontend::UI::ChoosePage::nextId
int nextId() const override
Definition: Wizard.cpp:179
GpgFrontend::UI::ChoosePage::slot_jump_page
void slot_jump_page(const QString &page)
Definition: Wizard.cpp:181
GpgFrontend::GlobalSettingStation::GetUISettings
libconfig::Setting & GetUISettings() noexcept
Definition: GlobalSettingStation.h:68
GpgFrontend::UI::ChoosePage::ChoosePage
ChoosePage(QWidget *parent=nullptr)
Construct a new Choose Page object.
Definition: Wizard.cpp:124
GpgFrontend::UI::IntroPage
Definition: Wizard.h:78
GpgFrontend::UI::ConclusionPage::nextId
int nextId() const override
Definition: Wizard.cpp:267
GpgFrontend::UI::Wizard
Definition: Wizard.h:44
GpgFrontend::UI::ConclusionPage
Definition: Wizard.h:164
GpgFrontend::UI::IntroPage::nextId
int nextId() const override
Definition: Wizard.cpp:122
GpgFrontend::UI::ConclusionPage::ConclusionPage
ConclusionPage(QWidget *parent=nullptr)
Construct a new Conclusion Page object.
Definition: Wizard.cpp:231
GpgFrontend::UI::IntroPage::IntroPage
IntroPage(QWidget *parent=nullptr)
Construct a new Intro Page object.
Definition: Wizard.cpp:85
GpgFrontend::UI::KeyGenDialog
Definition: KeygenDialog.h:40
GpgFrontend::UI::ChoosePage
Definition: Wizard.h:98
GpgFrontend::UI::KeyGenPage::nextId
int nextId() const override
Definition: Wizard.cpp:223
GpgFrontend::UI::Wizard::SignalOpenHelp
void SignalOpenHelp(QString page)