diff options
author | saturneric <[email protected]> | 2025-02-03 18:01:26 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-03 18:01:26 +0000 |
commit | d3d94f5b7a3e60b3bbb73e832bab7cf2d44a1600 (patch) | |
tree | 5cc7838f1325b076b91bb898fd0da3cfcb60b455 /src/ui/dialog/key_generate/SubkeyGenerateDialog.h | |
parent | doc: update README.md (diff) | |
parent | fix: set pb range when size of operas > 1 (diff) | |
download | GpgFrontend-d3d94f5b7a3e60b3bbb73e832bab7cf2d44a1600.tar.gz GpgFrontend-d3d94f5b7a3e60b3bbb73e832bab7cf2d44a1600.zip |
Merge branch 'develop'
Diffstat (limited to 'src/ui/dialog/key_generate/SubkeyGenerateDialog.h')
-rw-r--r-- | src/ui/dialog/key_generate/SubkeyGenerateDialog.h | 91 |
1 files changed, 13 insertions, 78 deletions
diff --git a/src/ui/dialog/key_generate/SubkeyGenerateDialog.h b/src/ui/dialog/key_generate/SubkeyGenerateDialog.h index f0a4fed6..96dee49e 100644 --- a/src/ui/dialog/key_generate/SubkeyGenerateDialog.h +++ b/src/ui/dialog/key_generate/SubkeyGenerateDialog.h @@ -28,16 +28,16 @@ #pragma once -#include <memory> - #include "core/function/gpg/GpgContext.h" -#include "core/model/GpgGenKeyInfo.h" #include "core/model/GpgKey.h" +#include "core/model/GpgKeyGenerateInfo.h" #include "core/typedef/GpgTypedef.h" #include "core/utils/MemoryUtils.h" #include "ui/GpgFrontendUI.h" #include "ui/dialog/GeneralDialog.h" +class Ui_SubkeyGenDialog; + namespace GpgFrontend::UI { /** * @brief @@ -56,97 +56,32 @@ class SubkeyGenerateDialog : public GeneralDialog { explicit SubkeyGenerateDialog(int channel, const KeyId& key_id, QWidget* parent); - private: - int current_gpg_context_channel_; ///< - GpgKey key_; ///< - - std::shared_ptr<GenKeyInfo> gen_key_info_ = - SecureCreateSharedObject<GenKeyInfo>(true); ///< - - QGroupBox* key_usage_group_box_{}; - QDialogButtonBox* button_box_; ///< Box for standard buttons - QLabel* error_label_{}; ///< Label containing error message - QSpinBox* key_size_spin_box_{}; ///< Spinbox for the keys size (in bit) - QComboBox* key_type_combo_box_{}; ///< Combobox for Key tpe - QDateTimeEdit* date_edit_{}; ///< Date edit for expiration date - QCheckBox* expire_check_box_{}; ///< Checkbox, if key should expire - QCheckBox* no_pass_phrase_check_box_{}; ///< Checkbox, if key should expire - - std::vector<QCheckBox*> key_usage_check_boxes_; ///< ENCR, SIGN, CERT, AUTH - QDateTime max_date_time_; ///< - - /** - * @brief Create a key usage group box object - * - * @return QGroupBox* - */ - QGroupBox* create_key_usage_group_box(); - - /** - * @brief Create a basic info group box object - * - * @return QGroupBox* - */ - QGroupBox* create_basic_info_group_box(); - /** - * @brief Set the signal slot object - * - */ - void set_signal_slot(); - - /** - * @details Refresh widgets state by GenKeyInfo - */ - void refresh_widgets_state(); - private slots: /** - * @details when expire box was checked/unchecked, enable/disable the - * expiration date box - */ - void slot_expire_box_changed(); - - /** * @details check all line edits for false entries. Show error, when there is * one, otherwise generate the key */ void slot_key_gen_accept(); - /** - * @brief - * - * @param state - */ - void slot_encryption_box_changed(int state); - - /** - * @brief - * - * @param state - */ - void slot_signing_box_changed(int state); + private: + QSharedPointer<Ui_SubkeyGenDialog> ui_; ///< + int current_gpg_context_channel_; ///< - /** - * @brief - * - * @param state - */ - void slot_certification_box_changed(int state); + GpgKey key_; ///< + QSharedPointer<KeyGenerateInfo> gen_subkey_info_; ///< + QContainer<KeyAlgo> supported_subkey_algos_; ///< /** - * @brief + * @brief Set the signal slot object * - * @param state */ - void slot_authentication_box_changed(int state); + void set_signal_slot_config(); /** - * @brief - * - * @param index + * @details Refresh widgets state by GenKeyInfo */ - void slot_activated_key_type(int index); + void refresh_widgets_state(); }; } // namespace GpgFrontend::UI |