File indexing completed on 2024-12-01 04:37:05

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 "addteamroomcompletionlineedit.h"
0010 #include "libruqolawidgets_private_export.h"
0011 #include <QMap>
0012 #include <QWidget>
0013 class FlowLayout;
0014 class ClickableWidget;
0015 class RocketChatAccount;
0016 class LIBRUQOLAWIDGETS_TESTS_EXPORT TeamSearchRoomForTeamWidget : public QWidget
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit TeamSearchRoomForTeamWidget(RocketChatAccount *account, QWidget *parent = nullptr);
0021     ~TeamSearchRoomForTeamWidget() override;
0022 
0023     [[nodiscard]] QStringList roomIds() const;
0024     QStringList names() const;
0025 Q_SIGNALS:
0026     void textChanged(const QString &str);
0027     void userListChanged(bool isNotEmpty);
0028 
0029 private:
0030     LIBRUQOLAWIDGETS_NO_EXPORT void slotRemoveRoom(const QString &name);
0031     LIBRUQOLAWIDGETS_NO_EXPORT void slotAddNewName(const AddTeamRoomCompletionLineEdit::RoomCompletionInfo &info);
0032     AddTeamRoomCompletionLineEdit *const mSearchRoomLineEdit;
0033     FlowLayout *const mFlowLayout;
0034     QMap<QString, ClickableWidget *> mMap;
0035 };