Qt 4.8
|
#include <qgifhandler_p.h>
Public Functions | |
bool | canRead () const |
Returns true if an image can be read from the device (i. More... | |
int | currentImageNumber () const |
For image formats that support animation, this function returns the sequence number of the current image in the animation. More... | |
int | imageCount () const |
For image formats that support animation, this function returns the number of images in the animation. More... | |
int | loopCount () const |
For image formats that support animation, this function returns the number of times the animation should loop. More... | |
QByteArray | name () const |
Use format() instead. More... | |
int | nextImageDelay () const |
For image formats that support animation, this function returns the number of milliseconds to wait until reading the next image. More... | |
QVariant | option (ImageOption option) const |
Returns the value assigned to option as a QVariant. More... | |
QGifHandler () | |
bool | read (QImage *image) |
Read an image from the device, and stores it in image. More... | |
void | setOption (ImageOption option, const QVariant &value) |
Sets the option option with the value value. More... | |
bool | supportsOption (ImageOption option) const |
Returns true if the QImageIOHandler supports the option option; otherwise returns false. More... | |
bool | write (const QImage &image) |
Writes the image image to the assigned device. More... | |
~QGifHandler () | |
Public Functions inherited from QImageIOHandler | |
virtual QRect | currentImageRect () const |
Returns the rect of the current image. More... | |
QIODevice * | device () const |
Returns the device currently assigned to the QImageIOHandler. More... | |
QByteArray | format () const |
Returns the format that is currently assigned to QImageIOHandler. More... | |
virtual bool | jumpToImage (int imageNumber) |
For image formats that support animation, this function jumps to the image whose sequence number is imageNumber. More... | |
virtual bool | jumpToNextImage () |
For image formats that support animation, this function jumps to the next image. More... | |
QImageIOHandler () | |
Constructs a QImageIOHandler object. More... | |
void | setDevice (QIODevice *device) |
Sets the device of the QImageIOHandler to device. More... | |
void | setFormat (const QByteArray &format) |
Sets the format of the QImageIOHandler to format. More... | |
void | setFormat (const QByteArray &format) const |
Sets the format of the QImageIOHandler to format. More... | |
virtual | ~QImageIOHandler () |
Destructs the QImageIOHandler object. More... | |
Static Public Functions | |
static bool | canRead (QIODevice *device) |
Private Functions | |
bool | imageIsComing () const |
Properties | |
QByteArray | buffer |
QString | fileName |
int | frameNumber |
QGIFFormat * | gifFormat |
QVector< QSize > | imageSizes |
QImage | lastImage |
int | loopCnt |
int | nextDelay |
bool | scanIsCached |
Additional Inherited Members | |
Public Types inherited from QImageIOHandler | |
enum | ImageOption { Size, ClipRect, Description, ScaledClipRect, ScaledSize, CompressionRatio, Gamma, Quality, Name, SubType, IncrementalReading, Endianness, Animation, BackgroundColor, ImageFormat } |
This enum describes the different options supported by QImageIOHandler. More... | |
Protected Functions inherited from QImageIOHandler | |
QImageIOHandler (QImageIOHandlerPrivate &dd) | |
Constructs a QImageIOHandler object, using the private member dd. More... | |
Protected Variables inherited from QImageIOHandler | |
QScopedPointer< QImageIOHandlerPrivate > | d_ptr |
Definition at line 57 of file qgifhandler_p.h.
QGifHandler::QGifHandler | ( | ) |
Definition at line 1042 of file qgifhandler.cpp.
QGifHandler::~QGifHandler | ( | ) |
Definition at line 1051 of file qgifhandler.cpp.
|
virtual |
Returns true if an image can be read from the device (i.
e., the image format is supported, the device can be read from and the initial header information suggests that the image can be read); otherwise returns false.
When reimplementing canRead(), make sure that the I/O device (device()) is left in its original state (e.g., by using peek() rather than read()).
Implements QImageIOHandler.
Definition at line 1078 of file qgifhandler.cpp.
Referenced by QGifPlugin::capabilities(), and createReadHandlerHelper().
|
static |
Definition at line 1088 of file qgifhandler.cpp.
|
virtual |
For image formats that support animation, this function returns the sequence number of the current image in the animation.
If this function is called before any image is read(), -1 is returned. The number of the first image in the sequence is 0.
If the image format does not support animation, 0 is returned.
Reimplemented from QImageIOHandler.
Definition at line 1201 of file qgifhandler.cpp.
|
virtual |
For image formats that support animation, this function returns the number of images in the animation.
If the image format does not support animation, or if it is unable to determine the number of images, 0 is returned.
The default implementation returns 1 if canRead() returns true; otherwise 0 is returned.
Reimplemented from QImageIOHandler.
Definition at line 1177 of file qgifhandler.cpp.
|
private |
Definition at line 1058 of file qgifhandler.cpp.
|
virtual |
For image formats that support animation, this function returns the number of times the animation should loop.
If the image format does not support animation, 0 is returned.
Reimplemented from QImageIOHandler.
Definition at line 1186 of file qgifhandler.cpp.
|
virtual |
Use format() instead.
Reimplemented from QImageIOHandler.
Definition at line 1206 of file qgifhandler.cpp.
|
virtual |
For image formats that support animation, this function returns the number of milliseconds to wait until reading the next image.
If the image format does not support animation, 0 is returned.
Reimplemented from QImageIOHandler.
Definition at line 1172 of file qgifhandler.cpp.
|
virtual |
Returns the value assigned to option as a QVariant.
The type of the value depends on the option. For example, option(Size) returns a QSize variant.
Reimplemented from QImageIOHandler.
Definition at line 1145 of file qgifhandler.cpp.
|
virtual |
Read an image from the device, and stores it in image.
Returns true if the image is successfully read; otherwise returns false.
For image formats that support incremental loading, and for animation formats, the image handler can assume that image points to the previous frame.
Implements QImageIOHandler.
Definition at line 1102 of file qgifhandler.cpp.
|
virtual |
Sets the option option with the value value.
Reimplemented from QImageIOHandler.
Definition at line 1166 of file qgifhandler.cpp.
|
virtual |
Returns true if the QImageIOHandler supports the option option; otherwise returns false.
For example, if the QImageIOHandler supports the Size option, supportsOption(Size) must return true.
Reimplemented from QImageIOHandler.
Definition at line 1136 of file qgifhandler.cpp.
|
virtual |
Writes the image image to the assigned device.
Returns true on success; otherwise returns false.
The default implementation does nothing, and simply returns false.
Reimplemented from QImageIOHandler.
Definition at line 1130 of file qgifhandler.cpp.
|
mutableprivate |
Definition at line 84 of file qgifhandler_p.h.
|
private |
Definition at line 83 of file qgifhandler_p.h.
|
private |
Definition at line 89 of file qgifhandler_p.h.
|
private |
Definition at line 82 of file qgifhandler_p.h.
Definition at line 90 of file qgifhandler_p.h.
|
mutableprivate |
Definition at line 85 of file qgifhandler_p.h.
|
mutableprivate |
Definition at line 88 of file qgifhandler_p.h.
|
mutableprivate |
Definition at line 87 of file qgifhandler_p.h.
|
mutableprivate |
Definition at line 91 of file qgifhandler_p.h.