ImageProvider

Search for usage in LXR

ImageProvider Class Reference

#include <imageprovider.h>

Inheritance diagram for ImageProvider:

Public Member Functions

void addImage (const QString &id, QImage image)
 
virtual QImage requestImage (const QString &id, QSize *size, const QSize &requestedSize) override
 
- Public Member Functions inherited from QQuickImageProvider
 QQuickImageProvider (QQmlImageProviderBase::ImageType type, QQmlImageProviderBase::Flags flags)
 
virtual QQmlImageProviderBase::Flags flags () const const override
 
virtual QQmlImageProviderBase::ImageType imageType () const const override
 
virtual QPixmap requestPixmap (const QString &id, QSize *size, const QSize &requestedSize)
 
virtual QQuickTextureFactoryrequestTexture (const QString &id, QSize *size, const QSize &requestedSize)
 

Additional Inherited Members

- Public Types inherited from QQmlImageProviderBase
enum  Flag
 
enum  ImageType
 
- Public Attributes inherited from QQmlImageProviderBase
typedef Flags
 
 ForceAsynchronousImageLoading
 
 Image
 
 ImageResponse
 
 Invalid
 
 Pixmap
 
 Texture
 

Detailed Description

This class makes it possible to use QImages from C++ in QML

Author
Artem Fedoskin
Version
1.0

Definition at line 17 of file imageprovider.h.

Member Function Documentation

◆ addImage()

void ImageProvider::addImage ( const QString id,
QImage  image 
)

Add image to the list of images with the given id.

Definition at line 18 of file imageprovider.cpp.

◆ requestImage()

QImage ImageProvider::requestImage ( const QString id,
QSize size,
const QSize requestedSize 
)
overridevirtual

Get image by id.

Returns
image of size requestedSize

Reimplemented from QQuickImageProvider.

Definition at line 11 of file imageprovider.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Jun 5 2023 03:56:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.