File indexing completed on 2024-12-01 04:36:51

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqolawidgets_private_export.h"
0010 #include <QWidget>
0011 class KPasswordLineEdit;
0012 class RocketChatAccount;
0013 class LIBRUQOLAWIDGETS_TESTS_EXPORT TwoAuthenticationPasswordWidget : public QWidget
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit TwoAuthenticationPasswordWidget(QWidget *parent = nullptr);
0018     ~TwoAuthenticationPasswordWidget() override;
0019     [[nodiscard]] QString code() const;
0020 
0021     void clear();
0022 
0023     [[nodiscard]] RocketChatAccount *rocketChatAccount() const;
0024     void setRocketChatAccount(RocketChatAccount *newRocketChatAccount);
0025 
0026 Q_SIGNALS:
0027     void updateButtonOk(bool state);
0028 
0029 private:
0030     LIBRUQOLAWIDGETS_NO_EXPORT void slotSendNewEmailCode();
0031     KPasswordLineEdit *const mTwoFactorAuthenticationPasswordLineEdit;
0032     RocketChatAccount *mRocketChatAccount = nullptr;
0033 };