QGraphicsItem

#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::GraphicsItemFlags

    ItemIsMovable,ItemIsSelectable,ItemIsFocusable,ItemClipsToShape,ItemClipsChildrenToShape,ItemIgnoresTransformations,ItemIgnoresParentOpacity,ItemDoesntPropagateOpacityToChildren,ItemStacksBehindParent,ItemUsesExtendedStyleOption,ItemHasNoContents,ItemSendsGeometryChanges,ItemAcceptsInputMethod,ItemNegativeZStacksBehindParent,ItemIsPanel,ItemSendsScenePositionChanges

     

    13,enum QGraphicsItem::PanelModality

    NonModal,PanelModal,SceneModal

    14,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值