GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

SubkeyGenerateDialog.h
1
27 #ifndef GPGFRONTEND_SUBKEYGENERATEDIALOG_H
28 #define GPGFRONTEND_SUBKEYGENERATEDIALOG_H
29
30 #include "core/GpgContext.h"
31 #include "core/GpgGenKeyInfo.h"
32 #include "ui/GpgFrontendUI.h"
33 #include "ui/dialog/GeneralDialog.h"
34
35 namespace GpgFrontend::UI {
40 class SubkeyGenerateDialog : public GeneralDialog {
41 Q_OBJECT
42
43 public:
50 explicit SubkeyGenerateDialog(const KeyId& key_id, QWidget* parent);
51
52 signals:
57 void SignalSubKeyGenerated();
58
59 private:
60 GpgKey key_;
61
62 std::unique_ptr<GenKeyInfo> gen_key_info_ =
63 std::make_unique<GenKeyInfo>(true);
64
65 QGroupBox* key_usage_group_box_{};
66 QDialogButtonBox* button_box_;
67 QLabel* error_label_{};
68 QSpinBox* key_size_spin_box_{};
69 QComboBox* key_type_combo_box_{};
70 QDateTimeEdit* date_edit_{};
71 QCheckBox* expire_check_box_{};
72 QCheckBox* no_pass_phrase_check_box_{};
73 QLineEdit* passphrase_edit_{};
74
75 std::vector<QCheckBox*> key_usage_check_boxes_;
76 QDateTime max_date_time_;
77 bool use_pinentry_ = false;
78
84 QGroupBox* create_key_usage_group_box();
85
91 QGroupBox* create_basic_info_group_box();
96 void set_signal_slot();
97
101 void refresh_widgets_state();
102
103 private slots:
104
109 void slot_expire_box_changed();
110
115 void slot_key_gen_accept();
116
122 void slot_encryption_box_changed(int state);
123
129 void slot_signing_box_changed(int state);
130
136 void slot_certification_box_changed(int state);
137
143 void slot_authentication_box_changed(int state);
144
150 void slot_activated_key_type(int index);
151 };
152
153 } // namespace GpgFrontend::UI
154
155 #endif // GPGFRONTEND_SUBKEYGENERATEDIALOG_H
GpgFrontend::GpgKey
Definition: GpgKey.h:43
GpgFrontend::UI::GeneralDialog
Definition: GeneralDialog.h:35
GpgFrontend::UI::SubkeyGenerateDialog
Definition: SubkeyGenerateDialog.h:40
GpgFrontend::UI::SubkeyGenerateDialog::no_pass_phrase_check_box_
QCheckBox * no_pass_phrase_check_box_
Checkbox, if key should expire.
Definition: SubkeyGenerateDialog.h:72
GpgFrontend::UI::SubkeyGenerateDialog::create_basic_info_group_box
QGroupBox * create_basic_info_group_box()
Create a basic info group box object.
Definition: SubkeyGenerateDialog.cpp:124
GpgFrontend::UI::SubkeyGenerateDialog::slot_authentication_box_changed
void slot_authentication_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:370
GpgFrontend::UI::SubkeyGenerateDialog::slot_encryption_box_changed
void slot_encryption_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:346
GpgFrontend::UI::SubkeyGenerateDialog::slot_expire_box_changed
void slot_expire_box_changed()
Definition: SubkeyGenerateDialog.cpp:204
GpgFrontend::UI::SubkeyGenerateDialog::refresh_widgets_state
void refresh_widgets_state()
Definition: SubkeyGenerateDialog.cpp:212
GpgFrontend::UI::SubkeyGenerateDialog::slot_activated_key_type
void slot_activated_key_type(int index)
Definition: SubkeyGenerateDialog.cpp:378
GpgFrontend::UI::SubkeyGenerateDialog::key_usage_check_boxes_
std::vector< QCheckBox * > key_usage_check_boxes_
ENCR, SIGN, CERT, AUTH.
Definition: SubkeyGenerateDialog.h:75
GpgFrontend::UI::SubkeyGenerateDialog::error_label_
QLabel * error_label_
Label containing error message.
Definition: SubkeyGenerateDialog.h:67
GpgFrontend::UI::SubkeyGenerateDialog::slot_certification_box_changed
void slot_certification_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:362
GpgFrontend::UI::SubkeyGenerateDialog::SubkeyGenerateDialog
SubkeyGenerateDialog(const KeyId &key_id, QWidget *parent)
Construct a new Subkey Generate Dialog object.
Definition: SubkeyGenerateDialog.cpp:40
GpgFrontend::UI::SubkeyGenerateDialog::set_signal_slot
void set_signal_slot()
Set the signal slot object.
Definition: SubkeyGenerateDialog.cpp:176
GpgFrontend::UI::SubkeyGenerateDialog::create_key_usage_group_box
QGroupBox * create_key_usage_group_box()
Create a key usage group box object.
Definition: SubkeyGenerateDialog.cpp:91
GpgFrontend::UI::SubkeyGenerateDialog::date_edit_
QDateTimeEdit * date_edit_
Date edit for expiration date.
Definition: SubkeyGenerateDialog.h:70
GpgFrontend::UI::SubkeyGenerateDialog::key_size_spin_box_
QSpinBox * key_size_spin_box_
Spinbox for the keys size (in bit)
Definition: SubkeyGenerateDialog.h:68
GpgFrontend::UI::SubkeyGenerateDialog::slot_key_gen_accept
void slot_key_gen_accept()
Definition: SubkeyGenerateDialog.cpp:259
GpgFrontend::UI::SubkeyGenerateDialog::button_box_
QDialogButtonBox * button_box_
Box for standard buttons.
Definition: SubkeyGenerateDialog.h:66
GpgFrontend::UI::SubkeyGenerateDialog::key_type_combo_box_
QComboBox * key_type_combo_box_
Combobox for Key tpe.
Definition: SubkeyGenerateDialog.h:69
GpgFrontend::UI::SubkeyGenerateDialog::slot_signing_box_changed
void slot_signing_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:354
GpgFrontend::UI::SubkeyGenerateDialog::expire_check_box_
QCheckBox * expire_check_box_
Checkbox, if key should expire.
Definition: SubkeyGenerateDialog.h:71
GpgFrontend::UI
Definition: FileReadTask.cpp:29