src/gui/image/qimage.h File Reference

#include <QtGui/qpaintdevice.h>
#include <QtGui/qrgb.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qrect.h>
#include <QtCore/qstring.h>

Include dependency graph for qimage.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QImageTextKeyLang
class  QImage
 The QImage class provides a hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device. More...

Functions

 Q_DECLARE_TYPEINFO (QImage, Q_MOVABLE_TYPE)
Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &, const QImage &)
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &, QImage &)


Function Documentation

Q_GUI_EXPORT QDataStream& operator<< ( QDataStream ,
const QImage  
) [related]

Definition at line 4255 of file qimage.cpp.

References image, and s.

04256 {
04257     if (s.version() >= 5) {
04258         if (image.isNull()) {
04259             s << (qint32) 0; // null image marker
04260             return s;
04261         } else {
04262             s << (qint32) 1;
04263             // continue ...
04264         }
04265     }
04266     QImageWriter writer(s.device(), s.version() == 1 ? "bmp" : "png");
04267     writer.write(image);
04268     return s;
04269 }

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream ,
QImage  
) [related]

Definition at line 4281 of file qimage.cpp.

References image, and s.

04282 {
04283     if (s.version() >= 5) {
04284         qint32 nullMarker;
04285         s >> nullMarker;
04286         if (!nullMarker) {
04287             image = QImage(); // null image
04288             return s;
04289         }
04290     }
04291     image = QImageReader(s.device(), 0).read();
04292     return s;
04293 }

Q_DECLARE_TYPEINFO ( QImage  ,
Q_MOVABLE_TYPE   
)


Generated on Thu Mar 15 13:19:13 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1