diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-31 08:53:32 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-31 08:53:32 +0900 |
commit | 0b5f0deb773f850d1b905fafc656f67f5b63de24 (patch) | |
tree | b5e0ad5a4558a86d9c95a5d14cc3595e0fa2b5d8 /room.h | |
parent | cbfe29b3435fbe47fee268facbe6a82000fce0ad (diff) | |
parent | 2c440249052b0d518fccd953a7dc657f9eed7ab7 (diff) | |
download | libquotient-0b5f0deb773f850d1b905fafc656f67f5b63de24.tar.gz libquotient-0b5f0deb773f850d1b905fafc656f67f5b63de24.zip |
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'room.h')
-rw-r--r-- | room.h | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -18,8 +18,9 @@ #pragma once -#include <memory> -#include <deque> +#include "jobs/syncjob.h" +#include "events/roommessageevent.h" +#include "joinstate.h" #include <QtCore/QList> #include <QtCore/QStringList> @@ -27,9 +28,9 @@ #include <QtCore/QJsonObject> #include <QtGui/QPixmap> -#include "jobs/syncjob.h" -#include "events/roommessageevent.h" -#include "joinstate.h" +#include <memory> +#include <deque> +#include <utility> namespace QMatrixClient { @@ -56,11 +57,7 @@ namespace QMatrixClient index_t index() const { return idx; } // Used for event redaction - RoomEventPtr replaceEvent(RoomEventPtr&& other) - { - evt.swap(other); - return move(other); - } + RoomEventPtr replaceEvent(RoomEventPtr&& other); private: RoomEventPtr evt; @@ -111,11 +108,20 @@ namespace QMatrixClient Q_INVOKABLE int timelineSize() const; /** - * Returns a room avatar and requests it from the network if needed + * Returns a square room avatar with the given size and requests it + * from the network if needed + * @return a pixmap with the avatar or a placeholder if there's none + * available yet + */ + Q_INVOKABLE QImage avatar(int dimension); + /** + * Returns a room avatar with the given dimensions and requests it + * from the network if needed * @return a pixmap with the avatar or a placeholder if there's none * available yet */ - Q_INVOKABLE QPixmap avatar(int width, int height); + Q_INVOKABLE QImage avatar(int width, int height); + /** * @brief Produces a disambiguated name for a given user in * the context of the room |