aboutsummaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/keypair_details/EditSubKeyDialog.h14
-rw-r--r--include/ui/keypair_details/KeyPairDetailTab.h8
-rw-r--r--include/ui/keypair_details/KeyPairSubkeyTab.h10
-rw-r--r--include/ui/keypair_details/KeySetExpireDateDialog.h33
4 files changed, 63 insertions, 2 deletions
diff --git a/include/ui/keypair_details/EditSubKeyDialog.h b/include/ui/keypair_details/EditSubKeyDialog.h
new file mode 100644
index 00000000..be926be7
--- /dev/null
+++ b/include/ui/keypair_details/EditSubKeyDialog.h
@@ -0,0 +1,14 @@
+//
+// Created by eric on 2021/6/2.
+//
+
+#ifndef GPGFRONTEND_EDITSUBKEY_H
+#define GPGFRONTEND_EDITSUBKEY_H
+
+
+class EditSubKeyDialog {
+
+};
+
+
+#endif //GPGFRONTEND_EDITSUBKEY_H
diff --git a/include/ui/keypair_details/KeyPairDetailTab.h b/include/ui/keypair_details/KeyPairDetailTab.h
index d6f1b4e1..6b3bc2f0 100644
--- a/include/ui/keypair_details/KeyPairDetailTab.h
+++ b/include/ui/keypair_details/KeyPairDetailTab.h
@@ -27,6 +27,7 @@
#include "GpgFrontend.h"
#include "gpg/GpgContext.h"
+#include "KeySetExpireDateDialog.h"
class KeyPairDetailTab : public QWidget {
Q_OBJECT
@@ -50,11 +51,16 @@ private slots:
*/
void slotCopyFingerprint();
+ void slotModifyEditDatetime();
+
+ void slotRefreshKeyInfo();
+
private:
QString *keyid; /** The id of the key the details should be shown for */
GpgME::GpgContext *mCtx; /** The current gpg-context */
+ const GpgKey &mKey;
QGroupBox *ownerBox; /** Groupbox containing owner information */
QGroupBox *keyBox; /** Groupbox containing key information */
@@ -73,7 +79,7 @@ private:
QLabel *usageVarLabel;
public:
- explicit KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey& key, QWidget *parent = nullptr);
+ explicit KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey& mKey, QWidget *parent = nullptr);
};
diff --git a/include/ui/keypair_details/KeyPairSubkeyTab.h b/include/ui/keypair_details/KeyPairSubkeyTab.h
index 45abe7a1..ae954968 100644
--- a/include/ui/keypair_details/KeyPairSubkeyTab.h
+++ b/include/ui/keypair_details/KeyPairSubkeyTab.h
@@ -39,7 +39,9 @@ public:
private:
- void creatSubkeyList();
+ void createSubkeyList();
+
+ void createSubkeyOperaMenu();
GpgME::GpgContext *mCtx;
const GpgKey &mKey;
@@ -49,6 +51,8 @@ private:
QGroupBox *listBox;
QGroupBox *detailBox;
+ QMenu *subkeyOperaMenu;
+
QLabel *keySizeVarLabel; /** Label containng the keys keysize */
QLabel *expireVarLabel; /** Label containng the keys expiration date */
@@ -67,6 +71,10 @@ private slots:
void slotRefreshSubkeyDetail();
+ void slotEditSubkey();
+
+ void slotRevokeSubkey();
+
};
diff --git a/include/ui/keypair_details/KeySetExpireDateDialog.h b/include/ui/keypair_details/KeySetExpireDateDialog.h
new file mode 100644
index 00000000..d0206402
--- /dev/null
+++ b/include/ui/keypair_details/KeySetExpireDateDialog.h
@@ -0,0 +1,33 @@
+//
+// Created by eric on 2021/6/3.
+//
+
+#ifndef GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H
+#define GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H
+
+#include "GpgFrontend.h"
+#include "gpg/GpgContext.h"
+#include "gpg/GpgKey.h"
+#include "gpg/GpgSubKey.h"
+
+class KeySetExpireDateDialog : public QDialog {
+Q_OBJECT
+public:
+ explicit KeySetExpireDateDialog(GpgME::GpgContext *ctx, const GpgKey &key, const GpgSubKey *subkey, QWidget *parent = nullptr);
+
+private:
+ GpgME::GpgContext *mCtx;
+ const GpgKey &mKey;
+ const GpgSubKey *mSubkey;
+
+ QDateTimeEdit *dateTimeEdit{};
+ QPushButton *confirmButton{};
+ QCheckBox *nonExpiredCheck{};
+
+private slots:
+ void slotConfirm();
+ void slotNonExpiredChecked(int state);
+};
+
+
+#endif //GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H