diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-03 14:34:58 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:33:01 (GMT) |
commit | 728179ed60b43187d28c77a2d6930a74a62791d6 (patch) | |
tree | 9b48a4077f356138ce5c536b06d9cdcda2fe7af3 /src/gui/graphicsview/qgraphicsitem_p.h | |
parent | 1598ef761a8c3f0c9cccf5318e3de30f6c50880f (diff) | |
download | Qt-728179ed60b43187d28c77a2d6930a74a62791d6.zip Qt-728179ed60b43187d28c77a2d6930a74a62791d6.tar.gz Qt-728179ed60b43187d28c77a2d6930a74a62791d6.tar.bz2 |
Add QGraphicsItem::itemChangeEnabled().
This function allows the user to disable notifications for item changes.
In QSimpleCanvasItem, all notifications are disabled by default, and
you can enable them one at a time. QGraphicsItem's behavior is to by
default enable all notifications.
A side effect of this change is that I've removed one optimization in
favor of another: by not constructing a QVariant at all when there's no
notification we get maximum performance, at the expense of constructing
it twice if there is a notification.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index b0b940b..2752056 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -147,6 +147,7 @@ public: dirtyChildrenBoundingRect(1), paintedViewBoundingRectsNeedRepaint(0), dirtySceneTransform(1), + itemChangesEnabled(0xffff), globalStackingOrder(-1), q_ptr(0) { @@ -396,7 +397,8 @@ public: quint32 dirtyChildrenBoundingRect : 1; quint32 paintedViewBoundingRectsNeedRepaint : 1; quint32 dirtySceneTransform : 1; - quint32 padding : 18; // feel free to use + quint32 itemChangesEnabled : 16; + quint32 padding : 3; // feel free to use // Optional stacking order int globalStackingOrder; |