summary refs log tree commit diff
path: root/include/TopRoomBar.h
diff options
context:
space:
mode:
authorMax Sandholm <max@sandholm.org>2017-10-01 19:49:36 +0300
committermujx <mujx@users.noreply.github.com>2017-10-01 19:49:36 +0300
commit7ad45d8d6448c60b4c81c80fa8d6d81afd6e4a02 (patch)
tree821124200c7dac85128790115d527791c1fc4945 /include/TopRoomBar.h
parentMore badges (diff)
downloadnheko-7ad45d8d6448c60b4c81c80fa8d6d81afd6e4a02.tar.xz
React to externally left and joined rooms, and add "leave room" button in room menu (#75)
* Initial "join room" feature.
* React correctly to remotely joined rooms.
* Leaving rooms implemented both locally using the room menu
   in nheko, and reacting properly when leaving a room remotely 
   from another client.
Diffstat (limited to 'include/TopRoomBar.h')
-rw-r--r--include/TopRoomBar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/TopRoomBar.h b/include/TopRoomBar.h

index 6b24cbef..5d8b394e 100644 --- a/include/TopRoomBar.h +++ b/include/TopRoomBar.h
@@ -29,7 +29,9 @@ #include "Avatar.h" #include "FlatButton.h" +#include "LeaveRoomDialog.h" #include "Menu.h" +#include "OverlayModal.h" #include "RoomSettings.h" static const QString URL_HTML = "<a href=\"\\1\" style=\"color: #333333\">\\1</a>"; @@ -51,9 +53,15 @@ public: void reset(); +signals: + void leaveRoom(); + protected: void paintEvent(QPaintEvent *event) override; +private slots: + void closeLeaveRoomDialog(bool leaving); + private: QHBoxLayout *topLayout_; QVBoxLayout *textLayout_; @@ -65,9 +73,13 @@ private: QMenu *menu_; QAction *toggleNotifications_; + QAction *leaveRoom_; FlatButton *settingsBtn_; + OverlayModal *leaveRoomModal; + LeaveRoomDialog *leaveRoomDialog_; + Avatar *avatar_; int buttonSize_;