GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
KeyPairSubkeyTab.h
1 
29 #ifndef GPGFRONTEND_KEYPAIRSUBKEYTAB_H
30 #define GPGFRONTEND_KEYPAIRSUBKEYTAB_H
31 
32 #include "KeySetExpireDateDialog.h"
33 #include "core/GpgContext.h"
34 #include "ui/GpgFrontendUI.h"
35 #include "ui/dialog/key_generate/SubkeyGenerateDialog.h"
36 
37 namespace GpgFrontend::UI {
38 
39 class KeyPairSubkeyTab : public QWidget {
40  Q_OBJECT
41 
42  public:
49  KeyPairSubkeyTab(const std::string& key, QWidget* parent);
50 
51  private:
56  void create_subkey_list();
57 
63 
70 
71  GpgKey key_;
72  QTableWidget* subkey_list_{};
73  std::vector<GpgSubKey> buffered_subkeys_;
74 
75  QGroupBox* list_box_;
76  QGroupBox* detail_box_;
77 
78  QMenu* subkey_opera_menu_{};
79 
86  QLabel* usage_var_label_;
87  QLabel* master_key_exist_var_label_;
88  QLabel* card_key_label_;
89 
90  private slots:
91 
96  void slot_add_subkey();
97 
102  void slot_refresh_subkey_list();
103 
108  void slot_refresh_subkey_detail();
109 
114  void slot_edit_subkey();
115 
120  void slot_revoke_subkey();
121 
126  void slot_refresh_key_info();
127 
128  protected:
134  void contextMenuEvent(QContextMenuEvent* event) override;
135 };
136 
137 } // namespace GpgFrontend::UI
138 
139 #endif // GPGFRONTEND_KEYPAIRSUBKEYTAB_H
Definition: GpgKey.h:43
Definition: GpgSubKey.h:43
Definition: KeyPairSubkeyTab.h:39
void create_subkey_list()
Create a subkey list object.
Definition: KeyPairSubkeyTab.cpp:141
QLabel * fingerprint_var_label_
Label containing the keys fingerprint.
Definition: KeyPairSubkeyTab.h:85
QLabel * algorithm_var_label_
Label containing the keys algorithm.
Definition: KeyPairSubkeyTab.h:83
QLabel * key_id_var_label_
Label containing the keys keyid.
Definition: KeyPairSubkeyTab.h:84
void create_subkey_opera_menu()
Create a subkey opera menu object.
Definition: KeyPairSubkeyTab.cpp:318
QLabel * key_size_var_label_
Label containing the keys key size.
Definition: KeyPairSubkeyTab.h:80
QLabel * expire_var_label_
Label containing the keys expiration date.
Definition: KeyPairSubkeyTab.h:81
KeyPairSubkeyTab(const std::string &key, QWidget *parent)
Construct a new Key Pair Subkey Tab object.
Definition: KeyPairSubkeyTab.cpp:36
QLabel * created_var_label_
Label containing the keys creation date.
Definition: KeyPairSubkeyTab.h:82
void contextMenuEvent(QContextMenuEvent *event) override
Definition: KeyPairSubkeyTab.cpp:337
const GpgSubKey & get_selected_subkey()
Get the selected subkey object.
Definition: KeyPairSubkeyTab.cpp:343
Definition: FileReadTask.cpp:29