C

QSafeBitmapResourceReader Class

class SafeRenderer::QSafeBitmapResourceReader

The QSafeBitmapResourceReader class provides the Qt resource file implementation of QSafeBitmapReader. More...

Header: #include <QSafeBitmapResourceReader>
Inherits: SafeRenderer::QSafeBitmapReader

Public Functions

Reimplemented Public Functions

virtual const SafeRenderer::QSafeBitmap *getBitmapByID(const SafeRenderer::quint32 hash) const override
virtual void loadBitmap(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg) override

Detailed Description

It is possible to link the data structures generated by Qt resource compiler into the Qt Safe Renderer binary. The generated data can be read and accessed using the QSafeBitmapResource class.

Member Function Documentation

QSafeBitmapResourceReader::QSafeBitmapResourceReader()

Constructs a QSafeBitmapResourceReader object.

[virtual] QSafeBitmapResourceReader::~QSafeBitmapResourceReader()

Destroys a QSafeBitmapResourceReader object.

[override virtual] const SafeRenderer::QSafeBitmap *QSafeBitmapResourceReader::getBitmapByID(const SafeRenderer::quint32 hash) const

Reimplements: QSafeBitmapReader::getBitmapByID(const SafeRenderer::quint32 hash) const.

Returns a pointer to the QSafeBitmap item. The hash value is the hash value of the bitmap file name. The hash can be calculated with qt_hash function.

[override virtual] void QSafeBitmapResourceReader::loadBitmap(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg)

Reimplements: QSafeBitmapReader::loadBitmap(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg).

Loads the bitmap fileInfo from the Qt resource data structure. The crcArg is ignored.

For more information about the Qt resource file system, see the QResource class documentation.

In case of a failure, the following exceptions will be thrown:

ConstantDescription
SafeRenderer::QSafeResource::FailureToOpenCould not find the file for reading.
SafeRenderer::QSafeBitmapReader::TooManyThe number of bitmaps exceeds the MAXIMUM value.

Available under certain Qt licenses.
Find out more.