aboutsummaryrefslogtreecommitdiff
path: root/user.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-25 09:43:11 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-25 14:46:48 +0900
commitcb54a2a5f9e83a5076eb501e60e88846a4aa28df (patch)
tree71854c41cbec18b8e81a471a9be2247b1700e485 /user.h
parentd45298d5db97663f300879002a8e0ccdf6b8d523 (diff)
downloadlibquotient-cb54a2a5f9e83a5076eb501e60e88846a4aa28df.tar.gz
libquotient-cb54a2a5f9e83a5076eb501e60e88846a4aa28df.zip
Expose avatar URLs of Room and User as Q_PROPERTY
This is needed for QML integration. Closes #155.
Diffstat (limited to 'user.h')
-rw-r--r--user.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/user.h b/user.h
index 91dfdc09..3df188a1 100644
--- a/user.h
+++ b/user.h
@@ -33,6 +33,7 @@ namespace QMatrixClient
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QString displayName READ displayname NOTIFY nameChanged STORED false)
Q_PROPERTY(QString bridgeName READ bridged NOTIFY nameChanged STORED false)
+ Q_PROPERTY(QUrl avatarUrl READ avatarUrl NOTIFY avatarChanged)
public:
User(QString userId, Connection* connection);
~User() override;
@@ -61,7 +62,7 @@ namespace QMatrixClient
Q_INVOKABLE QImage avatar(int dimension);
Q_INVOKABLE QImage avatar(int requestedWidth, int requestedHeight);
- Q_INVOKABLE QUrl avatarUrl() const;
+ QUrl avatarUrl() const;
void processEvent(Event* event);