aboutsummaryrefslogtreecommitdiff
path: root/user.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-25 19:54:17 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-25 19:54:17 +0900
commit2f83e4be20a15013181c1ba6944e21f051ccac9d (patch)
treeb6d1014f736b8c75e05e1dea8157e7ed04cc7820 /user.h
parentd45298d5db97663f300879002a8e0ccdf6b8d523 (diff)
parent80f7e44e1a9056fc55147718dd2812eb93925ec1 (diff)
downloadlibquotient-2f83e4be20a15013181c1ba6944e21f051ccac9d.tar.gz
libquotient-2f83e4be20a15013181c1ba6944e21f051ccac9d.zip
Merge branch 'kitsune-avatar-url-properties'
Diffstat (limited to 'user.h')
-rw-r--r--user.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/user.h b/user.h
index 91dfdc09..8a2c53d9 100644
--- a/user.h
+++ b/user.h
@@ -33,6 +33,8 @@ 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(QString avatarMediaId READ avatarMediaId NOTIFY avatarChanged STORED false)
+ Q_PROPERTY(QUrl avatarUrl READ avatarUrl NOTIFY avatarChanged)
public:
User(QString userId, Connection* connection);
~User() override;
@@ -57,11 +59,12 @@ namespace QMatrixClient
*/
QString bridged() const;
- const Avatar& avatarObject();
+ const Avatar& avatarObject() const;
Q_INVOKABLE QImage avatar(int dimension);
Q_INVOKABLE QImage avatar(int requestedWidth, int requestedHeight);
- Q_INVOKABLE QUrl avatarUrl() const;
+ QString avatarMediaId() const;
+ QUrl avatarUrl() const;
void processEvent(Event* event);
@@ -83,3 +86,4 @@ namespace QMatrixClient
Private* d;
};
}
+Q_DECLARE_METATYPE(QMatrixClient::User*)