GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
KeyPairUIDTab.h
1 
29 #ifndef GPGFRONTEND_KEYPAIRUIDTAB_H
30 #define GPGFRONTEND_KEYPAIRUIDTAB_H
31 
32 #include "KeyNewUIDDialog.h"
33 #include "KeyUIDSignDialog.h"
34 #include "core/GpgContext.h"
35 #include "ui/GpgFrontendUI.h"
36 
37 namespace GpgFrontend::UI {
38 
39 class KeyPairUIDTab : public QWidget {
40  Q_OBJECT
41 
42  public:
49  KeyPairUIDTab(const std::string& key_id, QWidget* parent);
50 
51  signals:
52 
57  void SignalUpdateUIDInfo();
58 
59  private:
60  GpgKey m_key_;
61  QTableWidget* uid_list_{};
62  QTableWidget* sig_list_{};
63  QTabWidget* tofu_tabs_{};
64  QMenu* manage_selected_uid_menu_{};
65  QMenu* uid_popup_menu_{};
66  QMenu* sign_popup_menu_{};
67  std::vector<GpgUID> buffered_uids_;
68  std::vector<GpgKeySignature> buffered_signatures_;
69 
74  void create_uid_list();
75 
80  void create_sign_list();
81 
87 
92  void create_uid_popup_menu();
93 
99 
105  UIDArgsListPtr get_uid_checked();
106 
112  UIDArgsListPtr get_uid_selected();
113 
119  SignIdArgsListPtr get_sign_selected();
120 
121  private slots:
122 
127  void slot_refresh_uid_list();
128 
133  void slot_refresh_tofu_info();
134 
139  void slot_refresh_sig_list();
140 
145  void slot_add_sign();
146 
151  void slot_add_sign_single();
152 
157  void slot_add_uid();
158 
163  void slot_del_uid();
164 
169  void slot_del_uid_single();
170 
175  void slot_set_primary_uid();
176 
181  void slot_del_sign();
182 
187  void slot_refresh_key();
188 
194  static void slot_add_uid_result(int result);
195 
196  protected:
202  void contextMenuEvent(QContextMenuEvent* event) override;
203 };
204 
205 } // namespace GpgFrontend::UI
206 
207 #endif // GPGFRONTEND_KEYPAIRUIDTAB_H
Definition: GpgKey.h:43
Definition: KeyPairUIDTab.h:39
void create_uid_list()
Create a uid list object.
Definition: KeyPairUIDTab.cpp:118
UIDArgsListPtr get_uid_selected()
Get the uid selected object.
Definition: KeyPairUIDTab.cpp:431
static void slot_add_uid_result(int result)
Definition: KeyPairUIDTab.cpp:348
void create_uid_popup_menu()
Create a uid popup menu object.
Definition: KeyPairUIDTab.cpp:452
SignIdArgsListPtr get_sign_selected()
Get the sign selected object.
Definition: KeyPairUIDTab.cpp:441
void create_sign_list()
Create a sign list object.
Definition: KeyPairUIDTab.cpp:142
void contextMenuEvent(QContextMenuEvent *event) override
Definition: KeyPairUIDTab.cpp:472
void create_manage_uid_menu()
Create a manage uid menu object.
Definition: KeyPairUIDTab.cpp:325
void create_sign_popup_menu()
Create a sign popup menu object.
Definition: KeyPairUIDTab.cpp:527
UIDArgsListPtr get_uid_checked()
Get the uid checked object.
Definition: KeyPairUIDTab.cpp:316
KeyPairUIDTab(const std::string &key_id, QWidget *parent)
Construct a new Key Pair U I D Tab object.
Definition: KeyPairUIDTab.cpp:37
Definition: FileReadTask.cpp:31