GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
Wizard.h
1 
29 #pragma once
30 
31 #include "core/GpgConstants.h"
32 #include "main_window/KeyMgmt.h"
33 #include "ui/GpgFrontendUI.h"
34 #include "ui/dialog/key_generate/KeygenDialog.h"
35 #include "ui/dialog/settings/SettingsDialog.h"
36 
37 namespace GpgFrontend::UI {
38 
43 class Wizard : public QWizard {
44  Q_OBJECT
45  Q_ENUMS(WizardPages)
46 
47  public:
48  enum WizardPages { Page_Intro, Page_Choose, Page_GenKey, Page_Conclusion };
49 
55  explicit Wizard(QWidget* parent = nullptr);
56 
57  private slots:
62  void slot_wizard_accepted();
63 
64  signals:
70  void SignalOpenHelp(QString page);
71 };
72 
77 class IntroPage : public QWizardPage {
78  Q_OBJECT
79 
80  public:
86  explicit IntroPage(QWidget* parent = nullptr);
87 
88  protected:
94  [[nodiscard]] int nextId() const override;
95 };
96 
97 class ChoosePage : public QWizardPage {
98  Q_OBJECT
99 
100  public:
106  explicit ChoosePage(QWidget* parent = nullptr);
107 
108  private slots:
109 
115  void slot_jump_page(const QString& page);
116 
117  protected:
123  [[nodiscard]] int nextId() const override;
124 
125  int next_page_;
126 };
127 
132 class KeyGenPage : public QWizardPage {
133  Q_OBJECT
134 
135  public:
141  explicit KeyGenPage(QWidget* parent = nullptr);
142 
148  [[nodiscard]] int nextId() const override;
149 
150  private slots:
151 
156  void slot_generate_key_dialog();
157 };
158 
163 class ConclusionPage : public QWizardPage {
164  Q_OBJECT
165 
166  public:
172  explicit ConclusionPage(QWidget* parent = nullptr);
173 
179  [[nodiscard]] int nextId() const override;
180 
181  private:
182  QCheckBox* dont_show_wizard_checkbox_;
183  QCheckBox* open_help_check_box_;
184 };
185 
186 } // namespace GpgFrontend::UI
Definition: Wizard.h:97
int nextId() const override
Definition: Wizard.cpp:157
ChoosePage(QWidget *parent=nullptr)
Construct a new Choose Page object.
Definition: Wizard.cpp:111
void slot_jump_page(const QString &page)
Definition: Wizard.cpp:159
Definition: Wizard.h:163
int nextId() const override
Definition: Wizard.cpp:242
ConclusionPage(QWidget *parent=nullptr)
Construct a new Conclusion Page object.
Definition: Wizard.cpp:208
Definition: Wizard.h:77
int nextId() const override
Definition: Wizard.cpp:109
IntroPage(QWidget *parent=nullptr)
Construct a new Intro Page object.
Definition: Wizard.cpp:73
Definition: Wizard.h:132
KeyGenPage(QWidget *parent=nullptr)
Construct a new Key Gen Page object.
Definition: Wizard.cpp:168
int nextId() const override
Definition: Wizard.cpp:201
Definition: Wizard.h:43
Wizard(QWidget *parent=nullptr)
Construct a new Wizard object.
Definition: Wizard.cpp:36
void SignalOpenHelp(QString page)
Definition: FileReadTask.cpp:31