KPeople

avatarimageprovider.h
1/*
2 SPDX-FileCopyrightText: 2022 Jonah BrĂ¼chert <jbb@kaidan.im>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#pragma once
8
9#include <QQuickImageProvider>
10
11/**
12 * @brief An image provider for displaying a contact's photo
13 *
14 * It is automatically available when importing the KPeople QML module.
15 *
16 * Image URIs for it can be retrieved from `KPeople.PersonData`'s `photoImageProviderUri` property,
17 * or from `KPeople.PersonsModel`'s `photoImageProviderUri` role.
18 *
19 * Example:
20 * \code
21 * Kirigami.Avatar {
22 * source: person.photoImageProviderUri
23 * }
24 * \endcode
25 *
26 * @since 5.93.0
27 */
29{
30public:
31 explicit AvatarImageProvider();
32
33 QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
34};
An image provider for displaying a contact's photo.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.