summary refs log tree commit diff
path: root/include/RoomInfoListItem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/RoomInfoListItem.h')
-rw-r--r--include/RoomInfoListItem.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h

index 17c75fc3..40a1cbb0 100644 --- a/include/RoomInfoListItem.h +++ b/include/RoomInfoListItem.h
@@ -17,9 +17,13 @@ #pragma once +#include <QAction> +#include <QSharedPointer> #include <QWidget> +#include "Menu.h" #include "RippleOverlay.h" +#include "RoomSettings.h" #include "RoomState.h" class RoomInfoListItem : public QWidget @@ -27,7 +31,11 @@ class RoomInfoListItem : public QWidget Q_OBJECT public: - RoomInfoListItem(RoomState state, QString room_id, QWidget *parent = 0); + RoomInfoListItem(QSharedPointer<RoomSettings> settings, + RoomState state, + QString room_id, + QWidget *parent = 0); + ~RoomInfoListItem(); void updateUnreadMessageCount(int count); @@ -48,8 +56,11 @@ public slots: protected: void mousePressEvent(QMouseEvent *event) override; void paintEvent(QPaintEvent *event) override; + void contextMenuEvent(QContextMenuEvent *event) override; private: + QString notificationText(); + const int Padding = 7; const int IconSize = 46; @@ -64,6 +75,11 @@ private: QPixmap roomAvatar_; + Menu *menu_; + QAction *toggleNotifications_; + + QSharedPointer<RoomSettings> roomSettings_; + bool isPressed_ = false; int maxHeight_;