GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
KeyPairUIDTab.h
1 
29 #pragma once
30 
31 #include "KeyNewUIDDialog.h"
32 #include "KeyUIDSignDialog.h"
33 #include "core/function/gpg/GpgContext.h"
34 #include "ui/GpgFrontendUI.h"
35 
36 namespace GpgFrontend::UI {
37 
38 class KeyPairUIDTab : public QWidget {
39  Q_OBJECT
40 
41  public:
48  KeyPairUIDTab(const QString& key_id, QWidget* parent);
49 
50  signals:
51 
56  void SignalUpdateUIDInfo();
57 
58  private:
59  GpgKey m_key_;
60  QTableWidget* uid_list_{};
61  QTableWidget* sig_list_{};
62  QTabWidget* tofu_tabs_{};
63  QMenu* manage_selected_uid_menu_{};
64  QMenu* uid_popup_menu_{};
65  QMenu* sign_popup_menu_{};
66  std::vector<GpgUID> buffered_uids_;
67  std::vector<GpgKeySignature> buffered_signatures_;
68 
73  void create_uid_list();
74 
79  void create_sign_list();
80 
86 
91  void create_uid_popup_menu();
92 
98 
104  UIDArgsListPtr get_uid_checked();
105 
111  UIDArgsListPtr get_uid_selected();
112 
118  SignIdArgsListPtr get_sign_selected();
119 
120  private slots:
121 
126  void slot_refresh_uid_list();
127 
132  void slot_refresh_tofu_info();
133 
138  void slot_refresh_sig_list();
139 
144  void slot_add_sign();
145 
150  void slot_add_sign_single();
151 
156  void slot_add_uid();
157 
162  void slot_del_uid();
163 
168  void slot_del_uid_single();
169 
174  void slot_set_primary_uid();
175 
180  void slot_del_sign();
181 
186  void slot_refresh_key();
187 
193  static void slot_add_uid_result(int result);
194 
195  protected:
201  void contextMenuEvent(QContextMenuEvent* event) override;
202 };
203 
204 } // namespace GpgFrontend::UI
Definition: GpgKey.h:40
Definition: KeyPairUIDTab.h:38
void create_uid_list()
Create a uid list object.
Definition: KeyPairUIDTab.cpp:121
KeyPairUIDTab(const QString &key_id, QWidget *parent)
Construct a new Key Pair U I D Tab object.
Definition: KeyPairUIDTab.cpp:40
static void slot_add_uid_result(int result)
Definition: KeyPairUIDTab.cpp:349
void create_uid_popup_menu()
Create a uid popup menu object.
Definition: KeyPairUIDTab.cpp:452
void create_sign_list()
Create a sign list object.
Definition: KeyPairUIDTab.cpp:145
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_selected()
Get the uid selected object.
Definition: KeyPairUIDTab.cpp:431
SignIdArgsListPtr get_sign_selected()
Get the sign selected object.
Definition: KeyPairUIDTab.cpp:441
UIDArgsListPtr get_uid_checked()
Get the uid checked object.
Definition: KeyPairUIDTab.cpp:315
Definition: FileReadTask.cpp:31