Qt 4.8
Public Functions | Public Variables | Properties | List of all members
QRuntimePixmapData Class Reference

#include <qgraphicssystem_runtime_p.h>

Inheritance diagram for QRuntimePixmapData:
QPixmapData

Public Functions

virtual QPixmap alphaChannel () const
 
virtual QImagebuffer ()
 
virtual void copy (const QPixmapData *data, const QRect &rect)
 
virtual QPixmapDatacreateCompatiblePixmapData () const
 
virtual void fill (const QColor &color)
 
virtual bool fromData (const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags)
 
virtual bool fromFile (const QString &filename, const char *format, Qt::ImageConversionFlags flags)
 
virtual void fromImage (const QImage &image, Qt::ImageConversionFlags flags)
 
virtual bool hasAlphaChannel () const
 
virtual QBitmap mask () const
 
virtual int metric (QPaintDevice::PaintDeviceMetric metric) const
 
virtual QPaintEnginepaintEngine () const
 
 QRuntimePixmapData (const QRuntimeGraphicsSystem *gs, PixelType type)
 
void readBackInfo ()
 
virtual void resize (int width, int height)
 
virtual QPixmapDataruntimeData () const
 
virtual bool scroll (int dx, int dy, const QRect &rect)
 
virtual void setAlphaChannel (const QPixmap &alphaChannel)
 
virtual void setMask (const QBitmap &mask)
 
virtual QImage toImage () const
 
virtual QPixmap transformed (const QTransform &matrix, Qt::TransformationMode mode) const
 
 ~QRuntimePixmapData ()
 
- Public Functions inherited from QPixmapData
qint64 cacheKey () const
 
ClassId classId () const
 
int colorCount () const
 
int depth () const
 
virtual void fromImageReader (QImageReader *imageReader, Qt::ImageConversionFlags flags)
 
int height () const
 
bool isNull () const
 
QT_DEPRECATED int numColors () const
 
PixelType pixelType () const
 
 QPixmapData (PixelType pixelType, int classId)
 
int serialNumber () const
 
virtual QImage toImage (const QRect &rect) const
 
int width () const
 
virtual ~QPixmapData ()
 

Public Variables

QPixmapDatam_data
 

Properties

const QRuntimeGraphicsSystemm_graphicsSystem
 

Additional Inherited Members

- Public Types inherited from QPixmapData
enum  ClassId {
  RasterClass, X11Class, MacClass, DirectFBClass,
  OpenGLClass, OpenVGClass, RuntimeClass, BlitterClass,
  CustomClass = 1024
}
 
enum  PixelType { PixmapType, BitmapType }
 
- Static Public Functions inherited from QPixmapData
static QPixmapDatacreate (int w, int h, PixelType type)
 
- Protected Functions inherited from QPixmapData
void setSerialNumber (int serNo)
 
- Protected Variables inherited from QPixmapData
int d
 
int h
 
bool is_null
 
int w
 

Detailed Description

Definition at line 64 of file qgraphicssystem_runtime_p.h.

Constructors and Destructors

◆ QRuntimePixmapData()

QRuntimePixmapData::QRuntimePixmapData ( const QRuntimeGraphicsSystem gs,
PixelType  type 
)

Definition at line 89 of file qgraphicssystem_runtime.cpp.

Referenced by createCompatiblePixmapData().

91 {
93 }
const QRuntimeGraphicsSystem * m_graphicsSystem
static int qt_pixmap_serial
PixelType type
QPixmapData(PixelType pixelType, int classId)
Definition: qpixmapdata.cpp:68
void setSerialNumber(int serNo)

◆ ~QRuntimePixmapData()

QRuntimePixmapData::~QRuntimePixmapData ( )

Definition at line 95 of file qgraphicssystem_runtime.cpp.

96 {
99  delete m_data;
100 }
void removePixmapData(QRuntimePixmapData *pixmapData) const
const QRuntimeGraphicsSystem * m_graphicsSystem
static QGraphicsSystem * graphics_system

Functions

◆ alphaChannel()

QPixmap QRuntimePixmapData::alphaChannel ( ) const
virtual

Reimplemented from QPixmapData.

Definition at line 216 of file qgraphicssystem_runtime.cpp.

217 {
218  return m_data->alphaChannel();
219 }
virtual QPixmap alphaChannel() const

◆ buffer()

QImage * QRuntimePixmapData::buffer ( )
virtual

Reimplemented from QPixmapData.

Definition at line 231 of file qgraphicssystem_runtime.cpp.

232 {
233  return m_data->buffer();
234 }
virtual QImage * buffer()

◆ copy()

void QRuntimePixmapData::copy ( const QPixmapData data,
const QRect rect 
)
virtual

Reimplemented from QPixmapData.

Definition at line 157 of file qgraphicssystem_runtime.cpp.

158 {
159  if (data->runtimeData()) {
160  READBACK(
161  m_data->copy(data->runtimeData(), rect);
162  )
163  } else {
164  READBACK(
165  m_data->copy(data, rect);
166  )
167  }
168 }
virtual QPixmapData * runtimeData() const
virtual void copy(const QPixmapData *data, const QRect &rect)
#define READBACK(f)

◆ createCompatiblePixmapData()

QPixmapData * QRuntimePixmapData::createCompatiblePixmapData ( ) const
virtual

Reimplemented from QPixmapData.

Definition at line 111 of file qgraphicssystem_runtime.cpp.

112 {
115  return rtData;
116 }
virtual QPixmapData * createCompatiblePixmapData() const
Definition: qpixmapdata.cpp:96
const QRuntimeGraphicsSystem * m_graphicsSystem
PixelType pixelType() const
QRuntimePixmapData(const QRuntimeGraphicsSystem *gs, PixelType type)

◆ fill()

void QRuntimePixmapData::fill ( const QColor color)
virtual

Implements QPixmapData.

Definition at line 181 of file qgraphicssystem_runtime.cpp.

182 {
183  return m_data->fill(color);
184 }
virtual void fill(const QColor &color)=0

◆ fromData()

bool QRuntimePixmapData::fromData ( const uchar buffer,
uint  len,
const char *  format,
Qt::ImageConversionFlags  flags 
)
virtual

Reimplemented from QPixmapData.

Definition at line 146 of file qgraphicssystem_runtime.cpp.

148 {
149  bool success(false);
150  READBACK(
151  success = m_data->fromData(buffer, len, format, flags);
152  )
153  return success;
154 }
virtual bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags)
#define READBACK(f)

◆ fromFile()

bool QRuntimePixmapData::fromFile ( const QString filename,
const char *  format,
Qt::ImageConversionFlags  flags 
)
virtual

Reimplemented from QPixmapData.

Definition at line 136 of file qgraphicssystem_runtime.cpp.

138 {
139  bool success(false);
140  READBACK(
141  success = m_data->fromFile(filename, format, flags);
142  )
143  return success;
144 }
virtual bool fromFile(const QString &filename, const char *format, Qt::ImageConversionFlags flags)
#define READBACK(f)

◆ fromImage()

void QRuntimePixmapData::fromImage ( const QImage image,
Qt::ImageConversionFlags  flags 
)
virtual

Implements QPixmapData.

Definition at line 127 of file qgraphicssystem_runtime.cpp.

129 {
130  READBACK(
131  m_data->fromImage(image, flags);
132  )
133 }
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags)=0
#define READBACK(f)

◆ hasAlphaChannel()

bool QRuntimePixmapData::hasAlphaChannel ( ) const
virtual

Implements QPixmapData.

Definition at line 198 of file qgraphicssystem_runtime.cpp.

199 {
200  return m_data->hasAlphaChannel();
201 }
virtual bool hasAlphaChannel() const =0

◆ mask()

QBitmap QRuntimePixmapData::mask ( ) const
virtual

Reimplemented from QPixmapData.

Definition at line 186 of file qgraphicssystem_runtime.cpp.

187 {
188  return m_data->mask();
189 }
virtual QBitmap mask() const

◆ metric()

int QRuntimePixmapData::metric ( QPaintDevice::PaintDeviceMetric  metric) const
virtual

Implements QPixmapData.

Definition at line 176 of file qgraphicssystem_runtime.cpp.

177 {
178  return m_data->metric(metric);
179 }
virtual int metric(QPaintDevice::PaintDeviceMetric metric) const
virtual int metric(QPaintDevice::PaintDeviceMetric metric) const =0

◆ paintEngine()

QPaintEngine * QRuntimePixmapData::paintEngine ( ) const
virtual

Implements QPixmapData.

Definition at line 226 of file qgraphicssystem_runtime.cpp.

227 {
228  return m_data->paintEngine();
229 }
virtual QPaintEngine * paintEngine() const =0

◆ readBackInfo()

void QRuntimePixmapData::readBackInfo ( )

Definition at line 102 of file qgraphicssystem_runtime.cpp.

Referenced by buffer(), QRuntimeGraphicsSystem::setGraphicsSystem(), and QMeeGoGraphicsSystem::wrapPixmapData().

103 {
104  w = m_data->width();
105  h = m_data->height();
106  d = m_data->depth();
107  is_null = m_data->isNull();
108 }
int width() const
int depth() const
int height() const
bool isNull() const

◆ resize()

void QRuntimePixmapData::resize ( int  width,
int  height 
)
virtual

Implements QPixmapData.

Definition at line 119 of file qgraphicssystem_runtime.cpp.

120 {
121  READBACK(
123  )
124 }
virtual void resize(int width, int height)=0
int width() const
int height() const
#define READBACK(f)

◆ runtimeData()

QPixmapData * QRuntimePixmapData::runtimeData ( ) const
virtual

Reimplemented from QPixmapData.

Definition at line 249 of file qgraphicssystem_runtime.cpp.

250 {
251  return m_data;
252 }

◆ scroll()

bool QRuntimePixmapData::scroll ( int  dx,
int  dy,
const QRect rect 
)
virtual

Reimplemented from QPixmapData.

Definition at line 170 of file qgraphicssystem_runtime.cpp.

171 {
172  return m_data->scroll(dx, dy, rect);
173 }
virtual bool scroll(int dx, int dy, const QRect &rect)

◆ setAlphaChannel()

void QRuntimePixmapData::setAlphaChannel ( const QPixmap alphaChannel)
virtual

Reimplemented from QPixmapData.

Definition at line 209 of file qgraphicssystem_runtime.cpp.

210 {
211  READBACK(
212  m_data->setAlphaChannel(alphaChannel);
213  )
214 }
virtual void setAlphaChannel(const QPixmap &alphaChannel)
#define READBACK(f)

◆ setMask()

void QRuntimePixmapData::setMask ( const QBitmap mask)
virtual

Reimplemented from QPixmapData.

Definition at line 191 of file qgraphicssystem_runtime.cpp.

192 {
193  READBACK(
194  m_data->setMask(mask);
195  )
196 }
virtual void setMask(const QBitmap &mask)
#define READBACK(f)

◆ toImage()

QImage QRuntimePixmapData::toImage ( ) const
virtual

Implements QPixmapData.

Definition at line 221 of file qgraphicssystem_runtime.cpp.

222 {
223  return m_data->toImage();
224 }
virtual QImage toImage() const =0

◆ transformed()

QPixmap QRuntimePixmapData::transformed ( const QTransform matrix,
Qt::TransformationMode  mode 
) const
virtual

Reimplemented from QPixmapData.

Definition at line 203 of file qgraphicssystem_runtime.cpp.

205 {
206  return m_data->transformed(matrix, mode);
207 }
virtual QPixmap transformed(const QTransform &matrix, Qt::TransformationMode mode) const

Properties

◆ m_data

QPixmapData* QRuntimePixmapData::m_data

◆ m_graphicsSystem

const QRuntimeGraphicsSystem* QRuntimePixmapData::m_graphicsSystem
private

Definition at line 108 of file qgraphicssystem_runtime_p.h.

Referenced by createCompatiblePixmapData(), and ~QRuntimePixmapData().


The documentation for this class was generated from the following files: