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

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 <QWidget>
0010 
0011 #include "accountmanager.h"
0012 #include "libruqolawidgets_private_export.h"
0013 class AuthenticationOauthWidget;
0014 class AuthenticationLoginWidget;
0015 class LIBRUQOLAWIDGETS_TESTS_EXPORT CreateNewServerWidget : public QWidget
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit CreateNewServerWidget(QWidget *parent = nullptr);
0020     ~CreateNewServerWidget() override;
0021 
0022     [[nodiscard]] AccountManager::AccountManagerInfo accountInfo();
0023     void setAccountInfo(const AccountManager::AccountManagerInfo &info);
0024 
0025     void setExistingAccountName(const QStringList &lst);
0026 
0027 Q_SIGNALS:
0028     void updateOkButton(bool state);
0029     void authentication(AuthenticationManager::AuthMethodType type);
0030 
0031 private:
0032     AuthenticationOauthWidget *const mAuthenticationWidget;
0033     AuthenticationLoginWidget *const mAuthenticationLoginWidget;
0034     AccountManager::AccountManagerInfo mAccountInfo;
0035 };