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

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 <QObject>
0010 #include <QPointer>
0011 
0012 #include "libruqolawidgets_private_export.h"
0013 class Room;
0014 class LIBRUQOLAWIDGETS_TESTS_EXPORT UsersInRoomMenu : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit UsersInRoomMenu(QObject *parent = nullptr);
0019     ~UsersInRoomMenu() override;
0020 
0021     void slotCustomContextMenuRequested(const QPoint &pos);
0022     void setRoom(Room *room);
0023     void setUserName(const QString &userName);
0024     void setUserId(const QString &userId);
0025     void setParentWidget(QWidget *parentWidget);
0026 
0027 private:
0028     LIBRUQOLAWIDGETS_NO_EXPORT void slotOpenConversation();
0029     LIBRUQOLAWIDGETS_NO_EXPORT void slotBlockUser();
0030     LIBRUQOLAWIDGETS_NO_EXPORT void slotIgnoreUser();
0031     LIBRUQOLAWIDGETS_NO_EXPORT void slotRemoveFromRoom();
0032     LIBRUQOLAWIDGETS_NO_EXPORT void slotUserInfo();
0033     QString mUserId;
0034     QString mUserName;
0035     QPointer<Room> mRoom;
0036     QWidget *mParentWidget = nullptr;
0037 };