File indexing completed on 2024-12-01 04:37:03
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 <QMap> 0011 #include <QPointer> 0012 #include <QWidget> 0013 class FlowLayout; 0014 class Room; 0015 class UsersInRoomLabel; 0016 class UsersForRoomFilterProxyModel; 0017 class RocketChatAccount; 0018 class LIBRUQOLAWIDGETS_TESTS_EXPORT UsersInRoomFlowWidget : public QWidget 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit UsersInRoomFlowWidget(QWidget *parent = nullptr); 0023 ~UsersInRoomFlowWidget() override; 0024 void setRoom(Room *room); 0025 0026 void setCurrentRocketChatAccount(RocketChatAccount *account); 0027 0028 protected: 0029 void showEvent(QShowEvent *event) override; 0030 0031 private: 0032 LIBRUQOLAWIDGETS_NO_EXPORT void loadMoreUsers(); 0033 LIBRUQOLAWIDGETS_NO_EXPORT void generateListUsersWidget(); 0034 LIBRUQOLAWIDGETS_NO_EXPORT void updateListUsersWidget(const QModelIndex &topLeft, const QModelIndex &bottomRight); 0035 LIBRUQOLAWIDGETS_NO_EXPORT void loadExternalDialog(); 0036 FlowLayout *const mFlowLayout; 0037 QPointer<Room> mRoom; 0038 // userId, UsersInRoomLabel 0039 QMap<QString, UsersInRoomLabel *> mListUsersWidget; 0040 UsersForRoomFilterProxyModel *const mUsersForRoomFilterProxyModel; 0041 QPointer<RocketChatAccount> mCurrentRocketChatAccount; 0042 };