summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem_p.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-30 05:55:28 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-30 05:55:28 (GMT)
commit2b5baa7d5eb68a908c392506d9f75a2bfdb0f720 (patch)
tree26c5225c3fe6dd9b4e414f202a127eaf2f2881ac /src/gui/graphicsview/qgraphicsitem_p.h
parent2444a2e92ae959d350ce5e4c2c984c1e5b714421 (diff)
downloadQt-2b5baa7d5eb68a908c392506d9f75a2bfdb0f720.zip
Qt-2b5baa7d5eb68a908c392506d9f75a2bfdb0f720.tar.gz
Qt-2b5baa7d5eb68a908c392506d9f75a2bfdb0f720.tar.bz2
Make sure we don't create pixmaps that are bigger than the device rect.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 69d8b5f..8b7f5b5 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -557,6 +557,15 @@ public:
inline const QStyleOption *styleOption() const
{ return info ? info->option : 0; }
+ inline QRect deviceRect() const
+ {
+ if (!info || !info->widget) {
+ qWarning("QGraphicsEffectSource::deviceRect: Not yet implemented, lacking device context");
+ return QRect();
+ }
+ return info->widget->rect();
+ }
+
QRectF boundingRect(Qt::CoordinateSystem system) const;
void draw(QPainter *);
QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset) const;