#include
- QGraphicsEllipseItem provides an ellipse item
- QGraphicsLineItem provides a line item
- QGraphicsPathItem provides an arbitrary path item
- QGraphicsPixmapItem provides a pixmap item
- QGraphicsPolygonItem provides a polygon item
- QGraphicsRectItem provides a rectangular item
- QGraphicsSimpleTextItem provides a simple text label item
- QGraphicsTextItem provides an advanced text browser item
1,The item's position, pos(), is the only function that does not operate in local coordinates, as it returns a position in parent coordinates.
2,setVisible().setEnabled().
3,ItemIsSelectable,setSelected().
4,two pure virtual public functions: boundingRect(),and paint()
5,prepareGeometryChange(),shape(),collidesWithItem()
6,contains()
7,pos().setRotation() or setScale(),setTransform().setTransformations().sceneTransform(),scenePos(),resetTransform().
- The item's base transform is applied (transform())
- The item's transformations list is applied in order (transformations())
- The item is rotated relative to its transform origin point (rotation(), transformOriginPoint())
- The item is scaled relative to its transform origin point (scale(), transformOriginPoint())
8,setZValue(),sibling items are stacked by insertion order
- You can call setZValue() on an item to explicitly stack it on top of, or under, other sibling items. The default Z value for an item is 0. Items with the same Z value are stacked by insertion order.
- You can call stackBefore() to reorder the list of children. This will directly modify the insertion order.
- You can set the ItemStacksBehindParent flag to stack a child item behind its parent.
9,installSceneEventFilter(),removeSceneEventFilter().
10,enum QGraphicsItem::CacheMode
QGraphicsItem::DeviceCoordinateCache ------>always renders at maximum quality.
11,enum QGraphicsItem::GraphicsItemChange
ItemEnabledChange,ItemEnabledHasChanged
ItemMatrixChange
ItemPositionChange,ItemPositionHasChanged…This notification is sent if the ItemSendsGeometryChanges flag is enabled,itemChange().
ItemTransformChange,ItemTransformHasChanged…This notification is send if the ItemSendsGeometryChanges flag is enabled,itemChange().
ItemSelectedChange,ItemSelectedHasChanged
ItemVisibleChange,ItemVisibleHasChanged
ItemParentChange,ItemParentHasChanged
ItemChildAddedChange,ItemChildRemovedChange
ItemSceneChange,ItemSceneHasChanged
ItemCursorChange,ItemCursorHasChanged
ItemToolTipChange,ItemToolTipHasChanged
ItemFlagsChange,ItemFlagsHaveChanged
ItemZValueChange,ItemZValueHasChanged
ItemOpacityChange,ItemOpacityHasChanged
ItemScenePositionHasChanged…This notification is sent if the ItemSendsScenePositionChanges flag is enabled
12,
enum QGraphicsItem::GraphicsItemFlag
flags QGraphicsItem::GraphicsItemFlagsItemIsMovable,ItemIsSelectable,ItemIsFocusable,ItemClipsToShape,ItemClipsChildrenToShape,ItemIgnoresTransformations,ItemIgnoresParentOpacity,ItemDoesntPropagateOpacityToChildren,ItemStacksBehindParent,ItemUsesExtendedStyleOption,ItemHasNoContents,ItemSendsGeometryChanges,ItemAcceptsInputMethod,ItemNegativeZStacksBehindParent,ItemIsPanel,ItemSendsScenePositionChanges
13,enum QGraphicsItem::PanelModality
NonModal,PanelModal,SceneModal
14,