aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-24 19:44:56 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-05-24 19:44:56 +0900
commitc03d9b0a595caf8a2d3fbc225625c0e9a083a95c (patch)
tree8c1085dd37f7dd02f45792978ba9017765218887 /lib
parent73fec4b25d81b73f25309bfb3e274df7553341ea (diff)
downloadlibquotient-c03d9b0a595caf8a2d3fbc225625c0e9a083a95c.tar.gz
libquotient-c03d9b0a595caf8a2d3fbc225625c0e9a083a95c.zip
Room: Make isFavourite/LowPriority/DirectChat accessible from QML
The first two as Q_PROPERTYs, the last one as Q_INVOKABLE.
Diffstat (limited to 'lib')
-rw-r--r--lib/room.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/room.h b/lib/room.h
index 0d629e20..bdf4e1c1 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -121,6 +121,8 @@ namespace QMatrixClient
Q_PROPERTY(bool hasUnreadMessages READ hasUnreadMessages NOTIFY unreadMessagesChanged)
Q_PROPERTY(int unreadCount READ unreadCount NOTIFY unreadMessagesChanged)
Q_PROPERTY(QStringList tagNames READ tagNames NOTIFY tagsChanged)
+ Q_PROPERTY(bool isFavourite READ isFavourite NOTIFY tagsChanged)
+ Q_PROPERTY(bool isLowPriority READ isLowPriority NOTIFY tagsChanged)
public:
using Timeline = std::deque<TimelineItem>;
@@ -310,7 +312,7 @@ namespace QMatrixClient
bool isLowPriority() const;
/** Check whether this room is a direct chat */
- bool isDirectChat() const;
+ Q_INVOKABLE bool isDirectChat() const;
/** Get the list of users this room is a direct chat with */
QList<const User*> directChatUsers() const;