diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-05-24 19:44:56 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-05-24 19:44:56 +0900 |
commit | c03d9b0a595caf8a2d3fbc225625c0e9a083a95c (patch) | |
tree | 8c1085dd37f7dd02f45792978ba9017765218887 /lib | |
parent | 73fec4b25d81b73f25309bfb3e274df7553341ea (diff) | |
download | libquotient-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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |