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
GpgFrontend::UI::KeyPairSubkeyTab::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event) override
Definition: KeyPairSubkeyTab.cpp:318
GpgFrontend::UI::KeyPairSubkeyTab::expire_var_label_
QLabel * expire_var_label_
Label containing the keys expiration date.
Definition: KeyPairSubkeyTab.h:81
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::UI::KeySetExpireDateDialog
Definition: KeySetExpireDateDialog.h:42
GpgFrontend::GpgKey::GetId
std::string GetId() const
Definition: GpgKey.cpp:52
GpgFrontend::SingletonFunctionObject< GpgKeyGetter >::GetInstance
static GpgKeyGetter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::UI::KeyPairSubkeyTab::created_var_label_
QLabel * created_var_label_
Label containing the keys creation date.
Definition: KeyPairSubkeyTab.h:82
GpgFrontend::UI::KeyPairSubkeyTab::key_id_var_label_
QLabel * key_id_var_label_
Label containing the keys keyid.
Definition: KeyPairSubkeyTab.h:84
GpgFrontend::GpgKeyGetter
Definition: GpgKeyGetter.h:45
GpgFrontend::UI::KeyPairSubkeyTab::create_subkey_opera_menu
void create_subkey_opera_menu()
Create a subkey opera menu object.
Definition: KeyPairSubkeyTab.cpp:299
GpgFrontend::GpgKey::GetEmail
std::string GetEmail() const
Definition: GpgKey.cpp:60
GpgFrontend::GpgKey::GetSubKeys
std::unique_ptr< std::vector< GpgSubKey > > GetSubKeys() const
Definition: GpgKey.cpp:151
GpgFrontend::UI::KeyPairSubkeyTab::create_subkey_list
void create_subkey_list()
Create a subkey list object.
Definition: KeyPairSubkeyTab.cpp:141
GpgFrontend::UI::KeyPairSubkeyTab::key_size_var_label_
QLabel * key_size_var_label_
Label containing the keys key size.
Definition: KeyPairSubkeyTab.h:80
GpgFrontend::GpgKeyGetter::GetKey
GpgKey GetKey(const std::string &id, bool use_cache=true)
Get the Key object.
Definition: GpgKeyGetter.cpp:47
GpgFrontend::GpgSubKey::GetFingerprint
std::string GetFingerprint() const
Definition: GpgSubKey.cpp:51
GpgFrontend::GpgKey::IsPrivateKey
bool IsPrivateKey() const
Definition: GpgKey.cpp:138
GpgFrontend::UI::KeyPairSubkeyTab::KeyPairSubkeyTab
KeyPairSubkeyTab(const std::string &key, QWidget *parent)
Construct a new Key Pair Subkey Tab object.
Definition: KeyPairSubkeyTab.cpp:36
GpgFrontend::UI::KeyPairSubkeyTab
Definition: KeyPairSubkeyTab.h:39
GpgFrontend::GpgSubKey
Definition: GpgSubKey.h:43
GpgFrontend::UI::SignalStation::GetInstance
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
GpgFrontend::UI::KeyPairSubkeyTab::algorithm_var_label_
QLabel * algorithm_var_label_
Label containing the keys algorithm.
Definition: KeyPairSubkeyTab.h:83
GpgFrontend::UI::KeyPairSubkeyTab::fingerprint_var_label_
QLabel * fingerprint_var_label_
Label containing the keys fingerprint.
Definition: KeyPairSubkeyTab.h:85
GpgFrontend::UI::KeyPairSubkeyTab::get_selected_subkey
const GpgSubKey & get_selected_subkey()
Get the selected subkey object.
Definition: KeyPairSubkeyTab.cpp:324
GpgFrontend::GpgKey::IsHasMasterKey
bool IsHasMasterKey() const
Definition: GpgKey.cpp:146
GpgFrontend::GpgKey
Definition: GpgKey.h:41