File indexing completed on 2024-05-19 05:04:01
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "asktwoauthenticationpasswordwidget.h" 0008 #include "misc/twoauthenticationpasswordwidget.h" 0009 #include <QVBoxLayout> 0010 0011 AskTwoAuthenticationPasswordWidget::AskTwoAuthenticationPasswordWidget(QWidget *parent) 0012 : QWidget(parent) 0013 , mTwoFactorAuthenticationPasswordLineEdit(new TwoAuthenticationPasswordWidget(this)) 0014 { 0015 auto mainLayout = new QVBoxLayout(this); 0016 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0017 mainLayout->setContentsMargins({}); 0018 mTwoFactorAuthenticationPasswordLineEdit->setObjectName(QStringLiteral("mTwoFactorAuthenticationPasswordLineEdit")); 0019 mainLayout->addWidget(mTwoFactorAuthenticationPasswordLineEdit); 0020 connect(mTwoFactorAuthenticationPasswordLineEdit, 0021 &TwoAuthenticationPasswordWidget::updateButtonOk, 0022 this, 0023 &AskTwoAuthenticationPasswordWidget::updateButtonOk); 0024 } 0025 0026 AskTwoAuthenticationPasswordWidget::~AskTwoAuthenticationPasswordWidget() = default; 0027 0028 QString AskTwoAuthenticationPasswordWidget::code() const 0029 { 0030 return mTwoFactorAuthenticationPasswordLineEdit->code(); 0031 } 0032 0033 RocketChatAccount *AskTwoAuthenticationPasswordWidget::rocketChatAccount() const 0034 { 0035 return mTwoFactorAuthenticationPasswordLineEdit->rocketChatAccount(); 0036 } 0037 0038 void AskTwoAuthenticationPasswordWidget::setRocketChatAccount(RocketChatAccount *newRocketChatAccount) 0039 { 0040 mTwoFactorAuthenticationPasswordLineEdit->setRocketChatAccount(newRocketChatAccount); 0041 } 0042 0043 #include "moc_asktwoauthenticationpasswordwidget.cpp"