GpgFrontend::UI::SubkeyGenerateDialog Class Reference
Inheritance diagram for GpgFrontend::UI::SubkeyGenerateDialog:
Collaboration diagram for GpgFrontend::UI::SubkeyGenerateDialog:

## Signals

void | SignalSubKeyGenerated ()

## Public Member Functions

| SubkeyGenerateDialog (const KeyId &key_id, QWidget *parent)
| Construct a new Subkey Generate Dialog object. More...
Public Member Functions inherited from GpgFrontend::UI::GeneralDialog
| GeneralDialog (std::string name, QWidget *parent=nullptr)

## Private Slots

void | slot_expire_box_changed ()
void | slot_key_gen_accept ()
void | slot_encryption_box_changed (int state)
void | slot_signing_box_changed (int state)
void | slot_certification_box_changed (int state)
void | slot_authentication_box_changed (int state)
void | slot_activated_key_type (int index)

## Private Member Functions

QGroupBox * | create_key_usage_group_box ()
| Create a key usage group box object. More...
QGroupBox * | create_basic_info_group_box ()
| Create a basic info group box object. More...
void | set_signal_slot ()
| Set the signal slot object. More...
void | refresh_widgets_state ()

## Private Attributes

GpgKey | key_
std::unique_ptr< GenKeyInfo > | gen_key_info_
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.
std::vector< QCheckBox * > | key_usage_check_boxes_
| ENCR, SIGN, CERT, AUTH.
QDateTime | max_date_time_

## Constructor & Destructor Documentation

## SubkeyGenerateDialog()

GpgFrontend::UI::SubkeyGenerateDialog::SubkeyGenerateDialog | ( | const KeyId & | key_id,
|  | QWidget * | parent
| ) |  |

explicit

Construct a new Subkey Generate Dialog object.

Parameters

  key_id |
  parent |

References button_box_, create_basic_info_group_box(), create_key_usage_group_box(), error_label_, GpgFrontend::UI::SignalStation::GetInstance(), GpgFrontend::SingletonFunctionObject< GlobalSettingStation >::GetInstance(), GpgFrontend::GlobalSettingStation::GetUISettings(), refresh_widgets_state(), and set_signal_slot().

## Member Function Documentation

## create_basic_info_group_box()

QGroupBox * GpgFrontend::UI::SubkeyGenerateDialog::create_basic_info_group_box | ( |  | ) |

private

Create a basic info group box object.

Returns
  QGroupBox*

References date_edit_, error_label_, expire_check_box_, GpgFrontend::GenKeyInfo::GetSupportedKeyAlgo(), key_size_spin_box_, and key_type_combo_box_.

Referenced by SubkeyGenerateDialog().

## create_key_usage_group_box()

QGroupBox * GpgFrontend::UI::SubkeyGenerateDialog::create_key_usage_group_box | ( |  | ) |

private

Create a key usage group box object.

Returns
  QGroupBox*

References key_usage_check_boxes_.

Referenced by SubkeyGenerateDialog().

## refresh_widgets_state()

void GpgFrontend::UI::SubkeyGenerateDialog::refresh_widgets_state | ( |  | ) |

private

Refresh widgets state by GenKeyInfo

References key_size_spin_box_, and key_usage_check_boxes_.

Referenced by slot_activated_key_type(), and SubkeyGenerateDialog().

## set_signal_slot()

void GpgFrontend::UI::SubkeyGenerateDialog::set_signal_slot | ( |  | ) |

private

Set the signal slot object.

References button_box_, expire_check_box_, key_type_combo_box_, key_usage_check_boxes_, slot_activated_key_type(), slot_authentication_box_changed(), slot_certification_box_changed(), slot_encryption_box_changed(), slot_expire_box_changed(), slot_key_gen_accept(), and slot_signing_box_changed().

Referenced by SubkeyGenerateDialog().

## slot_activated_key_type

void GpgFrontend::UI::SubkeyGenerateDialog::slot_activated_key_type | ( | int | index | ) |

privateslot

Parameters

  index |

References key_type_combo_box_, and refresh_widgets_state().

Referenced by set_signal_slot().

## slot_authentication_box_changed

void GpgFrontend::UI::SubkeyGenerateDialog::slot_authentication_box_changed | ( | int | state | ) |

privateslot

Parameters

  state |

Referenced by set_signal_slot().

## slot_certification_box_changed

void GpgFrontend::UI::SubkeyGenerateDialog::slot_certification_box_changed | ( | int | state | ) |

privateslot

Parameters

  state |

Referenced by set_signal_slot().

## slot_encryption_box_changed

void GpgFrontend::UI::SubkeyGenerateDialog::slot_encryption_box_changed | ( | int | state | ) |

privateslot

Parameters

  state |

Referenced by set_signal_slot().

## slot_expire_box_changed

void GpgFrontend::UI::SubkeyGenerateDialog::slot_expire_box_changed | ( |  | ) |

privateslot

when expire box was checked/unchecked, enable/disable the expiration date box

References date_edit_, and expire_check_box_.

Referenced by set_signal_slot().

## slot_key_gen_accept

void GpgFrontend::UI::SubkeyGenerateDialog::slot_key_gen_accept | ( |  | ) |

privateslot

check all line edits for false entries. Show error, when there is one, otherwise generate the key

primary keys should have a reasonable expiration date (no more than 2 years in the future)

create error message

References GpgFrontend::check_gpg_error_2_err_code(), date_edit_, error_label_, expire_check_box_, GpgFrontend::GpgKeyOpera::GenerateSubkey(), GpgFrontend::SingletonFunctionObject< GpgKeyOpera >::GetInstance(), and key_size_spin_box_.

Referenced by set_signal_slot().

## slot_signing_box_changed

void GpgFrontend::UI::SubkeyGenerateDialog::slot_signing_box_changed | ( | int | state | ) |

privateslot

Parameters

  state |

Referenced by set_signal_slot().

## Member Data Documentation

## gen_key_info_

std::unique_ptr<GenKeyInfo> GpgFrontend::UI::SubkeyGenerateDialog::gen_key_info_

private

Initial value:
=
std::make_unique<GenKeyInfo>(true)

The documentation for this class was generated from the following files:

- src/ui/dialog/key_generate/SubkeyGenerateDialog.h
- src/ui/dialog/key_generate/SubkeyGenerateDialog.cpp