diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-25 19:48:08 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-25 19:48:08 +0900 |
commit | 80f7e44e1a9056fc55147718dd2812eb93925ec1 (patch) | |
tree | b6d1014f736b8c75e05e1dea8157e7ed04cc7820 /avatar.cpp | |
parent | 3a913f33853c675a1051460bc36278be20a4c941 (diff) | |
download | libquotient-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 'avatar.cpp')
-rw-r--r-- | avatar.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -62,6 +62,11 @@ QImage Avatar::get(int width, int height, notifier_t notifier) const return d->get({width, height}, notifier); } +QString Avatar::mediaId() const +{ + return d->_url.authority() + d->_url.path(); +} + QImage Avatar::Private::get(QSize size, Avatar::notifier_t notifier) const { // FIXME: Alternating between longer-width and longer-height requests |