C
QSafeLayoutFileReader Class
class SafeRenderer::QSafeLayoutFileReaderThe QSafeLayoutFileReader class reads the layout data from a file. More...
Header: | #include <QSafeLayoutFileReader> |
Since: | QtSafeRenderer 1.0 |
Inherits: | SafeRenderer::QSafeLayout |
Public Functions
QSafeLayoutFileReader() | |
QSafeLayoutFileReader(const SafeRenderer::qchar *const filenameArg) |
Reimplemented Public Functions
virtual const SafeRenderer::QSafeByteArray | readDataFromFile(const SafeRenderer::qchar *const filenameArg) override |
Member Function Documentation
QSafeLayoutFileReader::QSafeLayoutFileReader()
Constructs a safe layout file reader.
QSafeLayoutFileReader::QSafeLayoutFileReader(const SafeRenderer::qchar *const filenameArg)
Constructs a safe layout file reader that reads the layout data from the filenameArg.
The full path of the file can given to the filenameArg parameter. The bitmap data files must be located in the same path with the layout data file.
In case of a failure, one of the following exceptions are thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeBitmapException | SafeRenderer::QSafeBitmapException::BitmapException::TooMany | The number of bitmaps exceeds the Constraints::MAX_AMOUNT_OF_BITMAPS value. |
SafeRenderer::QSafeFileException | SafeRenderer::QSafeFileException::FileException::SeekError | Seek failed on opening the file. For example, the root cause for the error can be a filesystem error or a file that is a pipe. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::DataSizeMismatch | Layout file's size is more than buffer's size. |
SafeRenderer::QSafeFileException | SafeRenderer::QSafeFileException::FileException::ReadError | The requested number of bytes can not be read from the opened file. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::SizeErrorWidth | The width of the layout size too long. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::SizeErrorHeight | The height of the layout size too long. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::DataSizeMismatch | The layout file size is not multiple of the layout data size or layout data size is too small, or has too many layouts. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::InvalidLayoutVersion | Layout version is not supported. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::CheckSumFailed | Layout checksum value does not match with the data checksum. |
SafeRenderer::QSafeLayoutException | SafeRenderer::QSafeLayoutException::LayoutException::TooLongFilename | Bitmap's filename was too long to fit in buffer. |
[override virtual, since QtSafeRenderer 1.1]
const SafeRenderer::QSafeByteArray QSafeLayoutFileReader::readDataFromFile(const SafeRenderer::qchar *const filenameArg)
Reimplements: QSafeLayout::readDataFromFile(const SafeRenderer::qchar *const filenameArg).
Read file with filenameArg. Returns the pointer to the read data.
This function was introduced in QtSafeRenderer 1.1.
Available under certain Qt licenses.
Find out more.