Working class, mentioned by a QImageIOPlugin.
More...
#include <handler.hpp>
List of all members.
Public Member Functions |
| DevILHandler () |
| A constructor, does only the DevIL's initialization.
|
| ~DevILHandler () |
| A destructor, does not need to do anything.
|
void | setDevice (QIODevice *device) |
| Sets the device the class will read from and write on.
|
QIODevice * | device () const |
| Returns the device the class read from and write on.
|
bool | canRead () const |
| Returns whether DevIL can understand the device, if setted.
|
bool | canRead (QIODevice *device) |
| Returns whether DevIL can understand the provided device.
|
bool | read (QImage *image) |
| Loads the image from the device and sets it into image.
|
bool | write (const QImage &image) |
| Writes the image to the device from image.
|
QVariant | option (ImageOption option) const |
void | setOption (ImageOption option, const QVariant &value) |
bool | supportsOption (ImageOption option) const |
int | loopCount () const |
int | nextImageDelay () const |
int | imageCount () const |
bool | jumpToImage (int imageNumber) const |
void | setFormat (const QByteArray &format) |
ILenum | format () const |
QByteArray | format () const |
Detailed Description
Working class, mentioned by a QImageIOPlugin.
This class is doing all the job: it keeps the plugin's interface clean and all the job for its own business. Here we will load the files, parse them, give them to QImage, take them back, write them in files when asked to: the servant class, in a word.
Definition at line 64 of file handler.hpp.
Constructor & Destructor Documentation
QExtend::DevIL::DevILHandler::DevILHandler |
( |
|
) |
|
A constructor, does only the DevIL's initialization.
QExtend::DevIL::DevILHandler::~DevILHandler |
( |
|
) |
|
A destructor, does not need to do anything.
Member Function Documentation
bool QExtend::DevIL::DevILHandler::canRead |
( |
|
) |
const |
Returns whether DevIL can understand the device, if setted.
- Author:
- Thibaut Cuvelier
If a device is loaded, check whether DevIL is able to load the image the device contains. If it is not loaded, what can I do?
- Returns:
- Whether DevIL can read the device
- See also:
- canRead
bool QExtend::DevIL::DevILHandler::canRead |
( |
QIODevice * |
device |
) |
|
Returns whether DevIL can understand the provided device.
- Author:
- Thibaut Cuvelier
If the device is loadable, check whether DevIL is able to load the image the device contains. If it is not, what can I do?
- Returns:
- Whether DevIL can read the device
- See also:
- canRead
QIODevice* QExtend::DevIL::DevILHandler::device |
( |
|
) |
const |
Returns the device the class read from and write on.
- Author:
- Thibaut Cuvelier
Returns the device of the the handler to device. The image handler uses this device when reading and writing images.
- Returns:
- The device the handler reads and writes
- See also:
- setDevice
QByteArray QExtend::DevIL::DevILHandler::format |
( |
|
) |
const |
ILenum QExtend::DevIL::DevILHandler::format |
( |
|
) |
const |
int QExtend::DevIL::DevILHandler::imageCount |
( |
|
) |
const |
bool QExtend::DevIL::DevILHandler::jumpToImage |
( |
int |
imageNumber |
) |
const |
int QExtend::DevIL::DevILHandler::loopCount |
( |
|
) |
const |
int QExtend::DevIL::DevILHandler::nextImageDelay |
( |
|
) |
const |
QVariant QExtend::DevIL::DevILHandler::option |
( |
ImageOption |
option |
) |
const |
bool QExtend::DevIL::DevILHandler::read |
( |
QImage * |
image |
) |
|
Loads the image from the device and sets it into image.
- Author:
- Thibaut Cuvelier
As the device is loaded, we can read it and ask DevIL to decypher it so that we can store it into image.
- Returns:
- Whether DevIL could read the image
- Parameters:
-
| image | A pointer to the image loaded |
- See also:
- write
void QExtend::DevIL::DevILHandler::setDevice |
( |
QIODevice * |
device |
) |
|
Sets the device the class will read from and write on.
- Author:
- Thibaut Cuvelier
Sets the device of the the handler to device. The image handler will use this device when reading and writing images.
This function must be called before any canRead(), read(), write(), etc.
- Parameters:
-
| device | The device to read and write |
- See also:
- device
void QExtend::DevIL::DevILHandler::setFormat |
( |
const QByteArray & |
format |
) |
|
void QExtend::DevIL::DevILHandler::setOption |
( |
ImageOption |
option, |
|
|
const QVariant & |
value | |
|
) |
| | |
bool QExtend::DevIL::DevILHandler::supportsOption |
( |
ImageOption |
option |
) |
const |
bool QExtend::DevIL::DevILHandler::write |
( |
const QImage & |
image |
) |
|
Writes the image to the device from image.
- Author:
- Thibaut Cuvelier
As the device is loaded, we can write it and ask DevIL to cypher image into it.
- Returns:
- Whether DevIL could write the image
- Parameters:
-
| image | The address of the image to write |
- See also:
- read