From 473b14ed0f8053348000db370451cfff3ce3ac13 Mon Sep 17 00:00:00 2001 From: Jedi18 Date: Thu, 11 Feb 2021 21:23:33 +0530 Subject: added roomversion, roomid etc --- src/ui/RoomSettings.cpp | 18 ++++++++++++++++++ src/ui/RoomSettings.h | 6 ++++++ 2 files changed, 24 insertions(+) (limited to 'src') diff --git a/src/ui/RoomSettings.cpp b/src/ui/RoomSettings.cpp index 785452d0..49e48e40 100644 --- a/src/ui/RoomSettings.cpp +++ b/src/ui/RoomSettings.cpp @@ -72,6 +72,24 @@ RoomSettings::roomName() const return QString(info_.name.c_str()); } +QString +RoomSettings::roomId() const +{ + return roomid_; +} + +QString +RoomSettings::roomVersion() const +{ + return QString::fromStdString(info_.version); +} + +int +RoomSettings::memberCount() const +{ + return info_.member_count; +} + void RoomSettings::retrieveRoomInfo() { diff --git a/src/ui/RoomSettings.h b/src/ui/RoomSettings.h index 098e27ba..f5cc043c 100644 --- a/src/ui/RoomSettings.h +++ b/src/ui/RoomSettings.h @@ -11,6 +11,9 @@ class RoomSettings : public QObject { Q_OBJECT Q_PROPERTY(QString roomName READ roomName CONSTANT) + Q_PROPERTY(QString roomId READ roomId CONSTANT) + Q_PROPERTY(QString roomVersion READ roomVersion CONSTANT) + Q_PROPERTY(int memberCount READ memberCount CONSTANT) Q_PROPERTY(int notifications READ notifications NOTIFY notificationsChanged) Q_PROPERTY(int accessJoinRules READ accessJoinRules NOTIFY accessJoinRulesChanged) Q_PROPERTY(bool canChangeJoinRules READ canChangeJoinRules CONSTANT) @@ -21,6 +24,9 @@ public: RoomSettings(QString roomid, QObject *parent = nullptr); QString roomName() const; + QString roomId() const; + QString roomVersion() const; + int memberCount() const; int notifications(); int accessJoinRules(); bool respondsToKeyRequests(); -- cgit 1.5.1