Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QGraphicsItemGroup Class Reference

The QGraphicsItemGroup class provides a container that treats a group of items as a single item. More...

Inheritance diagram for QtGui.QGraphicsItemGroup:
Collaboration diagram for QtGui.QGraphicsItemGroup:

Public Member Functions

 QGraphicsItemGroup (IQGraphicsItem parent=null, QGraphicsScene scene=null)
 
 
override void CreateProxy ()
 
new void AddToGroup (IQGraphicsItem item)
 
 
override QRectF BoundingRect ()
 
 
override bool IsObscuredBy (IQGraphicsItem item)
 
 
override QPainterPath OpaqueArea ()
 
 
override void Paint (QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=null)
 
 
new void RemoveFromGroup (IQGraphicsItem item)
 
 
override int Type ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QGraphicsItem
 QGraphicsItem (IQGraphicsItem parent=null, QGraphicsScene scene=null)
 
 
virtual void Advance (int phase)
 
 
new QRegion BoundingRegion (QTransform itemToDeviceTransform)
 
 
new
System.Collections.Generic.List
< IQGraphicsItem
ChildItems ()
 
 
new
System.Collections.Generic.List
< IQGraphicsItem
Children ()
 
 
new QRectF ChildrenBoundingRect ()
 
 
new void ClearFocus ()
 
 
new QPainterPath ClipPath ()
 
 
virtual bool CollidesWithItem (IQGraphicsItem other, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape)
 
 
virtual bool CollidesWithPath (QPainterPath path, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape)
 
 
new
System.Collections.Generic.List
< IQGraphicsItem
CollidingItems (Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape)
 
 
new IQGraphicsItem CommonAncestorItem (IQGraphicsItem other)
 
 
virtual bool Contains (QPointF point)
 
 
new object Data (int key)
 
 
new QTransform DeviceTransform (QTransform viewportTransform)
 
 
new double EffectiveOpacity ()
 
 
new void EnsureVisible ()
 
 
new void EnsureVisible (QRectF rect, int xmargin=50, int ymargin=50)
 
 
new void EnsureVisible (double x, double y, double w, double h, int xmargin=50, int ymargin=50)
 
 
new IQGraphicsItem FocusItem ()
 
 
new IQGraphicsItem FocusScopeItem ()
 
new void GrabKeyboard ()
 
 
new void GrabMouse ()
 
 
new bool HasCursor ()
 
 
new bool HasFocus ()
 
 
new void Hide ()
 
 
new void InstallSceneEventFilter (IQGraphicsItem filterItem)
 
 
new bool IsActive ()
 
 
new bool IsAncestorOf (IQGraphicsItem child)
 
 
new bool IsBlockedByModalPanel (IQGraphicsItem blockingPanel=null)
 
 
new bool IsClipped ()
 
 
new bool IsEnabled ()
 
 
new bool IsObscured ()
 
 
new bool IsObscured (QRectF rect)
 
 
new bool IsObscured (double x, double y, double w, double h)
 
 
new bool IsPanel ()
 
 
new bool IsSelected ()
 
 
new bool IsUnderMouse ()
 
 
new bool IsVisible ()
 
 
new bool IsVisibleTo (IQGraphicsItem parent)
 
 
new bool IsWidget ()
 
 
new bool IsWindow ()
 
 
new QTransform ItemTransform (IQGraphicsItem other)
 
 
new QTransform ItemTransform (IQGraphicsItem other, ref bool ok)
 
 
new QPointF MapFromItem (IQGraphicsItem item, QPointF point)
 
 
new QPolygonF MapFromItem (IQGraphicsItem item, QRectF rect)
 
 
new QPolygonF MapFromItem (IQGraphicsItem item, QPolygonF polygon)
 
 
new QPainterPath MapFromItem (IQGraphicsItem item, QPainterPath path)
 
 
new QPointF MapFromItem (IQGraphicsItem item, double x, double y)
 
 
new QPolygonF MapFromItem (IQGraphicsItem item, double x, double y, double w, double h)
 
 
new QPointF MapFromParent (QPointF point)
 
 
new QPolygonF MapFromParent (QRectF rect)
 
 
new QPolygonF MapFromParent (QPolygonF polygon)
 
 
new QPainterPath MapFromParent (QPainterPath path)
 
 
new QPointF MapFromParent (double x, double y)
 
 
new QPolygonF MapFromParent (double x, double y, double w, double h)
 
 
new QPointF MapFromScene (QPointF point)
 
 
new QPolygonF MapFromScene (QRectF rect)
 
 
new QPolygonF MapFromScene (QPolygonF polygon)
 
 
new QPainterPath MapFromScene (QPainterPath path)
 
 
new QPointF MapFromScene (double x, double y)
 
 
new QPolygonF MapFromScene (double x, double y, double w, double h)
 
 
new QRectF MapRectFromItem (IQGraphicsItem item, QRectF rect)
 
 
new QRectF MapRectFromItem (IQGraphicsItem item, double x, double y, double w, double h)
 
 
new QRectF MapRectFromParent (QRectF rect)
 
 
new QRectF MapRectFromParent (double x, double y, double w, double h)
 
 
new QRectF MapRectFromScene (QRectF rect)
 
 
new QRectF MapRectFromScene (double x, double y, double w, double h)
 
 
new QRectF MapRectToItem (IQGraphicsItem item, QRectF rect)
 
 
new QRectF MapRectToItem (IQGraphicsItem item, double x, double y, double w, double h)
 
 
new QRectF MapRectToParent (QRectF rect)
 
 
new QRectF MapRectToParent (double x, double y, double w, double h)
 
 
new QRectF MapRectToScene (QRectF rect)
 
 
new QRectF MapRectToScene (double x, double y, double w, double h)
 
 
new QPointF MapToItem (IQGraphicsItem item, QPointF point)
 
 
new QPolygonF MapToItem (IQGraphicsItem item, QRectF rect)
 
 
new QPolygonF MapToItem (IQGraphicsItem item, QPolygonF polygon)
 
 
new QPainterPath MapToItem (IQGraphicsItem item, QPainterPath path)
 
 
new QPointF MapToItem (IQGraphicsItem item, double x, double y)
 
 
new QPolygonF MapToItem (IQGraphicsItem item, double x, double y, double w, double h)
 
 
new QPointF MapToParent (QPointF point)
 
 
new QPolygonF MapToParent (QRectF rect)
 
 
new QPolygonF MapToParent (QPolygonF polygon)
 
 
new QPainterPath MapToParent (QPainterPath path)
 
 
new QPointF MapToParent (double x, double y)
 
 
new QPolygonF MapToParent (double x, double y, double w, double h)
 
 
new QPointF MapToScene (QPointF point)
 
 
new QPolygonF MapToScene (QRectF rect)
 
 
new QPolygonF MapToScene (QPolygonF polygon)
 
 
new QPainterPath MapToScene (QPainterPath path)
 
 
new QPointF MapToScene (double x, double y)
 
 
new QPolygonF MapToScene (double x, double y, double w, double h)
 
 
new void MoveBy (double dx, double dy)
 
 
new IQGraphicsItem Panel ()
 
 
new QGraphicsObject ParentObject ()
 
 
new QGraphicsWidget ParentWidget ()
 
 
new void RemoveSceneEventFilter (IQGraphicsItem filterItem)
 
 
new void ResetMatrix ()
 
 
new void ResetTransform ()
 
 
new void Rotate (double angle)
 
 
new double Scale ()
 
 
new void Scale (double sx, double sy)
 
 
new QGraphicsScene Scene ()
 
 
new QRectF SceneBoundingRect ()
 
 
new QMatrix SceneMatrix ()
 
 
new QPointF ScenePos ()
 
 
new QTransform SceneTransform ()
 
 
new void Scroll (double dx, double dy)
 
 
new void Scroll (double dx, double dy, QRectF rect)
 
 
new void SetActive (bool active)
 
 
new void SetCacheMode (QGraphicsItem.CacheMode mode, QSize cacheSize)
 
 
new void SetData (int key, object value)
 
 
new void SetEnabled (bool enabled)
 
 
new void SetFlag (QGraphicsItem.GraphicsItemFlag flag, bool enabled=true)
 
 
new void SetFocus (Qt.FocusReason focusReason=Qt.FocusReason.OtherFocusReason)
 
 
new void SetMatrix (QMatrix matrix, bool combine=false)
 
 
new void SetPos (double x, double y)
 
 
new void SetScale (double scale)
 
 
new void SetSelected (bool selected)
 
 
new void SetTransform (QTransform matrix, bool combine=false)
 
 
new void SetTransformOriginPoint (double ax, double ay)
 
 
new void SetVisible (bool visible)
 
 
virtual QPainterPath Shape ()
 
 
new void Shear (double sh, double sv)
 
 
new void Show ()
 
 
new void StackBefore (IQGraphicsItem sibling)
 
 
new QGraphicsObject ToGraphicsObject ()
 
 
new IQGraphicsItem TopLevelItem ()
 
 
new QGraphicsWidget TopLevelWidget ()
 
 
new void Translate (double dx, double dy)
 
 
new void UngrabKeyboard ()
 
 
new void UngrabMouse ()
 
 
new void UnsetCursor ()
 
 
new void Update ()
 
 
new void Update (QRectF rect)
 
 
new void Update (double x, double y, double width, double height)
 
 
new QGraphicsWidget Window ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.IQGraphicsItem
void Advance (int phase)
 
QRectF BoundingRect ()
 
new QRegion BoundingRegion (QTransform itemToDeviceTransform)
 
new
System.Collections.Generic.List
< IQGraphicsItem
ChildItems ()
 
new
System.Collections.Generic.List
< IQGraphicsItem
Children ()
 
new QRectF ChildrenBoundingRect ()
 
new void ClearFocus ()
 
new QPainterPath ClipPath ()
 
bool CollidesWithItem (IQGraphicsItem other, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape)
 
bool CollidesWithPath (QPainterPath path, Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape)
 
new
System.Collections.Generic.List
< IQGraphicsItem
CollidingItems (Qt.ItemSelectionMode mode=Qt.ItemSelectionMode.IntersectsItemShape)
 
new IQGraphicsItem CommonAncestorItem (IQGraphicsItem other)
 
bool Contains (QPointF point)
 
new object Data (int key)
 
new QTransform DeviceTransform (QTransform viewportTransform)
 
new double EffectiveOpacity ()
 
new void EnsureVisible ()
 
new void EnsureVisible (QRectF rect, int xmargin=50, int ymargin=50)
 
new void EnsureVisible (double x, double y, double w, double h, int xmargin=50, int ymargin=50)
 
new IQGraphicsItem FocusItem ()
 
new IQGraphicsItem FocusScopeItem ()
 
new void GrabKeyboard ()
 
new void GrabMouse ()
 
new bool HasCursor ()
 
new bool HasFocus ()
 
new void Hide ()
 
new void InstallSceneEventFilter (IQGraphicsItem filterItem)
 
new bool IsActive ()
 
new bool IsAncestorOf (IQGraphicsItem child)
 
new bool IsBlockedByModalPanel (IQGraphicsItem blockingPanel=null)
 
new bool IsClipped ()
 
new bool IsEnabled ()
 
new bool IsObscured ()
 
new bool IsObscured (QRectF rect)
 
new bool IsObscured (double x, double y, double w, double h)
 
bool IsObscuredBy (IQGraphicsItem item)
 
new bool IsPanel ()
 
new bool IsSelected ()
 
new bool IsUnderMouse ()
 
new bool IsVisible ()
 
new bool IsVisibleTo (IQGraphicsItem parent)
 
new bool IsWidget ()
 
new bool IsWindow ()
 
new QTransform ItemTransform (IQGraphicsItem other)
 
new QTransform ItemTransform (IQGraphicsItem other, ref bool ok)
 
new QPolygonF MapFromItem (IQGraphicsItem item, QRectF rect)
 
new QPainterPath MapFromItem (IQGraphicsItem item, QPainterPath path)
 
new QPointF MapFromItem (IQGraphicsItem item, QPointF point)
 
new QPolygonF MapFromItem (IQGraphicsItem item, QPolygonF polygon)
 
new QPointF MapFromItem (IQGraphicsItem item, double x, double y)
 
new QPolygonF MapFromItem (IQGraphicsItem item, double x, double y, double w, double h)
 
new QPolygonF MapFromParent (QPolygonF polygon)
 
new QPolygonF MapFromParent (QRectF rect)
 
new QPainterPath MapFromParent (QPainterPath path)
 
new QPointF MapFromParent (QPointF point)
 
new QPointF MapFromParent (double x, double y)
 
new QPolygonF MapFromParent (double x, double y, double w, double h)
 
new QPolygonF MapFromScene (QPolygonF polygon)
 
new QPolygonF MapFromScene (QRectF rect)
 
new QPainterPath MapFromScene (QPainterPath path)
 
new QPointF MapFromScene (QPointF point)
 
new QPointF MapFromScene (double x, double y)
 
new QPolygonF MapFromScene (double x, double y, double w, double h)
 
new QRectF MapRectFromItem (IQGraphicsItem item, QRectF rect)
 
new QRectF MapRectFromItem (IQGraphicsItem item, double x, double y, double w, double h)
 
new QRectF MapRectFromParent (QRectF rect)
 
new QRectF MapRectFromParent (double x, double y, double w, double h)
 
new QRectF MapRectFromScene (QRectF rect)
 
new QRectF MapRectFromScene (double x, double y, double w, double h)
 
new QRectF MapRectToItem (IQGraphicsItem item, QRectF rect)
 
new QRectF MapRectToItem (IQGraphicsItem item, double x, double y, double w, double h)
 
new QRectF MapRectToParent (QRectF rect)
 
new QRectF MapRectToParent (double x, double y, double w, double h)
 
new QRectF MapRectToScene (QRectF rect)
 
new QRectF MapRectToScene (double x, double y, double w, double h)
 
new QPainterPath MapToItem (IQGraphicsItem item, QPainterPath path)
 
new QPolygonF MapToItem (IQGraphicsItem item, QRectF rect)
 
new QPolygonF MapToItem (IQGraphicsItem item, QPolygonF polygon)
 
new QPointF MapToItem (IQGraphicsItem item, QPointF point)
 
new QPointF MapToItem (IQGraphicsItem item, double x, double y)
 
new QPolygonF MapToItem (IQGraphicsItem item, double x, double y, double w, double h)
 
new QPolygonF MapToParent (QPolygonF polygon)
 
new QPainterPath MapToParent (QPainterPath path)
 
new QPointF MapToParent (QPointF point)
 
new QPolygonF MapToParent (QRectF rect)
 
new QPointF MapToParent (double x, double y)
 
new QPolygonF MapToParent (double x, double y, double w, double h)
 
new QPolygonF MapToScene (QPolygonF polygon)
 
new QPointF MapToScene (QPointF point)
 
new QPainterPath MapToScene (QPainterPath path)
 
new QPolygonF MapToScene (QRectF rect)
 
new QPointF MapToScene (double x, double y)
 
new QPolygonF MapToScene (double x, double y, double w, double h)
 
new void MoveBy (double dx, double dy)
 
QPainterPath OpaqueArea ()
 
void Paint (QPainter painter, QStyleOptionGraphicsItem option, QWidget widget=null)
 
new IQGraphicsItem Panel ()
 
new QGraphicsObject ParentObject ()
 
new QGraphicsWidget ParentWidget ()
 
new void RemoveSceneEventFilter (IQGraphicsItem filterItem)
 
new void ResetMatrix ()
 
new void ResetTransform ()
 
new void Rotate (double angle)
 
new double Scale ()
 
new void Scale (double sx, double sy)
 
new QGraphicsScene Scene ()
 
new QRectF SceneBoundingRect ()
 
new QMatrix SceneMatrix ()
 
new QPointF ScenePos ()
 
new QTransform SceneTransform ()
 
new void Scroll (double dx, double dy)
 
new void Scroll (double dx, double dy, QRectF rect)
 
new void SetActive (bool active)
 
new void SetCacheMode (QGraphicsItem.CacheMode mode, QSize cacheSize)
 
new void SetData (int key, object value)
 
new void SetEnabled (bool enabled)
 
new void SetFlag (QGraphicsItem.GraphicsItemFlag flag, bool enabled=true)
 
new void SetFocus (Qt.FocusReason focusReason=Qt.FocusReason.OtherFocusReason)
 
new void SetMatrix (QMatrix matrix, bool combine=false)
 
new void SetPos (double x, double y)
 
new void SetScale (double scale)
 
new void SetSelected (bool selected)
 
new void SetTransform (QTransform matrix, bool combine=false)
 
new void SetTransformOriginPoint (double ax, double ay)
 
new void SetVisible (bool visible)
 
QPainterPath Shape ()
 
new void Shear (double sh, double sv)
 
new void Show ()
 
new void StackBefore (IQGraphicsItem sibling)
 
new QGraphicsObject ToGraphicsObject ()
 
new IQGraphicsItem TopLevelItem ()
 
new QGraphicsWidget TopLevelWidget ()
 
new void Translate (double dx, double dy)
 
int Type ()
 
new void UngrabKeyboard ()
 
new void UngrabMouse ()
 
new void UnsetCursor ()
 
new void Update ()
 
new void Update (QRectF rect)
 
new void Update (double x, double y, double width, double height)
 
new QGraphicsWidget Window ()
 

Protected Member Functions

 QGraphicsItemGroup (System.Type dummy)
 
- Protected Member Functions inherited from QtGui.QGraphicsItem
 QGraphicsItem (System.Type dummy)
 
new void AddToIndex ()
 
virtual void OnContextMenuEvent (QGraphicsSceneContextMenuEvent @event)
 
 
virtual void OnDragEnterEvent (QGraphicsSceneDragDropEvent @event)
 
 
virtual void OnDragLeaveEvent (QGraphicsSceneDragDropEvent @event)
 
 
virtual void OnDragMoveEvent (QGraphicsSceneDragDropEvent @event)
 
 
virtual void OnDropEvent (QGraphicsSceneDragDropEvent @event)
 
 
virtual object extension (object variant)
 
virtual void OnFocusInEvent (QFocusEvent @event)
 
 
virtual void OnFocusOutEvent (QFocusEvent @event)
 
 
virtual void OnHoverEnterEvent (QGraphicsSceneHoverEvent @event)
 
 
virtual void OnHoverLeaveEvent (QGraphicsSceneHoverEvent @event)
 
 
virtual void OnHoverMoveEvent (QGraphicsSceneHoverEvent @event)
 
 
virtual void OnInputMethodEvent (QInputMethodEvent @event)
 
 
virtual object InputMethodQuery (Qt.InputMethodQuery query)
 
 
virtual object ItemChange (QGraphicsItem.GraphicsItemChange change, object value)
 
 
virtual void OnKeyPressEvent (QKeyEvent @event)
 
 
virtual void OnKeyReleaseEvent (QKeyEvent @event)
 
 
virtual void OnMouseDoubleClickEvent (QGraphicsSceneMouseEvent @event)
 
 
virtual void OnMouseMoveEvent (QGraphicsSceneMouseEvent @event)
 
 
virtual void OnMousePressEvent (QGraphicsSceneMouseEvent @event)
 
 
virtual void OnMouseReleaseEvent (QGraphicsSceneMouseEvent @event)
 
 
new void PrepareGeometryChange ()
 
 
new void RemoveFromIndex ()
 
virtual bool OnSceneEvent (QEvent @event)
 
 
virtual bool SceneEventFilter (IQGraphicsItem watched, QEvent @event)
 
 
virtual void SetExtension (QGraphicsItem.Extension extension, object variant)
 
virtual bool SupportsExtension (QGraphicsItem.Extension extension)
 
new void UpdateMicroFocus ()
 
 
virtual void OnWheelEvent (QGraphicsSceneWheelEvent @event)
 
 

Additional Inherited Members

- Public Types inherited from QtGui.QGraphicsItem
enum  CacheMode { DeviceCoordinateCache = 2, ItemCoordinateCache = 1, NoCache = 0 }
  More...
 
enum  Extension { UserExtension = -2147483648 }
 
enum  GraphicsItemChange {
  ItemChildAddedChange = 6, ItemChildRemovedChange = 7, ItemCursorChange = 17, ItemCursorHasChanged = 18,
  ItemEnabledChange = 3, ItemEnabledHasChanged = 13, ItemFlagsChange = 21, ItemFlagsHaveChanged = 22,
  ItemMatrixChange = 1, ItemOpacityChange = 25, ItemOpacityHasChanged = 26, ItemParentChange = 5,
  ItemParentHasChanged = 15, ItemPositionChange = 0, ItemPositionHasChanged = 9, ItemRotationChange = 28,
  ItemRotationHasChanged = 29, ItemScaleChange = 30, ItemScaleHasChanged = 31, ItemSceneChange = 11,
  ItemSceneHasChanged = 16, ItemScenePositionHasChanged = 27, ItemSelectedChange = 4, ItemSelectedHasChanged = 14,
  ItemToolTipChange = 19, ItemToolTipHasChanged = 20, ItemTransformChange = 8, ItemTransformHasChanged = 10,
  ItemTransformOriginPointChange = 32, ItemTransformOriginPointHasChanged = 33, ItemVisibleChange = 2, ItemVisibleHasChanged = 12,
  ItemZValueChange = 23, ItemZValueHasChanged = 24
}
  More...
 
enum  GraphicsItemFlag {
  ItemAcceptsInputMethod = 4096, ItemClipsChildrenToShape = 16, ItemClipsToShape = 8, ItemDoesntPropagateOpacityToChildren = 128,
  ItemHasNoContents = 1024, ItemIgnoresParentOpacity = 64, ItemIgnoresTransformations = 32, ItemIsFocusScope = 32768,
  ItemIsFocusable = 4, ItemIsMovable = 1, ItemIsPanel = 16384, ItemIsSelectable = 2,
  ItemNegativeZStacksBehindParent = 8192, ItemSendsGeometryChanges = 2048, ItemSendsScenePositionChanges = 65536, ItemStacksBehindParent = 256,
  ItemStopsClickFocusPropagation = 131072, ItemStopsFocusHandling = 262144, ItemUsesExtendedStyleOption = 512
}
  More...
 
enum  PanelModality { NonModal = 0, PanelModal = 1, SceneModal = 2 }
  More...
 
- Protected Attributes inherited from QtGui.QGraphicsItem
SmokeInvocation interceptor
 
- Properties inherited from QtGui.QGraphicsItem
new bool AcceptDrops [get, set]
 
 
new bool AcceptHoverEvents [get, set]
 
 
new bool AcceptTouchEvents [get, set]
 
 
new Qt.MouseButton AcceptedMouseButtons [get, set]
 
 
new bool AcceptsHoverEvents [get, set]
 
 
new double BoundingRegionGranularity [get, set]
 
 
new QGraphicsItem.CacheMode cacheMode [get, set]
 
 
new QCursor Cursor [get, set]
 
 
new bool FiltersChildEvents [get, set]
 
 
new QGraphicsItem.GraphicsItemFlag Flags [get, set]
 
 
new IQGraphicsItem FocusProxy [get, set]
 
 
new QGraphicsEffect GraphicsEffect [get, set]
 
 
new QGraphicsItemGroup Group [get, set]
 
 
new bool HandlesChildEvents [get, set]
 
 
new Qt.InputMethodHint InputMethodHints [get, set]
 
 
new double Opacity [get, set]
 
 
new QGraphicsItem.PanelModality panelModality [get, set]
 
 
new IQGraphicsItem ParentItem [get, set]
 
 
new QPointF Pos [get, set]
 
 
new double Rotation [get, set]
 
 
new string ToolTip [get, set]
 
 
new QPointF TransformOriginPoint [get, set]
 
 
new
System.Collections.Generic.List
< QGraphicsTransform
Transformations [get, set]
 
 
new double X [get, set]
 
 
new double Y [get, set]
 
 
new double zValue [get, set]
 
 
new QMatrix Matrix [get]
 
 
new QTransform Transform [get]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QGraphicsItemGroup class provides a container that treats a group of items as a single item.

A QGraphicsItemGroup is a special type of compound item that treats itself and all its children as one item (i.e., all events and geometries for all children are merged together). It's common to use item groups in presentation tools, when the user wants to group several smaller items into one big item in order to simplify moving and copying of items.

If all you want is to store items inside other items, you can use any QGraphicsItem directly by passing a suitable parent to setParentItem().

The boundingRect() function of QGraphicsItemGroup returns the bounding rectangle of all items in the item group. QGraphicsItemGroup ignores the ItemIgnoresTransformations flag on its children (i.e., with respect to the geometry of the group item, the children are treated as if they were transformable).

There are two ways to construct an item group. The easiest and most common approach is to pass a list of items (e.g., all selected items) to QGraphicsScene::createItemGroup(), which returns a new QGraphicsItemGroup item. The other approach is to manually construct a QGraphicsItemGroup item, add it to the scene calling QGraphicsScene::addItem(), and then add items to the group manually, one at a time by calling addToGroup(). To dismantle ("ungroup") an item group, you can either call QGraphicsScene::destroyItemGroup(), or you can manually remove all items from the group by calling removeFromGroup().

// Group all selected items together

QGraphicsItemGroup *group = scene->createItemGroup(scene->selecteditems());

// Destroy the group, and delete the group item

scene->destroyItemGroup(group);

The operation of adding and removing items preserves the items' scene-relative position and transformation, as opposed to calling setParentItem(), where only the child item's parent-relative position and transformation are kept.

The addtoGroup() function reparents the target item to this item group, keeping the item's position and transformation intact relative to the scene. Visually, this means that items added via addToGroup() will remain completely unchanged as a result of this operation, regardless of the item or the group's current position or transformation; although the item's position and matrix are likely to change.

The removeFromGroup() function has similar semantics to setParentItem(); it reparents the item to the parent item of the item group. As with addToGroup(), the item's scene-relative position and transformation remain intact.

See also QGraphicsItem and Graphics View Framework.

Constructor & Destructor Documentation

QtGui.QGraphicsItemGroup.QGraphicsItemGroup ( System.Type  dummy)
protected
QtGui.QGraphicsItemGroup.QGraphicsItemGroup ( IQGraphicsItem  parent = null,
QGraphicsScene  scene = null 
)

Constructs a QGraphicsItemGroup. parent is passed to QGraphicsItem's constructor.

See also QGraphicsScene::addItem().

Member Function Documentation

new void QtGui.QGraphicsItemGroup.AddToGroup ( IQGraphicsItem  item)

Adds the given item and item's child items to this item group. The item and child items will be reparented to this group, but its position and transformation relative to the scene will stay intact.

See also removeFromGroup() and QGraphicsScene::createItemGroup().

override QRectF QtGui.QGraphicsItemGroup.BoundingRect ( )
virtual

Reimplemented from QGraphicsItem::boundingRect().

Returns the bounding rect of this group item, and all its children.

Implements QtGui.QGraphicsItem.

override void QtGui.QGraphicsItemGroup.CreateProxy ( )
virtual

Reimplemented from QtGui.QGraphicsItem.

new void QtGui.QGraphicsItemGroup.Dispose ( )
override bool QtGui.QGraphicsItemGroup.IsObscuredBy ( IQGraphicsItem  item)
virtual

Reimplemented from QGraphicsItem::isObscuredBy().

Reimplemented from QtGui.QGraphicsItem.

override QPainterPath QtGui.QGraphicsItemGroup.OpaqueArea ( )
virtual

Reimplemented from QGraphicsItem::opaqueArea().

Reimplemented from QtGui.QGraphicsItem.

override void QtGui.QGraphicsItemGroup.Paint ( QPainter  painter,
QStyleOptionGraphicsItem  option,
QWidget  widget = null 
)
virtual

Reimplemented from QGraphicsItem::paint().

Implements QtGui.QGraphicsItem.

new void QtGui.QGraphicsItemGroup.RemoveFromGroup ( IQGraphicsItem  item)

Removes the specified item from this group. The item will be reparented to this group's parent item, or to 0 if this group has no parent. Its position and transformation relative to the scene will stay intact.

See also addToGroup() and QGraphicsScene::destroyItemGroup().

override int QtGui.QGraphicsItemGroup.Type ( )
virtual

Reimplemented from QGraphicsItem::type().

Reimplemented from QtGui.QGraphicsItem.