Kstars

imageprovider.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5#ifndef IMAGEPROVIDER_H_
6#define IMAGEPROVIDER_H_
7
8#include <QQuickImageProvider>
9
10/**
11 * @class ImageProvider
12 * This class makes it possible to use QImages from C++ in QML
13 *
14 * @author Artem Fedoskin
15 * @version 1.0
16 */
18{
19 public:
21 /** @short Get image by id
22 * @return image of size requestedSize
23 **/
24 virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override;
25 /**
26 * @short Add image to the list of images with the given id
27 */
28 void addImage(const QString &id, QImage image);
29
30 private:
32};
33#endif
This class makes it possible to use QImages from C++ in QML.
virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override
Get image by id.
void addImage(const QString &id, QImage image)
Add image to the list of images with the given id.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.