summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsitem.h
diff options
context:
space:
mode:
authorDimitar Asenov <dimitar.asenov@gmail.com>2014-03-12 14:11:45 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-31 22:54:14 +0200
commit3270b4490bc420359483cb00ae48e91e261b30e8 (patch)
treed6e18a39fd0d21d36d10abe6edbfdb68084780ca /src/widgets/graphicsview/qgraphicsitem.h
parentd13d03f012b9c0516fa027f4e1ea18c12f1491ca (diff)
Add a new optimization flag to QGraphicsItem.
The new flag ItemContainsChildrenInShape is similar to the existing flag ItemClipsChildrenToShape. Setting the new flag makes QGraphicsScene assume that children are drawn within the shape of the current item but this is not enforced by clipping. When an application manually ensures this clipping boundary, setting the new flag removes the overhead of enforcing the clip with ItemClipsChildrenToShape, while still allowing other routines to behave more optimially by assuming children are within the shape of the current item. [ChangeLog][QtWidgets][QGraphicsItem] Added the ItemContainsChildrenInShape flag that enables using optimizations of ItemClipsChildrenToShape without the overhead of enforcing the clip. Change-Id: I5496fe1ca331b77fd51e0df8a3ace2b8e939eaf2 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsitem.h')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index 4283deb5b8..dfc06fdaea 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -105,7 +105,8 @@ public:
ItemIsFocusScope = 0x8000, // internal
ItemSendsScenePositionChanges = 0x10000,
ItemStopsClickFocusPropagation = 0x20000,
- ItemStopsFocusHandling = 0x40000
+ ItemStopsFocusHandling = 0x40000,
+ ItemContainsChildrenInShape = 0x80000
// NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
};
Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag)