aboutsummaryrefslogtreecommitdiff
path: root/avatar.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-25 14:46:18 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-25 14:46:18 +0900
commitcbfe29b3435fbe47fee268facbe6a82000fce0ad (patch)
treee922f1a1505ff1d0a3cdaca56ed5fd151c3aa410 /avatar.h
parentb1dd0e7ea87842fb5ff9deb14beb3474136b06f3 (diff)
parenta4a1129385731c3999a6d5986a24fc069938245c (diff)
downloadlibquotient-cbfe29b3435fbe47fee268facbe6a82000fce0ad.tar.gz
libquotient-cbfe29b3435fbe47fee268facbe6a82000fce0ad.zip
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'avatar.h')
-rw-r--r--avatar.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/avatar.h b/avatar.h
index 60cf3779..e71fecd7 100644
--- a/avatar.h
+++ b/avatar.h
@@ -31,28 +31,18 @@ namespace QMatrixClient
class Avatar
{
public:
- explicit Avatar(Connection* connection, QIcon defaultIcon = {})
- : _defaultIcon(std::move(defaultIcon)), _connection(connection)
- { }
+ explicit Avatar(Connection* connection, QIcon defaultIcon = {});
+ ~Avatar();
using notifier_t = std::function<void()>;
QPixmap get(int w, int h, notifier_t notifier);
- QUrl url() const { return _url; }
+ QUrl url() const;
bool updateUrl(const QUrl& newUrl);
private:
- QUrl _url;
- QPixmap _originalPixmap;
- QIcon _defaultIcon;
-
- std::vector<QPair<QSize, QPixmap>> _scaledPixmaps;
-
- QSize _requestedSize;
- bool _valid = false;
- Connection* _connection;
- MediaThumbnailJob* _ongoingRequest = nullptr;
- std::vector<notifier_t> notifiers;
+ class Private;
+ QScopedPointer<Private> d;
};
} // namespace QMatrixClient