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 "e2epassworddecodekeywidget.h" 0008 #include <KLocalizedString> 0009 #include <KPasswordLineEdit> 0010 #include <QLabel> 0011 #include <QVBoxLayout> 0012 0013 E2ePasswordDecodeKeyWidget::E2ePasswordDecodeKeyWidget(QWidget *parent) 0014 : QWidget{parent} 0015 , mPassword(new KPasswordLineEdit(this)) 0016 { 0017 auto mainLayout = new QVBoxLayout(this); 0018 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0019 mainLayout->setContentsMargins({}); 0020 0021 auto label = 0022 new QLabel(i18n("To access your encrypted private groups and direct messages, enter your encryption password.\n" 0023 "You need to enter this password to encode/decode your messages on every client you use, since the key is not stored on the server."), 0024 this); 0025 label->setObjectName(QStringLiteral("label")); 0026 label->setWordWrap(true); 0027 mainLayout->addWidget(label); 0028 mPassword->setObjectName(QStringLiteral("mPassword")); 0029 mainLayout->addWidget(mPassword); 0030 } 0031 0032 E2ePasswordDecodeKeyWidget::~E2ePasswordDecodeKeyWidget() = default; 0033 0034 QString E2ePasswordDecodeKeyWidget::password() const 0035 { 0036 return mPassword->password(); 0037 } 0038 0039 #include "moc_e2epassworddecodekeywidget.cpp"