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/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
62 void create_subkey_opera_menu();
63
69 const GpgSubKey& get_selected_subkey();
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
80 QLabel* key_size_var_label_;
81 QLabel* expire_var_label_;
82 QLabel* created_var_label_;
83 QLabel* algorithm_var_label_;
84 QLabel* key_id_var_label_;
85 QLabel* fingerprint_var_label_;
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: VerifyDetailsDialog.cpp:33
GpgFrontend::UI::KeySetExpireDateDialog
Definition: KeySetExpireDateDialog.h:41
GpgFrontend::GpgKey::GetId
std::string GetId() const
Definition: GpgKey.cpp:54
GpgFrontend::SingletonFunctionObject< GpgKeyGetter >::GetInstance
static GpgKeyGetter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:57
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:42
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:62
GpgFrontend::GpgKey::GetSubKeys
std::unique_ptr< std::vector< GpgSubKey > > GetSubKeys() const
Definition: GpgKey.cpp:153
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::GpgSubKey::GetFingerprint
std::string GetFingerprint() const
Definition: GpgSubKey.cpp:51
GpgFrontend::GpgKey::IsPrivateKey
bool IsPrivateKey() const
Definition: GpgKey.cpp:140
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:35
GpgFrontend::UI::KeyPairSubkeyTab::algorithm_var_label_
QLabel * algorithm_var_label_
Label containing the keys algorithm.
Definition: KeyPairSubkeyTab.h:83
GpgFrontend::GpgKeyGetter::GetKey
GpgKey GetKey(const std::string &fpr)
Get the Key object.
Definition: GpgKeyGetter.cpp:38
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:148
GpgFrontend::GpgKey
Definition: GpgKey.h:44