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
GpgFrontend::UI::KeyPairUIDTab::create_sign_popup_menu
void create_sign_popup_menu()
Create a sign popup menu object.
Definition: KeyPairUIDTab.cpp:527
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::GpgKey::GetId
std::string GetId() const
Definition: GpgKey.cpp:52
GpgFrontend::SingletonFunctionObject< GpgUIDOperator >::GetInstance
static GpgUIDOperator & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::UI::KeyPairUIDTab::get_sign_selected
SignIdArgsListPtr get_sign_selected()
Get the sign selected object.
Definition: KeyPairUIDTab.cpp:441
GpgFrontend::GpgKeyGetter
Definition: GpgKeyGetter.h:45
GpgFrontend::UI::KeyPairUIDTab::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event) override
Definition: KeyPairUIDTab.cpp:472
GpgFrontend::UI::KeyPairUIDTab::create_manage_uid_menu
void create_manage_uid_menu()
Create a manage uid menu object.
Definition: KeyPairUIDTab.cpp:325
GpgFrontend::UI::KeyPairUIDTab
Definition: KeyPairUIDTab.h:39
GpgFrontend::UI::KeyPairUIDTab::slot_add_uid_result
static void slot_add_uid_result(int result)
Definition: KeyPairUIDTab.cpp:348
GpgFrontend::UI::KeyPairUIDTab::create_sign_list
void create_sign_list()
Create a sign list object.
Definition: KeyPairUIDTab.cpp:142
GpgFrontend::GpgKeyGetter::GetKey
GpgKey GetKey(const std::string &id, bool use_cache=true)
Get the Key object.
Definition: GpgKeyGetter.cpp:47
GpgFrontend::UI::KeyPairUIDTab::create_uid_popup_menu
void create_uid_popup_menu()
Create a uid popup menu object.
Definition: KeyPairUIDTab.cpp:452
GpgFrontend::UI::KeyPairUIDTab::create_uid_list
void create_uid_list()
Create a uid list object.
Definition: KeyPairUIDTab.cpp:118
GpgFrontend::UI::KeyPairUIDTab::get_uid_checked
UIDArgsListPtr get_uid_checked()
Get the uid checked object.
Definition: KeyPairUIDTab.cpp:316
GpgFrontend::UI::KeyPairUIDTab::KeyPairUIDTab
KeyPairUIDTab(const std::string &key_id, QWidget *parent)
Construct a new Key Pair U I D Tab object.
Definition: KeyPairUIDTab.cpp:37
GpgFrontend::UI::KeyPairUIDTab::get_uid_selected
UIDArgsListPtr get_uid_selected()
Get the uid selected object.
Definition: KeyPairUIDTab.cpp:431
GpgFrontend::UI::SignalStation::GetInstance
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
GpgFrontend::GpgKey::GetUIDs
std::unique_ptr< std::vector< GpgUID > > GetUIDs() const
Definition: GpgKey.cpp:161
GpgFrontend::GpgKey::IsHasMasterKey
bool IsHasMasterKey() const
Definition: GpgKey.cpp:146
GpgFrontend::UI::KeyNewUIDDialog
Definition: KeyNewUIDDialog.h:35
GpgFrontend::GpgKey
Definition: GpgKey.h:41