File indexing completed on 2024-12-22 04:45:39

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QDialog>
0010 
0011 #include "users/userscreatejob.h"
0012 
0013 #include "libruqolawidgets_private_export.h"
0014 class AdministratorAddUserWidget;
0015 class User;
0016 class RocketChatAccount;
0017 class RoleInfo;
0018 class LIBRUQOLAWIDGETS_TESTS_EXPORT AdministratorAddUserDialog : public QDialog
0019 {
0020     Q_OBJECT
0021 public:
0022     explicit AdministratorAddUserDialog(RocketChatAccount *account, QWidget *parent = nullptr);
0023     ~AdministratorAddUserDialog() override;
0024 
0025     [[nodiscard]] RocketChatRestApi::CreateUpdateUserInfo createInfo() const;
0026     [[nodiscard]] RocketChatRestApi::UpdateUserInfo updateInfo() const;
0027     void setUser(const User &user);
0028     void setRoleInfo(const QVector<RoleInfo> &info);
0029 
0030 private:
0031     AdministratorAddUserWidget *const mAdministratorWidget;
0032 };