Plugin class, registered by Qt. More...
#include <plugin.hpp>
Public Member Functions | |
DevILPlugin () | |
A constructor, does not need to do anything. | |
~DevILPlugin () | |
A destructor, does not need to do anything. | |
QStringList | keys () const |
Returns the list of the extensions of all the formats the plugin supports. | |
Capabilities | capabilities (QIODevice *device, const QByteArray &format) const |
Returns the list of the capacities of the format. | |
QImageIOHandler * | create (QIODevice *device, const QByteArray &format=QByteArray()) const |
Creates a handler to manipulate the file. |
Plugin class, registered by Qt.
This class is just an interface for Qt: it just says what the plug-in can do and creates a handler when asked, this handler will do all QImage want.
Definition at line 47 of file plugin.hpp.
QExtend::DevIL::DevILPlugin::DevILPlugin | ( | ) |
A constructor, does not need to do anything.
QExtend::DevIL::DevILPlugin::~DevILPlugin | ( | ) |
A destructor, does not need to do anything.
Capabilities QExtend::DevIL::DevILPlugin::capabilities | ( | QIODevice * | device, | |
const QByteArray & | format | |||
) | const |
Returns the list of the capacities of the format.
If there is no format or if the device is not ready to be read, the capabilities returned are empty. If this function can work normally, it checks whether the format is recognized to be readable or readable and writable by DevIL via a hardcoded list. Thus we return the capabilities. This is a constant method. http://openil.sourceforge.net/features.php
device | A pointer to the device we will read from | |
format | The extension of the file |
QImageIOHandler* QExtend::DevIL::DevILPlugin::create | ( | QIODevice * | device, | |
const QByteArray & | format = QByteArray() | |||
) | const |
Creates a handler to manipulate the file.
This function is quite straightforward: it creates a new handler (DevILHandler), gives it what it needs (i.e. the device for reading and writing and the format), then returns it so that QImage can use it. This is a constant method.
device | A pointer to the device we will read from | |
format | The extension of the file |
QStringList QExtend::DevIL::DevILPlugin::keys | ( | ) | const |
Returns the list of the extensions of all the formats the plugin supports.
As asked by the Qt plugin system, this functions returns all the extensions of all the formats the plugin supports. It is obtained by adding the extensions to a QStringList. These extensions are found on the DevIL's website, I did not find a way to retrieve them automatically. This is a constant method. http://openil.sourceforge.net/features.php
© 2000-2023 - www.developpez.com