Kstars

imageprovider.h
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
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:
20  ImageProvider();
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
void addImage(const QString &id, QImage image)
Add image to the list of images with the given id.
virtual QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override
Get image by id.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.