QSafeBitmapResourceReader Class


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

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

Public Types

enum BitmapResourceReaderException { TooMany, SizeError, DataCorrupted }

Public Functions

virtual ~QSafeBitmapResourceReader()
virtual void loadBitmapFile(const qchar * const file, const quint32 crc)

Reimplemented Public Functions

virtual QSafeBitmap *getBitmapByID(const quint32 hash)

Detailed Description

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

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 Type Documentation

enum QSafeBitmapResourceReader::BitmapResourceReaderException

This enum describes exception values of the class QSafeBitmap

SafeRenderer::QSafeBitmapResourceReader::TooMany0The number of bitmaps exceeds the value defined in SafeRenderer::Constraints::MAXIMUM value.
SafeRenderer::QSafeBitmapResourceReader::SizeError1The bitmap data is too long to fit in a buffer, it exceeds SafeRenderer::Constraints::MAX_IMAGE_PIXELS, or its size does not match the defined width and height.
SafeRenderer::QSafeBitmapResourceReader::DataCorrupted2The read data does not pass a checksum.

Member Function Documentation


Constructs a QSafeBitmapResourceReader object.

[virtual] QSafeBitmapResourceReader::~QSafeBitmapResourceReader()

Destroys the instance of QSafeBitmapResourceReader. The destructor is virtual.

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

Reimplemented from QSafeBitmapReader::getBitmapByID().

Return 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.

[virtual] void QSafeBitmapResourceReader::loadBitmapFile(const qchar * const file, const quint32 crc)

Loads the bitmap file from the Qt resource data structure. The crc is ignored.

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

Available under certain Qt licenses.
Find out more.