From a78ae0e75225629563ce253308e9b88383b0ea4d Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 26 Feb 2019 14:11:37 +0900 Subject: Room::avatarObject Closes #268. --- lib/room.cpp | 5 +++++ lib/room.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/room.cpp b/lib/room.cpp index 8395baca..5da9373e 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -404,6 +404,11 @@ QUrl Room::avatarUrl() const return d->avatar.url(); } +const Avatar& Room::avatarObject() const +{ + return d->avatar; +} + QImage Room::avatar(int dimension) { return avatar(dimension, dimension); diff --git a/lib/room.h b/lib/room.h index a9341bd2..f4ecef42 100644 --- a/lib/room.h +++ b/lib/room.h @@ -33,6 +33,7 @@ namespace QMatrixClient { class Event; + class Avatar; class SyncRoomData; class RoomMemberEvent; class Connection; @@ -158,6 +159,7 @@ namespace QMatrixClient QString topic() const; QString avatarMediaId() const; QUrl avatarUrl() const; + const Avatar& avatarObject() const; Q_INVOKABLE JoinState joinState() const; Q_INVOKABLE QList usersTyping() const; QList membersLeft() const; -- cgit v1.2.3