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
34namespace GpgFrontend::UI {
39class SubkeyGenerateDialog : public QDialog {
40 Q_OBJECT
41
42 public:
49 explicit SubkeyGenerateDialog(const KeyId& key_id, QWidget* parent);
50
51 signals:
56 void SignalSubKeyGenerated();
57
58 private:
59 GpgKey key_;
60
61 std::unique_ptr<GenKeyInfo> gen_key_info_ =
62 std::make_unique<GenKeyInfo>(true);
63
64 QGroupBox* key_usage_group_box_{};
65 QDialogButtonBox* button_box_;
66 QLabel* error_label_{};
67 QSpinBox* key_size_spin_box_{};
68 QComboBox* key_type_combo_box_{};
69 QDateTimeEdit* date_edit_{};
70 QCheckBox* expire_check_box_{};
71
72 std::vector<QCheckBox*> key_usage_check_boxes_;
73 QDateTime max_date_time_;
74
80 QGroupBox* create_key_usage_group_box();
81
87 QGroupBox* create_basic_info_group_box();
92 void set_signal_slot();
93
98
99 private slots:
100
106
111 void slot_key_gen_accept();
112
118 void slot_encryption_box_changed(int state);
119
125 void slot_signing_box_changed(int state);
126
132 void slot_certification_box_changed(int state);
133
139 void slot_authentication_box_changed(int state);
140
146 void slot_activated_key_type(int index);
147};
148
149} // namespace GpgFrontend::UI
150
151#endif // GPGFRONTEND_SUBKEYGENERATEDIALOG_H
Definition: GpgKey.h:44
Definition: SubkeyGenerateDialog.h:39
QGroupBox * create_basic_info_group_box()
Create a basic info group box object.
Definition: SubkeyGenerateDialog.cpp:116
void slot_authentication_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:325
void slot_encryption_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:301
void slot_expire_box_changed()
Definition: SubkeyGenerateDialog.cpp:178
void refresh_widgets_state()
Definition: SubkeyGenerateDialog.cpp:186
void slot_activated_key_type(int index)
Definition: SubkeyGenerateDialog.cpp:333
std::vector< QCheckBox * > key_usage_check_boxes_
ENCR, SIGN, CERT, AUTH.
Definition: SubkeyGenerateDialog.h:72
QLabel * error_label_
Label containing error message.
Definition: SubkeyGenerateDialog.h:66
void slot_certification_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:317
SubkeyGenerateDialog(const KeyId &key_id, QWidget *parent)
Construct a new Subkey Generate Dialog object.
Definition: SubkeyGenerateDialog.cpp:37
void set_signal_slot()
Set the signal slot object.
Definition: SubkeyGenerateDialog.cpp:158
QGroupBox * create_key_usage_group_box()
Create a key usage group box object.
Definition: SubkeyGenerateDialog.cpp:83
QDateTimeEdit * date_edit_
Date edit for expiration date.
Definition: SubkeyGenerateDialog.h:69
QSpinBox * key_size_spin_box_
Spinbox for the keys size (in bit)
Definition: SubkeyGenerateDialog.h:67
void slot_key_gen_accept()
Definition: SubkeyGenerateDialog.cpp:235
QDialogButtonBox * button_box_
Box for standard buttons.
Definition: SubkeyGenerateDialog.h:65
QComboBox * key_type_combo_box_
Combobox for Key tpe.
Definition: SubkeyGenerateDialog.h:68
void slot_signing_box_changed(int state)
Definition: SubkeyGenerateDialog.cpp:309
QCheckBox * expire_check_box_
Checkbox, if key should expire.
Definition: SubkeyGenerateDialog.h:70
Definition: VerifyDetailsDialog.cpp:33