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

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 #include <QDialog>
0009 
0010 #include "accountmanager.h"
0011 #include "libruqolawidgets_private_export.h"
0012 class CreateNewServerStackWidget;
0013 class QPushButton;
0014 class LIBRUQOLAWIDGETS_TESTS_EXPORT CreateNewServerDialog : public QDialog
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit CreateNewServerDialog(QWidget *parent = nullptr);
0019     ~CreateNewServerDialog() override;
0020     [[nodiscard]] AccountManager::AccountManagerInfo accountInfo() const;
0021     void setAccountInfo(const AccountManager::AccountManagerInfo &info);
0022     void setExistingAccountName(const QStringList &lst);
0023 
0024 Q_SIGNALS:
0025     void authentication(AuthenticationManager::AuthMethodType type);
0026 
0027 private:
0028     LIBRUQOLAWIDGETS_NO_EXPORT void readConfig();
0029     LIBRUQOLAWIDGETS_NO_EXPORT void writeConfig();
0030     CreateNewServerStackWidget *const mCreateNewServerStackWidget;
0031     QPushButton *mOkButton = nullptr;
0032 };