src/gui/image/qpixmap_raster.cpp File Reference

#include "qpixmap.h"
#include "qpixmap_p.h"
#include "qbitmap.h"
#include "qimage.h"
#include "qwidget.h"
#include "qpainter.h"
#include "qdatastream.h"
#include "qbuffer.h"
#include "qapplication.h"
#include <private/qwidget_p.h>
#include "qevent.h"
#include "qfile.h"
#include "qfileinfo.h"
#include "qdatetime.h"
#include "qpixmapcache.h"
#include "qimagereader.h"
#include "qimagewriter.h"
#include "qdebug.h"
#include "qpaintengine.h"

Include dependency graph for qpixmap_raster.cpp:

Go to the source code of this file.

Typedefs

typedef void(*) _qt_pixmap_cleanup_hook (int)

Functions

Q_GUI_EXPORT qint64 qt_pixmap_id (const QPixmap &pixmap)
static void sendResizeEvents (QWidget *target)
QDataStreamoperator<< (QDataStream &s, const QPixmap &pixmap)
QDataStreamoperator>> (QDataStream &s, QPixmap &pixmap)

Variables

Q_GUI_EXPORT _qt_pixmap_cleanup_hook qt_pixmap_cleanup_hook = 0
const uchar qt_pixmap_bit_mask [] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }


Typedef Documentation

typedef void(*) _qt_pixmap_cleanup_hook(int)

Definition at line 45 of file qpixmap_raster.cpp.


Function Documentation

QDataStream& operator<< ( QDataStream s,
const QPixmap pixmap 
) [related]

Definition at line 618 of file qpixmap_raster.cpp.

References s, and QPixmap::toImage().

00619 {
00620     s << pixmap.toImage();
00621     return s;
00622 }

Here is the call graph for this function:

QDataStream& operator>> ( QDataStream s,
QPixmap pixmap 
)

Definition at line 624 of file qpixmap_raster.cpp.

References QPixmap::BitmapType, QPixmap::data, QPixmap::fromImage(), QBitmap::fromImage(), s, and QPixmapData::type.

00625 {
00626     QImage img;
00627     s >> img;
00628     if (pixmap.data->type == QPixmap::BitmapType)
00629         pixmap = QBitmap::fromImage(img);
00630     else
00631         pixmap = QPixmap::fromImage(img);
00632     return s;
00633 }

Here is the call graph for this function:

Q_GUI_EXPORT qint64 qt_pixmap_id ( const QPixmap pixmap  ) 

Definition at line 47 of file qpixmap_raster.cpp.

References QPixmap::data, QPixmapData::detach_no, and QPixmapData::ser_no.

00048 {
00049     return (((qint64) pixmap.data->image.serialNumber()) << 32) | ((qint64) pixmap.data->detach_no);
00050 }

static void sendResizeEvents ( QWidget target  )  [static]

Definition at line 360 of file qpixmap_raster.cpp.

References QObject::children(), i, QObject::QObjectList(), QCoreApplication::sendEvent(), sendResizeEvents(), QWidget::size(), and Qt::WA_PendingResizeEvent.

00361 {
00362     QResizeEvent e(target->size(), QSize());
00363     QApplication::sendEvent(target, &e);
00364 
00365     const QObjectList children = target->children();
00366     for (int i = 0; i < children.size(); ++i) {
00367         QWidget *child = static_cast<QWidget*>(children.at(i));
00368         if (child->isWidgetType() && !child->isWindow() && child->testAttribute(Qt::WA_PendingResizeEvent))
00369             sendResizeEvents(child);
00370     }
00371 }

Here is the call graph for this function:


Variable Documentation

const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }

Definition at line 244 of file qpixmap_raster.cpp.

Q_GUI_EXPORT _qt_pixmap_cleanup_hook qt_pixmap_cleanup_hook = 0

Definition at line 46 of file qpixmap_raster.cpp.


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