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
35
36 bool isEmpty() const;
38 QUrl url() const;
39 bool updateUrl(const QUrl& newUrl);
40
41 static bool isUrlValid(const QUrl& u);
42
43private:
44 class Private;
46};
47} // namespace Quotient
#define QUOTIENT_API