File indexing completed on 2024-05-12 16:27: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 "libruqolawidgets_private_export.h"
0010 #include "rooms/saveroomsettingsjob.h"
0011 #include <QDialog>
0012 class ChannelInfoWidget;
0013 class Room;
0014 class QDialogButtonBox;
0015 class RocketChatAccount;
0016 class LIBRUQOLAWIDGETS_TESTS_EXPORT ChannelInfoDialog : public QDialog
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit ChannelInfoDialog(Room *room, RocketChatAccount *account, QWidget *parent = nullptr);
0021     ~ChannelInfoDialog() override;
0022 
0023     [[nodiscard]] RocketChatRestApi::SaveRoomSettingsJob::SaveRoomSettingsInfo saveRoomSettingsInfo() const;
0024 
0025 private:
0026     LIBRUQOLAWIDGETS_NO_EXPORT void slotRoomNameValid(bool state);
0027     LIBRUQOLAWIDGETS_NO_EXPORT void slotFnameChanged(const QString &fname);
0028     LIBRUQOLAWIDGETS_NO_EXPORT void readConfig();
0029     LIBRUQOLAWIDGETS_NO_EXPORT void writeConfig();
0030     ChannelInfoWidget *const mChannelInfoWidget;
0031     QDialogButtonBox *const mButtonBox;
0032     QPushButton *mOkButton = nullptr;
0033     bool mIsATeam = false;
0034 };