C

QSafeLayoutResourceReader Class

class SafeRenderer::QSafeLayoutResourceReader

The QSafeLayoutResourceReader class reads the layout data from the Qt's resource structure. More...

Header: #include <QSafeLayoutResourceReader>
Since: QtSafeRenderer 1.0
Inherits: SafeRenderer::QSafeLayout

Public Functions

Reimplemented Public Functions

virtual const SafeRenderer::QSafeByteArray readDataFromFile(const SafeRenderer::qchar *const resourceFileArg) override
virtual void readLayout(const SafeRenderer::qchar *const resourceFileArg) override

Detailed Description

The QSafeLayoutResourceReader class reads the layout data from the Qt's resource structure.

Member Function Documentation

QSafeLayoutResourceReader::QSafeLayoutResourceReader()

Constructs an empty QSafeLayoutResourceReader that can be used to read a layout from given resource file.

[override virtual, since QtSafeRenderer 1.1] const SafeRenderer::QSafeByteArray QSafeLayoutResourceReader::readDataFromFile(const SafeRenderer::qchar *const resourceFileArg)

Reimplements: QSafeLayout::readDataFromFile(const SafeRenderer::qchar *const filenameArg).

Read data from a file resourceFileArg.

This function was introduced in QtSafeRenderer 1.1.

[override virtual, since QtSafeRenderer 3.0] void QSafeLayoutResourceReader::readLayout(const SafeRenderer::qchar *const resourceFileArg)

Reads the layout data from the given resource file resourceFileArg.

In case of a failure, an exception will be thrown:

ExceptionIdDescription
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::InvalidFilenameFilename was not provided.
SafeRenderer::QSafeBitmapExceptionSafeRenderer::QSafeBitmapException::BitmapException::TooManyThe number of bitmaps exceeds the MAXIMUM value.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::DataSizeMismatchLayout file's size is more than buffer's size.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::SizeErrorWidthThe width of the layout size too long.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::SizeErrorHeightThe height of the layout size too long.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::DataSizeMismatchThe layout file size is not multiple of the layout data size or layout data size is too small, or has too many layouts.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::InvalidLayoutVersionLayout version is not supported.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::CheckSumFailedLayout checksum value does not match with the data checksum.
SafeRenderer::QSafeLayoutExceptionSafeRenderer::QSafeLayoutException::LayoutException::TooLongFilenameBitmap's filename was too long to fit in buffer.
SafeRenderer::QSafeResourceExceptionSafeRenderer::QSafeResourceException::ResourceException::FailureToOpenCould not find the file for reading.

This function was introduced in QtSafeRenderer 3.0.

Available under certain Qt licenses.
Find out more.