class GraphicsItem

book_4_sparkGenerated
code_blocksInput

Description

The GraphicsItem class in the Editor namespace is an abstract class that represents a graphical item within a scene. It provides a variety of properties and methods to manipulate and interact with graphical items, such as position, size, and transformations.

Members

Instance Methods

Member NameSummary
DestroyDestroys the graphics item.
UpdateUpdates the graphics item.
PrepareGeometryChangeUsually called before resizing items so they paint properly.
ToSceneConverts a position from local coordinates to scene coordinates.
FromSceneConverts a position from scene coordinates to local coordinates.
ToParentConverts a position from local coordinates to parent coordinates.
FromParentConverts a position from parent coordinates to local coordinates.
ToItemConverts a position from local coordinates to another item's coordinates.
FromItemConverts a position from another item's coordinates to local coordinates.
BindBinds the graphics item to a target by name.
ContainsChecks if a local position is within the graphics item.

Instance Properties

Member NameSummary
ChildrenGets the child graphics items.
GraphicsViewGets the graphics view associated with this item.
ParentGets the parent graphics item.
IsValidIndicates whether the graphics item is valid.
PositionGets or sets the position of the graphics item.
ViewPositionGets the position of the graphics item in view coordinates.
CenterGets the center position of the graphics item.
LocalRectGets the local rectangle of the graphics item.
SceneRectGets the scene rectangle of the graphics item.
RotationGets or sets the rotation of the graphics item.
ScaleGets or sets the scale of the graphics item.
MovableIndicates whether the graphics item is movable.
ClipChildrenIndicates whether the graphics item clips its children.
ClipIndicates whether the graphics item is clipped.
TooltipGets or sets the tooltip of the graphics item. Obsolete: Use ToolTip
ToolTipGets or sets the tooltip of the graphics item.
SelectedIndicates whether the graphics item is selected.
SelectableIndicates whether the graphics item is selectable.
FocusableIndicates whether the graphics item can receive keyboard input.
HoverEventsIndicates whether the graphics item handles hover events.
ZIndexGets or sets the Z-index of the graphics item.
BoundingRectThe outer bounds of the item as a rectangle; all painting must be restricted to inside an item's bounding rect.
SizeGets or sets the size of the graphics item.
WidthGets or sets the width of the graphics item.
HeightGets or sets the height of the graphics item.
HandlePosition0,0 means top left, 1,1 means bottom right.
HoveredIndicates whether the graphics item is hovered.
CursorGets or sets the cursor shape for the graphics item.