diff options
Diffstat (limited to 'src/ui/dialog/key_generate/SubkeyGenerateDialog.h')
-rw-r--r-- | src/ui/dialog/key_generate/SubkeyGenerateDialog.h | 89 |
1 files changed, 12 insertions, 77 deletions
diff --git a/src/ui/dialog/key_generate/SubkeyGenerateDialog.h b/src/ui/dialog/key_generate/SubkeyGenerateDialog.h index ad47bbf2..96dee49e 100644 --- a/src/ui/dialog/key_generate/SubkeyGenerateDialog.h +++ b/src/ui/dialog/key_generate/SubkeyGenerateDialog.h @@ -28,8 +28,6 @@ #pragma once -#include <memory> - #include "core/function/gpg/GpgContext.h" #include "core/model/GpgKey.h" #include "core/model/GpgKeyGenerateInfo.h" @@ -38,6 +36,8 @@ #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_; ///< - - QSharedPointer<KeyGenerateInfo> gen_subkey_info_ = - QSharedPointer<KeyGenerateInfo>::create(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 - - QContainer<QCheckBox*> key_usage_check_boxes_; ///< ENCR, SIGN, CERT, AUTH - QDateTime max_date_time_; ///< - - /** - * @brief Create a key usage group box object - * - * @return QGroupBox* - */ - auto create_key_usage_group_box() -> QGroupBox*; - - /** - * @brief Create a basic info group box object - * - * @return QGroupBox* - */ - auto create_basic_info_group_box() -> QGroupBox*; - /** - * @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 |