summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapdata_p.h
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-29 15:28:19 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-30 12:45:57 (GMT)
commitc16162214eb8757a62e221c34d38cefc402e5b05 (patch)
treeaa93778c76ca43ef14143fcc56864a3d93b703dc /src/gui/image/qpixmapdata_p.h
parent6ea8ad02e1929f98744f7b18f20fa91223cb4398 (diff)
downloadQt-c16162214eb8757a62e221c34d38cefc402e5b05.zip
Qt-c16162214eb8757a62e221c34d38cefc402e5b05.tar.gz
Qt-c16162214eb8757a62e221c34d38cefc402e5b05.tar.bz2
Add QPixmap::fromImageReader() to decode arbitrary images in place.
Decoding in-place with QPixmap::fromData() has limitations, it cannot be used with animated gif images, and the user has no control over the parameters of the image reader. Reader the image directly from the image reader allow us to do a better job when loading images. Reviewed-by: Simon Hausmann Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/image/qpixmapdata_p.h')
-rw-r--r--src/gui/image/qpixmapdata_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index 9a1505a..ec62b0b 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -58,6 +58,8 @@
QT_BEGIN_NAMESPACE
+class QImageReader;
+
class Q_GUI_EXPORT QPixmapData
{
public:
@@ -83,6 +85,8 @@ public:
virtual void resize(int width, int height) = 0;
virtual void fromImage(const QImage &image,
Qt::ImageConversionFlags flags) = 0;
+ virtual void fromImageReader(QImageReader *imageReader,
+ Qt::ImageConversionFlags flags);
virtual bool fromFile(const QString &filename, const char *format,
Qt::ImageConversionFlags flags);