libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
avatar.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2017 Kitsune Ral <kitsune-ral@users.sf.net>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include "util.h"
7
8#include <QtCore/QFuture>
9#include <QtCore/QUrl>
10#include <QtGui/QIcon>
11
12#include <functional>
13
14namespace Quotient {
15class Connection;
16
18public:
19 explicit Avatar(Connection* parent, const QUrl& url = {});
20
21#ifdef __cpp_lib_move_only_function // AppleClang 15 doesn't have it
22 using get_callback_t = std::move_only_function<void()>;
24#else
25 using get_callback_t = std::function<void()>;
27#endif
28
29
32
33 [[deprecated("Use the QFuture-returning overload instead")]]
35 [[deprecated("Use the QFuture-returning overload instead")]]
39
40 bool isEmpty() const;
42 QUrl url() const;
43 bool updateUrl(const QUrl& newUrl);
44
45 static bool isUrlValid(const QUrl& u);
46
47private:
48 class Private;
50};
51} // namespace Quotient
#define QUOTIENT_API