diff options
Diffstat (limited to 'src/ui/dialog/key_generate/KeygenDialog.h')
-rw-r--r-- | src/ui/dialog/key_generate/KeygenDialog.h | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/src/ui/dialog/key_generate/KeygenDialog.h b/src/ui/dialog/key_generate/KeygenDialog.h index 31b5f9c7..ceab3d46 100644 --- a/src/ui/dialog/key_generate/KeygenDialog.h +++ b/src/ui/dialog/key_generate/KeygenDialog.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2021 Saturneric + * Copyright (C) 2021 Saturneric <[email protected]> * * This file is part of GpgFrontend. * @@ -19,16 +19,19 @@ * The initial version of the source code is inherited from * the gpg4usb project, which is under GPL-3.0-or-later. * - * The source code version of this software was modified and released - * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021. + * All the source code of GpgFrontend was modified and released by + * Saturneric <[email protected]> starting on May 12, 2021. + * + * SPDX-License-Identifier: GPL-3.0-or-later * */ -#ifndef __KEYGENDIALOG_H__ -#define __KEYGENDIALOG_H__ +#pragma once + +#include <memory> -#include "core/GpgContext.h" -#include "core/GpgGenKeyInfo.h" +#include "core/model/GpgGenKeyInfo.h" +#include "core/utils/MemoryUtils.h" #include "ui/GpgFrontendUI.h" #include "ui/dialog/GeneralDialog.h" @@ -86,24 +89,25 @@ class KeyGenDialog : public GeneralDialog { */ QStringList error_messages_; ///< List of errors occurring when checking ///< entries of line edits - std::unique_ptr<GenKeyInfo> gen_key_info_ = - std::make_unique<GenKeyInfo>(); ///< - QDialogButtonBox* button_box_; ///< Box for standard buttons - QLabel* error_label_{}; ///< Label containing error message - QLineEdit* name_edit_{}; ///< Line edit for the keys name - QLineEdit* email_edit_{}; ///< Line edit for the keys email - QLineEdit* comment_edit_{}; ///< Line edit for the keys comment - QLineEdit* passphrase_edit_{}; ///< - QSpinBox* key_size_spin_box_{}; ///< Spinbox for the keys size (in bit) - QComboBox* key_type_combo_box_{}; ///< Combobox for Key type - QDateTimeEdit* date_edit_{}; ///< Date edit for expiration date - QCheckBox* expire_check_box_{}; ///< Checkbox, if key should expire + + std::shared_ptr<GenKeyInfo> gen_key_info_ = + SecureCreateSharedObject<GenKeyInfo>(); ///< + std::shared_ptr<GenKeyInfo> gen_subkey_info_ = nullptr; ///< + + QDialogButtonBox* button_box_; ///< Box for standard buttons + QLabel* error_label_{}; ///< Label containing error message + QLineEdit* name_edit_{}; ///< Line edit for the keys name + QLineEdit* email_edit_{}; ///< Line edit for the keys email + QLineEdit* comment_edit_{}; ///< Line edit for the keys comment + QSpinBox* key_size_spin_box_{}; ///< Spinbox for the keys size (in bit) + QComboBox* key_type_combo_box_{}; ///< Combobox for Key type + QDateTimeEdit* date_edit_{}; ///< Date edit for expiration date + QCheckBox* expire_check_box_{}; ///< Checkbox, if key should expire QCheckBox* no_pass_phrase_check_box_{}; QGroupBox* key_usage_group_box_{}; ///< Group of Widgets detecting the usage ///< of the Key QDateTime max_date_time_; ///< std::vector<QCheckBox*> key_usage_check_boxes_; ///< ENCR, SIGN, CERT, AUTH - bool use_pinentry_ = false; /** * @brief @@ -182,5 +186,3 @@ class KeyGenDialog : public GeneralDialog { }; } // namespace GpgFrontend::UI - -#endif // __KEYGENDIALOG_H__ |