aboutsummaryrefslogtreecommitdiff
path: root/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-25 19:48:08 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-25 19:48:08 +0900
commit80f7e44e1a9056fc55147718dd2812eb93925ec1 (patch)
treeb6d1014f736b8c75e05e1dea8157e7ed04cc7820 /room.h
parent3a913f33853c675a1051460bc36278be20a4c941 (diff)
downloadlibquotient-80f7e44e1a9056fc55147718dd2812eb93925ec1.tar.gz
libquotient-80f7e44e1a9056fc55147718dd2812eb93925ec1.zip
Room, User: expose avatarMediaId(); declare User for the metatype system
To make it easy to use User objects and fetch room and user avatars from QML. Closes #155.
Diffstat (limited to 'room.h')
-rw-r--r--room.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/room.h b/room.h
index d2962d95..b908a763 100644
--- a/room.h
+++ b/room.h
@@ -104,7 +104,9 @@ namespace QMatrixClient
Q_PROPERTY(QString canonicalAlias READ canonicalAlias NOTIFY namesChanged)
Q_PROPERTY(QString displayName READ displayName NOTIFY namesChanged)
Q_PROPERTY(QString topic READ topic NOTIFY topicChanged)
+ Q_PROPERTY(QString avatarMediaId READ avatarMediaId NOTIFY avatarChanged STORED false)
Q_PROPERTY(QUrl avatarUrl READ avatarUrl NOTIFY avatarChanged)
+
Q_PROPERTY(int timelineSize READ timelineSize NOTIFY addedMessages)
Q_PROPERTY(QStringList memberNames READ memberNames NOTIFY memberListChanged)
Q_PROPERTY(int memberCount READ memberCount NOTIFY memberListChanged)
@@ -132,6 +134,7 @@ namespace QMatrixClient
QString canonicalAlias() const;
QString displayName() const;
QString topic() const;
+ QString avatarMediaId() const;
QUrl avatarUrl() const;
Q_INVOKABLE JoinState joinState() const;
Q_INVOKABLE QList<User*> usersTyping() const;