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 <QDialog> 0010 0011 #include "libruqolawidgets_private_export.h" 0012 class CreateNewDiscussionWidget; 0013 class RocketChatAccount; 0014 class LIBRUQOLAWIDGETS_TESTS_EXPORT CreateNewDiscussionDialog : public QDialog 0015 { 0016 Q_OBJECT 0017 public: 0018 struct NewDiscussionInfo { 0019 QStringList users; 0020 QString discussionName; 0021 QString channelName; 0022 QString message; 0023 QString channelId; 0024 }; 0025 explicit CreateNewDiscussionDialog(RocketChatAccount *account, QWidget *parent = nullptr); 0026 ~CreateNewDiscussionDialog() override; 0027 0028 [[nodiscard]] NewDiscussionInfo newDiscussionInfo() const; 0029 0030 void setChannelInfo(const QString &name, const QString &channelId); 0031 void setDiscussionName(const QString &name); 0032 0033 [[nodiscard]] const QString &messageId() const; 0034 void setMessageId(const QString &newMessageId); 0035 0036 private: 0037 LIBRUQOLAWIDGETS_NO_EXPORT void readConfig(); 0038 LIBRUQOLAWIDGETS_NO_EXPORT void writeConfig(); 0039 LIBRUQOLAWIDGETS_NO_EXPORT void createNewDiscussion(); 0040 QString mMessageId; 0041 CreateNewDiscussionWidget *const mCreateNewDiscussionWidget; 0042 RocketChatAccount *const mCurrentRocketChatAccount; 0043 };