4 Copyright (C) 2004 Maks Orlovich ([email protected])
38 class QPainter;
40 namespace khtmlImLoad
55 Creates an image with a given owner; the owner will be notified about the repaint event, the image geometry,
56 and so on; and also if the image can not be decoded. The image must be fed data through the processData()
62 Provides new data for decoding. The method will return false if there is no longer any use to feeding it more data
65 bool processData(uchar *data, int length);
68 Notifies the image that the data source is exhausted, in case it cares. This should be called at the
71 void processEOF();
86 bool complete() const;
91 bool hasAlpha() const;
102 void setShowAnimations(KHTMLSettings::KAnimationAdvice);
105 friend class ImageLoader;
129 void notifyQImage(unsigned char version, const QImage *image);
139 friend class ImagePainter;
144 void derefSize(QSize size);
145 void refSize(QSize size);
149 ImageOwner *owner;
152 friend class Updater;
153 friend class AnimProvider;
167 void notifyPerformUpdate();
172 void notifyFrameChange();
175 QByteArray bufferPreDetect;
176 ImageLoader *loader;
177 PixmapPlane *loaderPlane;
188 PixmapPlane *original;
bool complete() const
Returns true if the image has been fully loaded.
An image represents a static picture or an animation, that may be incrementally loaded.
bool hasAlpha() const
Returns true if the image may have an alpha channel.
Notifies the image that the data source is exhausted, in case it cares.
A pixmap plane is responsible for drawing data of an image plane.
An image painter let's one paint an image at the given size.
The updater class helps manage timers, to permit update messages to be coalesced (so we don't bug KHT...
bool processData(uchar *data, int length)
Provides new data for decoding.
Creates an image with a given owner; the owner will be notified about the repaint event...
Called by the updater when the image should tell its owners about new changes.
Called when animation frame changes, requesting the owner to repaint.
Enables or disables animations.
QImage * qimage() const
Returns the image of basic content.