Container for ReaderStorageItem. More...
#include <readerstorage.h>
Public Member Functions | |
ReaderStorage () | |
QImageReader * | createImageReader (int uniqueKey, const QString &fileName, const QByteArray &format) |
Creates ReaderStorageItem by loading the file data into QImageReader. | |
QImageReader * | getReaderFromStorage (int uniqueKey) |
Returns the QImageReader from the ReaderStorageItem associted with the key. | |
QuillImageFilter::ImageFilterError | error (int uniqueKey) |
Accessor method for error code. | |
void | discardReader (int uniqueKey) |
Discards the ReaderStorageItem from the QCache container. | |
Static Public Member Functions | |
static bool | isJpeg (const QByteArray &format) |
Helper function to detect the jpeg format. |
Container for ReaderStorageItem.
ReaderStorageItem contains image buffer which is used by LoadFilter. Image buffer is created on demand and releases when it's not needed. Each LoadFilter will have unique ReaderStorageItem associated with integer key. So there would be similar files with different unique keys.
ReaderStorage::ReaderStorage | ( | ) |
QImageReader * ReaderStorage::createImageReader | ( | int | uniqueKey, | |
const QString & | fileName, | |||
const QByteArray & | format | |||
) |
Creates ReaderStorageItem by loading the file data into QImageReader.
After creating the storage item, it's inserted into the QCache container.
uniqueKey,It's | a unique key for each ReaderStorageItem instance. | |
file | which will be loaded into the buffer. | |
MimeType | of the given file. |
void ReaderStorage::discardReader | ( | int | uniqueKey | ) |
Discards the ReaderStorageItem from the QCache container.
uniqueKey,It's | a unique key for each ReaderStorageItem instance. |
QuillImageFilter::ImageFilterError ReaderStorage::error | ( | int | uniqueKey | ) |
Accessor method for error code.
Errocode is associated with each ReaderStorageItem.
uniqueKey,It's | a unique key for each ReaderStorageItem instance. |
QImageReader * ReaderStorage::getReaderFromStorage | ( | int | uniqueKey | ) |
Returns the QImageReader from the ReaderStorageItem associted with the key.
uniqueKey,It's | a unique key for each ReaderStorageItem instance. |
bool ReaderStorage::isJpeg | ( | const QByteArray & | format | ) | [static] |
Helper function to detect the jpeg format.