aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keypair_details/KeyDetailsDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-10-02 14:08:50 +0000
committerSaturneric <[email protected]>2021-10-02 14:16:27 +0000
commit3c65d087eeee687ac01af2e80f3dd538f9a2c230 (patch)
tree1e860dc6343c1897e2224a002f2ca44c574381b3 /src/ui/keypair_details/KeyDetailsDialog.cpp
parentThe basic functions of the core pass the test. (diff)
downloadGpgFrontend-3c65d087eeee687ac01af2e80f3dd538f9a2c230.tar.gz
GpgFrontend-3c65d087eeee687ac01af2e80f3dd538f9a2c230.zip
UI Framework Modified.
Diffstat (limited to 'src/ui/keypair_details/KeyDetailsDialog.cpp')
-rw-r--r--src/ui/keypair_details/KeyDetailsDialog.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/ui/keypair_details/KeyDetailsDialog.cpp b/src/ui/keypair_details/KeyDetailsDialog.cpp
index 0d94e584..54bc6286 100644
--- a/src/ui/keypair_details/KeyDetailsDialog.cpp
+++ b/src/ui/keypair_details/KeyDetailsDialog.cpp
@@ -24,21 +24,22 @@
#include "ui/keypair_details/KeyDetailsDialog.h"
-KeyDetailsDialog::KeyDetailsDialog(GpgFrontend::GpgContext *ctx, const GpgKey& key, QWidget *parent)
- : QDialog(parent) {
+namespace GpgFrontend::UI {
+KeyDetailsDialog::KeyDetailsDialog(const GpgKey& key, QWidget* parent)
+ : QDialog(parent) {
+ tabWidget = new QTabWidget();
+ tabWidget->addTab(new KeyPairDetailTab(key.id(), tabWidget), tr("KeyPair"));
+ tabWidget->addTab(new KeyPairUIDTab(key.id(), tabWidget), tr("UIDs"));
+ tabWidget->addTab(new KeyPairSubkeyTab(key.id(), tabWidget), tr("Subkeys"));
- tabWidget = new QTabWidget();
- tabWidget->addTab(new KeyPairDetailTab(ctx, key, tabWidget), tr("KeyPair"));
- tabWidget->addTab(new KeyPairUIDTab(ctx, key, tabWidget), tr("UIDs"));
- tabWidget->addTab(new KeyPairSubkeyTab(ctx, key, tabWidget), tr("Subkeys"));
+ auto* mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(tabWidget);
- auto *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(tabWidget);
-
- this->setAttribute(Qt::WA_DeleteOnClose, true);
- this->setLayout(mainLayout);
- this->setWindowTitle(tr("Key Details"));
- this->setModal(true);
- this->setMinimumSize(380, 620);
- this->show();
-} \ No newline at end of file
+ this->setAttribute(Qt::WA_DeleteOnClose, true);
+ this->setLayout(mainLayout);
+ this->setWindowTitle(tr("Key Details"));
+ this->setModal(true);
+ this->setMinimumSize(380, 620);
+ this->show();
+}
+} // namespace GpgFrontend::UI