IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QExtend::DevIL::DevILPlugin Class Reference

Plugin class, registered by Qt. More...

#include <plugin.hpp>

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

QExtend::DevIL::DevILPlugin::DevILPlugin (  ) 

A constructor, does not need to do anything.

QExtend::DevIL::DevILPlugin::~DevILPlugin (  ) 

A destructor, does not need to do anything.


Member Function Documentation

Capabilities QExtend::DevIL::DevILPlugin::capabilities ( QIODevice *  device,
const QByteArray &  format 
) const

Returns the list of the capacities of the format.

Author:
Thibaut Cuvelier

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

Parameters:
device A pointer to the device we will read from
format The extension of the file
Returns:
The list of capabilities for the format
QImageIOHandler* QExtend::DevIL::DevILPlugin::create ( QIODevice *  device,
const QByteArray &  format = QByteArray() 
) const

Creates a handler to manipulate the file.

Author:
Thibaut Cuvelier

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.

Parameters:
device A pointer to the device we will read from
format The extension of the file
Returns:
A pointer to the handler
QStringList QExtend::DevIL::DevILPlugin::keys (  )  const

Returns the list of the extensions of all the formats the plugin supports.

Author:
Thibaut Cuvelier

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

Returns:
The list of extensions
Responsable bénévole de la rubrique Qt : Thibaut Cuvelier -