Qt 4.8
Classes | Public Functions | Public Variables | List of all members
QGraphicsItemCache Class Reference

#include <qgraphicsitem_p.h>

Classes

struct  DeviceData
 

Public Functions

void purge ()
 Empty all cached pixmaps from the pixmap cache. More...
 
 QGraphicsItemCache ()
 

Public Variables

bool allExposed
 
QRect boundingRect
 
QMap< QPaintDevice *, DeviceDatadeviceData
 
QVector< QRectFexposed
 
QSize fixedSize
 
QPixmapCache::Key key
 

Detailed Description

Definition at line 131 of file qgraphicsitem_p.h.

Constructors and Destructors

◆ QGraphicsItemCache()

QGraphicsItemCache::QGraphicsItemCache ( )
inline

Definition at line 134 of file qgraphicsitem_p.h.

134 : allExposed(false) { }

Functions

◆ purge()

void QGraphicsItemCache::purge ( )

Empty all cached pixmaps from the pixmap cache.

Warning
This function is not part of the public interface.

Definition at line 1437 of file qgraphicsitem.cpp.

Referenced by QGraphicsItemPrivate::removeExtraItemCache(), QGraphicsItem::setCacheMode(), and QGraphicsItemPrivate::setVisibleHelper().

1438 {
1440  key = QPixmapCache::Key();
1441  QMutableMapIterator<QPaintDevice *, DeviceData> it(deviceData);
1442  while (it.hasNext()) {
1443  DeviceData &data = it.next().value();
1444  QPixmapCache::remove(data.key);
1445  data.cacheIndent = QPoint();
1446  }
1447  deviceData.clear();
1448  allExposed = true;
1449  exposed.clear();
1450 }
QMap< QPaintDevice *, DeviceData > deviceData
#define it(className, varName)
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
Definition: qvector.h:347
static const char * data(const QByteArray &arr)
QPixmapCache::Key key
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QVector< QRectF > exposed
static void remove(const QString &key)
Removes the pixmap associated with key from the cache.

Properties

◆ allExposed

bool QGraphicsItemCache::allExposed

◆ boundingRect

QRect QGraphicsItemCache::boundingRect

◆ deviceData

QMap<QPaintDevice *, DeviceData> QGraphicsItemCache::deviceData

Definition at line 148 of file qgraphicsitem_p.h.

Referenced by QGraphicsScenePrivate::drawItemHelper().

◆ exposed

QVector<QRectF> QGraphicsItemCache::exposed

◆ fixedSize

QSize QGraphicsItemCache::fixedSize

◆ key

QPixmapCache::Key QGraphicsItemCache::key

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