libkdegames
#include <kgimageprovider_p.h>
Public Member Functions | |
KgImageProvider (KgThemeProvider *provider) | |
QImage | requestImage (const QString &source, QSize *size, const QSize &requestedSize) |
Public Member Functions inherited from QDeclarativeImageProvider | |
QDeclarativeImageProvider (ImageType type) | |
virtual | ~QDeclarativeImageProvider () |
ImageType | imageType () const |
virtual QPixmap | requestPixmap (const QString &id, QSize *size, const QSize &requestedSize) |
Detailed Description
A QDeclarativeImageProvider that renders requested sprites and returns corresponding pixmap to the QML view.
- Since
- 4.11 This class is a QDeclarativeImageProvider that takes a KgThemeProvider in its constructor and uses it to get full path to SVGs. These theme SVGs are read and requested sprite pixmap is extracted and given to the QML image element that requests it.
For porting KDE games to QML, there is a KgItem QML component provided by KgCore QML plugin which is a small wrapper to request pixmaps from this KgImageProvider. See KgItem's documentation for details.
Definition at line 42 of file kgimageprovider_p.h.
Constructor & Destructor Documentation
KgImageProvider::KgImageProvider | ( | KgThemeProvider * | provider | ) |
Construcs a new KgImageProvider with the supplied KgThemeProvider.
- Parameters
-
provider The KgThemeProvider used to discover the game's themes.
Definition at line 24 of file kgimageprovider.cpp.
Member Function Documentation
|
virtual |
Reimplemented method that is called when a sprite pixmap is requested.
Reimplemented from QDeclarativeImageProvider.
Definition at line 37 of file kgimageprovider.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.