Eneboo - Documentación para desarrolladores
|
The QImageConsumer class is an abstraction used by QImageDecoder. Más...
#include <qasyncimageio.h>
Métodos públicos | |
virtual void | end ()=0 |
virtual void | changed (const QRect &)=0 |
virtual void | frameDone ()=0 |
virtual void | frameDone (const QPoint &, const QRect &)=0 |
virtual void | setLooping (int)=0 |
virtual void | setFramePeriod (int)=0 |
virtual void | setSize (int, int)=0 |
virtual void | end ()=0 |
virtual void | changed (const QRect &)=0 |
virtual void | frameDone ()=0 |
virtual void | frameDone (const QPoint &, const QRect &)=0 |
virtual void | setLooping (int)=0 |
virtual void | setFramePeriod (int)=0 |
virtual void | setSize (int, int)=0 |
The QImageConsumer class is an abstraction used by QImageDecoder.
The QMovie class, or QLabel::setMovie(), are easy to use and for most situations do what you want with regards animated images.
A QImageConsumer consumes information about changes to the QImage maintained by a QImageDecoder. Think of the QImage as the model or source of the image data, with the QImageConsumer as a view of that data and the QImageDecoder being the controller that orchestrates the relationship between the model and the view.
You'd use the QImageConsumer class, for example, if you were implementing a web browser with your own image loaders.
void QImageConsumer::changed | ( | const QRect & | ) | [pure virtual] |
Called when the given area of the image has changed.
Implementado en QImageIOFrameGrabber y QMoviePrivate.
virtual void QImageConsumer::changed | ( | const QRect & | ) | [pure virtual] |
Implementado en QImageIOFrameGrabber y QMoviePrivate.
void QImageConsumer::end | ( | ) | [pure virtual] |
Called when all the data from all the frames has been decoded and revealed as changed().
Implementado en QImageIOFrameGrabber y QMoviePrivate.
virtual void QImageConsumer::end | ( | ) | [pure virtual] |
Implementado en QImageIOFrameGrabber y QMoviePrivate.
Implementado en QImageIOFrameGrabber y QMoviePrivate.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
One of the two frameDone() functions will be called when a frame of an animated image has ended and been revealed as changed().
When this function is called, the area rect in the current image should be moved by offset and displayed.
The decoder will not make any further changes to the image until the next call to QImageFormat::decode().
Implementado en QImageIOFrameGrabber y QMoviePrivate.
virtual void QImageConsumer::frameDone | ( | ) | [pure virtual] |
Implementado en QImageIOFrameGrabber y QMoviePrivate.
void QImageConsumer::frameDone | ( | ) | [pure virtual] |
One of the two frameDone() functions will be called when a frame of an animated image has ended and been revealed as changed().
When this function is called, the current image should be displayed.
The decoder will not make any further changes to the image until the next call to QImageFormat::decode().
Implementado en QImageIOFrameGrabber y QMoviePrivate.
virtual void QImageConsumer::setFramePeriod | ( | int | ) | [pure virtual] |
Implementado en QImageIOFrameGrabber y QMoviePrivate.
void QImageConsumer::setFramePeriod | ( | int | milliseconds | ) | [pure virtual] |
Notes that the frame about to be decoded should not be displayed until the given number of milliseconds after the time that this function is called. Of course, the image may not have been decoded by then, in which case the frame should not be displayed until it is complete. A value of -1 (the assumed default) indicates that the image should be displayed even while it is only partially loaded.
Implementado en QImageIOFrameGrabber y QMoviePrivate.
void QImageConsumer::setLooping | ( | int | n | ) | [pure virtual] |
Called to indicate that the sequence of frames in the image should be repeated n times, including the sequence during decoding.
0 = Forever 1 = Only display frames the first time through 2 = Repeat once after first pass through images etc.
To make the QImageDecoder do this, just delete it and pass the information to it again for decoding (setLooping() will be called again, of course, but that can be ignored), or keep copies of the changed areas at the ends of frames.
Implementado en QImageIOFrameGrabber y QMoviePrivate.
virtual void QImageConsumer::setLooping | ( | int | ) | [pure virtual] |
Implementado en QImageIOFrameGrabber y QMoviePrivate.
Implementado en QImageIOFrameGrabber y QMoviePrivate.
This function is called as soon as the size of the image has been determined.
Implementado en QImageIOFrameGrabber y QMoviePrivate.