Move ActionsHandler to being instantiated by RoomManager this will allow it to be accessed by RoomDrawer items as well

This commit is contained in:
James Graham
2023-10-21 18:29:52 +01:00
parent 681a0b1e93
commit 3473b75863
7 changed files with 31 additions and 14 deletions

View File

@@ -35,20 +35,18 @@ class ActionsHandler : public QObject
{
Q_OBJECT
QML_ELEMENT
/**
* @brief The room that messages will be sent to.
*/
Q_PROPERTY(NeoChatRoom *room READ room WRITE setRoom NOTIFY roomChanged)
QML_UNCREATABLE("")
public:
explicit ActionsHandler(QObject *parent = nullptr);
/**
* @brief The room that messages will be sent to.
*/
[[nodiscard]] NeoChatRoom *room() const;
void setRoom(NeoChatRoom *room);
Q_SIGNALS:
void roomChanged();
void showEffect(const QString &effect);
public Q_SLOTS: