summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-26 09:39:38 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-27 07:50:27 (GMT)
commitc39fac87d62ef15867dc5571d03530d7e7240aa7 (patch)
treee947eb70c239619cf20db288300f3b0dd4423d92 /src/gui/graphicsview/qgraphicsitem_p.h
parentf6480ca465af9617956752e60d9be3a19b710e0f (diff)
downloadQt-c39fac87d62ef15867dc5571d03530d7e7240aa7.zip
Qt-c39fac87d62ef15867dc5571d03530d7e7240aa7.tar.gz
Qt-c39fac87d62ef15867dc5571d03530d7e7240aa7.tar.bz2
Options on how to get a pixmap from an effect source
Usable for future optimizations. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 7c3c4f0..183e95b 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -61,6 +61,7 @@
#include <private/qgraphicstransform_p.h>
#include <private/qgraphicseffect_p.h>
+#include <qgraphicseffect.h>
#include <QtCore/qpoint.h>
@@ -603,7 +604,9 @@ public:
inline bool isPixmap() const
{
- return (item->type() == QGraphicsPixmapItem::Type);
+ return item->type() == QGraphicsPixmapItem::Type
+ && !(item->flags() & QGraphicsItem::ItemIsSelectable)
+ && item->d_ptr->children.size() == 0;
//|| (item->d_ptr->isObject && qobject_cast<QFxImage *>(q_func()));
}
@@ -621,7 +624,9 @@ public:
QRectF boundingRect(Qt::CoordinateSystem system) const;
void draw(QPainter *);
- QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset) const;
+ QPixmap pixmap(Qt::CoordinateSystem system,
+ QPoint *offset,
+ QGraphicsEffectSource::PixmapPadMode mode) const;
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;