diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-05-29 06:54:31 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:28:17 (GMT) |
commit | c563cff78b9606bf5869707fcbe6183198508d60 (patch) | |
tree | b069f5e172f24e3d4af4a9e89ed045ad0a484ed5 /src/gui/graphicsview/qgraphicsitem.h | |
parent | bea8a19742ed1decbd63464e36e57980fbde7016 (diff) | |
download | Qt-c563cff78b9606bf5869707fcbe6183198508d60.zip Qt-c563cff78b9606bf5869707fcbe6183198508d60.tar.gz Qt-c563cff78b9606bf5869707fcbe6183198508d60.tar.bz2 |
Introduce QGraphicsItem::ItemHasNoContents.
This flag helps optimize the case where an item is used only as a
transformation node in a scene graph, and where the item itself
doesn't paint anything. This is the default for FxItem (the
subclasses that do paint enable the HasContents flag). This lets
Graphics View know whether there's any point in setting up the
world transform, opacity and other things.
Reviewed-by: Lars
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index def773e..737ea80 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -95,7 +95,8 @@ public: ItemIgnoresParentOpacity = 0x40, ItemDoesntPropagateOpacityToChildren = 0x80, ItemStacksBehindParent = 0x100, - ItemUsesExtendedStyleOption = 0x200 + ItemUsesExtendedStyleOption = 0x200, + ItemHasNoContents = 0x400 // NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag. }; Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag) |