File indexing completed on 2024-12-08 04:34:21

0001 /*
0002   SPDX-FileCopyrightText: 2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "e2epassworddecodekeydialog.h"
0008 #include "e2epassworddecodekeywidget.h"
0009 #include <KLocalizedString>
0010 #include <QDialogButtonBox>
0011 #include <QVBoxLayout>
0012 
0013 E2ePasswordDecodeKeyDialog::E2ePasswordDecodeKeyDialog(QWidget *parent)
0014     : QDialog(parent)
0015     , mE2ePasswordDecodeKeyWidget(new E2ePasswordDecodeKeyWidget(this))
0016 {
0017     setWindowTitle(i18nc("@title:window", "Decode Key"));
0018     auto mainLayout = new QVBoxLayout(this);
0019     mainLayout->setObjectName(QStringLiteral("mainLayout"));
0020 
0021     mE2ePasswordDecodeKeyWidget->setObjectName(QStringLiteral("mE2ePasswordDecodeKeyWidget"));
0022     mainLayout->addWidget(mE2ePasswordDecodeKeyWidget);
0023 
0024     auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
0025     buttonBox->setObjectName(QStringLiteral("button"));
0026     connect(buttonBox, &QDialogButtonBox::accepted, this, &E2ePasswordDecodeKeyDialog::accept);
0027     connect(buttonBox, &QDialogButtonBox::rejected, this, &E2ePasswordDecodeKeyDialog::reject);
0028     mainLayout->addWidget(buttonBox);
0029 }
0030 
0031 E2ePasswordDecodeKeyDialog::~E2ePasswordDecodeKeyDialog() = default;
0032 
0033 QString E2ePasswordDecodeKeyDialog::password() const
0034 {
0035     return mE2ePasswordDecodeKeyWidget->password();
0036 }
0037 
0038 #include "moc_e2epassworddecodekeydialog.cpp"