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

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 "createchannelteaminfo.h"
0010 #include "createnewchannelwidget.h"
0011 #include "libruqolawidgets_private_export.h"
0012 #include <QDialog>
0013 class CreateNewChannelWidget;
0014 class QPushButton;
0015 class RocketChatAccount;
0016 class LIBRUQOLAWIDGETS_TESTS_EXPORT CreateNewChannelDialog : public QDialog
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit CreateNewChannelDialog(RocketChatAccount *account, QWidget *parent = nullptr);
0021     ~CreateNewChannelDialog() override;
0022     [[nodiscard]] RocketChatRestApi::CreateChannelTeamInfo channelInfo(bool userMemberUserId) const;
0023 
0024     void setFeatures(CreateNewChannelWidget::Features features);
0025 
0026 private:
0027     LIBRUQOLAWIDGETS_NO_EXPORT void writeConfig();
0028     LIBRUQOLAWIDGETS_NO_EXPORT void readConfig();
0029     CreateNewChannelWidget *const mCreateNewChannelWidget;
0030     QPushButton *mOkButton = nullptr;
0031 };