Public Member Functions | Static Public Member Functions

ReaderStorage Class Reference

Container for ReaderStorageItem. More...

#include <readerstorage.h>

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

ReaderStorage::ReaderStorage (  ) 

Member Function Documentation

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.

Parameters:
uniqueKey,It's a unique key for each ReaderStorageItem instance.
file which will be loaded into the buffer.
MimeType of the given file.
Returns:
created QImageReader instance
void ReaderStorage::discardReader ( int  uniqueKey  ) 

Discards the ReaderStorageItem from the QCache container.

Parameters:
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.

Parameters:
uniqueKey,It's a unique key for each ReaderStorageItem instance.
Returns:
QuillImageFilter error code.
QImageReader * ReaderStorage::getReaderFromStorage ( int  uniqueKey  ) 

Returns the QImageReader from the ReaderStorageItem associted with the key.

Parameters:
uniqueKey,It's a unique key for each ReaderStorageItem instance.
Returns:
QImageReader instance which was previously loaded.
bool ReaderStorage::isJpeg ( const QByteArray &  format  )  [static]

Helper function to detect the jpeg format.


The documentation for this class was generated from the following files: