File indexing completed on 2024-12-01 04:36:52
0001 /* 0002 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include "libruqolawidgets_private_export.h" 0009 #include <Prison/Barcode> 0010 #include <QWidget> 0011 class QLabel; 0012 namespace Prison 0013 { 0014 class Barcode; 0015 } 0016 class RocketChatAccount; 0017 class QLineEdit; 0018 class LIBRUQOLAWIDGETS_TESTS_EXPORT MyAccount2FaTotpWidget : public QWidget 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit MyAccount2FaTotpWidget(RocketChatAccount *account, QWidget *parent = nullptr); 0023 ~MyAccount2FaTotpWidget() override; 0024 0025 Q_SIGNALS: 0026 void show2FaEnabledWidget(); 0027 0028 private: 0029 LIBRUQOLAWIDGETS_NO_EXPORT void slotTotpResult(const QString &secret, const QString &url); 0030 LIBRUQOLAWIDGETS_NO_EXPORT void slotVerify(); 0031 LIBRUQOLAWIDGETS_NO_EXPORT void slotTotpInvalid(); 0032 LIBRUQOLAWIDGETS_NO_EXPORT void slotTotpValid(const QStringList &listCodes); 0033 std::optional<Prison::Barcode> mQRCode; 0034 QLabel *const mTotpQrCode; 0035 QLabel *const mQrCoreLabel; 0036 QLineEdit *const mVerifyQrCode; 0037 RocketChatAccount *const mRocketChatAccount; 0038 };