[][src]Struct qt_widgets::q_graphics_item::GraphicsItemFlag

#[repr(transparent)]pub struct GraphicsItemFlag(_);

This enum describes different flags that you can set on an item to toggle different features in the item's behavior.

C++ enum: QGraphicsItem::GraphicsItemFlag.

C++ documentation:

This enum describes different flags that you can set on an item to toggle different features in the item's behavior.

All flags are disabled by default.

Note: This flag is similar to ItemContainsChildrenInShape but in addition enforces the containment by clipping the children.

Note: With this flag set you can still scale the item itself, and that scale transformation will influence the item's children.

Note: If both this flag and ItemClipsChildrenToShape are set, the clip will be enforced. This is equivalent to just setting ItemClipsChildrenToShape.

This flag was introduced in Qt 5.4.

The GraphicsItemFlags type is a typedef for QFlags<GraphicsItemFlag>. It stores an OR combination of GraphicsItemFlag values.

Methods

impl GraphicsItemFlag[src]

pub fn to_int(&self) -> c_int[src]

impl GraphicsItemFlag[src]

pub const ItemIsMovable: GraphicsItemFlag[src]

The item supports interactive movement using the mouse. By clicking on the item and then dragging, the item will move together with the mouse cursor. If the item has children, all children are also moved. If the item is part of a selection, all selected items are also moved. This feature is provided as a convenience through the base implementation of QGraphicsItem's mouse event handlers. (C++ enum variant: ItemIsMovable = 1)

pub const ItemIsSelectable: GraphicsItemFlag[src]

The item supports selection. Enabling this feature will enable setSelected() to toggle selection for the item. It will also let the item be selected automatically as a result of calling QGraphicsScene::setSelectionArea(), by clicking on an item, or by using rubber band selection in QGraphicsView. (C++ enum variant: ItemIsSelectable = 2)

pub const ItemIsFocusable: GraphicsItemFlag[src]

The item supports keyboard input focus (i.e., it is an input item). Enabling this flag will allow the item to accept focus, which again allows the delivery of key events to QGraphicsItem::keyPressEvent() and QGraphicsItem::keyReleaseEvent(). (C++ enum variant: ItemIsFocusable = 4)

pub const ItemClipsToShape: GraphicsItemFlag[src]

The item clips to its own shape. The item cannot draw or receive mouse, tablet, drag and drop or hover events outside its shape. It is disabled by default. This behavior is enforced by QGraphicsView::drawItems() or QGraphicsScene::drawItems(). This flag was introduced in Qt 4.3. (C++ enum variant: ItemClipsToShape = 8)

pub const ItemClipsChildrenToShape: GraphicsItemFlag[src]

The item clips the painting of all its descendants to its own shape. Items that are either direct or indirect children of this item cannot draw outside this item's shape. By default, this flag is disabled; children can draw anywhere. This behavior is enforced by QGraphicsView::drawItems() or QGraphicsScene::drawItems(). This flag was introduced in Qt 4.3. (C++ enum variant: ItemClipsChildrenToShape = 16)

pub const ItemIgnoresTransformations: GraphicsItemFlag[src]

The item ignores inherited transformations (i.e., its position is still anchored to its parent, but the parent or view rotation, zoom or shear transformations are ignored). This flag is useful for keeping text label items horizontal and unscaled, so they will still be readable if the view is transformed. When set, the item's view geometry and scene geometry will be maintained separately. You must call deviceTransform() to map coordinates and detect collisions in the view. By default, this flag is disabled. This flag was introduced in Qt 4.3. (C++ enum variant: ItemIgnoresTransformations = 32)

pub const ItemIgnoresParentOpacity: GraphicsItemFlag[src]

The item ignores its parent's opacity. The item's effective opacity is the same as its own; it does not combine with the parent's opacity. This flags allows your item to keep its absolute opacity even if the parent is semitransparent. This flag was introduced in Qt 4.5. (C++ enum variant: ItemIgnoresParentOpacity = 64)

pub const ItemDoesntPropagateOpacityToChildren: GraphicsItemFlag[src]

The item doesn't propagate its opacity to its children. This flag allows you to create a semitransparent item that does not affect the opacity of its children. This flag was introduced in Qt 4.5. (C++ enum variant: ItemDoesntPropagateOpacityToChildren = 128)

pub const ItemStacksBehindParent: GraphicsItemFlag[src]

The item is stacked behind its parent. By default, child items are stacked on top of the parent item. But setting this flag, the child will be stacked behind it. This flag is useful for drop shadow effects and for decoration objects that follow the parent item's geometry without drawing on top of it. This flag was introduced in Qt 4.5. (C++ enum variant: ItemStacksBehindParent = 256)

pub const ItemUsesExtendedStyleOption: GraphicsItemFlag[src]

The item makes use of either exposedRect or matrix in QStyleOptionGraphicsItem. By default, the exposedRect is initialized to the item's boundingRect() and the matrix is untransformed. You can enable this flag for the style options to be set up with more fine-grained values. Note that QStyleOptionGraphicsItem::levelOfDetail is unaffected by this flag and always initialized to 1. Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() if you need a higher value. This flag was introduced in Qt 4.6. (C++ enum variant: ItemUsesExtendedStyleOption = 512)

pub const ItemHasNoContents: GraphicsItemFlag[src]

The item does not paint anything (i.e., calling paint() on the item has no effect). You should set this flag on items that do not need to be painted to ensure that Graphics View avoids unnecessary painting preparations. This flag was introduced in Qt 4.6. (C++ enum variant: ItemHasNoContents = 1024)

pub const ItemSendsGeometryChanges: GraphicsItemFlag[src]

The item enables itemChange() notifications for ItemPositionChange, ItemPositionHasChanged, ItemMatrixChange, ItemTransformChange, ItemTransformHasChanged, ItemRotationChange, ItemRotationHasChanged, ItemScaleChange, ItemScaleHasChanged, ItemTransformOriginPointChange, and ItemTransformOriginPointHasChanged. For performance reasons, these notifications are disabled by default. You must enable this flag to receive notifications for position and transform changes. This flag was introduced in Qt 4.6. (C++ enum variant: ItemSendsGeometryChanges = 2048)

pub const ItemAcceptsInputMethod: GraphicsItemFlag[src]

The item supports input methods typically used for Asian languages. This flag was introduced in Qt 4.6. (C++ enum variant: ItemAcceptsInputMethod = 4096)

pub const ItemNegativeZStacksBehindParent: GraphicsItemFlag[src]

The item automatically stacks behind it's parent if it's z-value is negative. This flag enables setZValue() to toggle ItemStacksBehindParent. This flag was introduced in Qt 4.6. (C++ enum variant: ItemNegativeZStacksBehindParent = 8192)

pub const ItemIsPanel: GraphicsItemFlag[src]

The item is a panel. A panel provides activation and contained focus handling. Only one panel can be active at a time (see QGraphicsItem::isActive()). When no panel is active, QGraphicsScene activates all non-panel items. Window items (i.e., QGraphicsItem::isWindow() returns true) are panels. This flag was introduced in Qt 4.6. (C++ enum variant: ItemIsPanel = 16384)

pub const ItemIsFocusScope: GraphicsItemFlag[src]

C++ enum variant: ItemIsFocusScope = 32768

pub const ItemSendsScenePositionChanges: GraphicsItemFlag[src]

The item enables itemChange() notifications for ItemScenePositionHasChanged. For performance reasons, these notifications are disabled by default. You must enable this flag to receive notifications for scene position changes. This flag was introduced in Qt 4.6. (C++ enum variant: ItemSendsScenePositionChanges = 65536)

pub const ItemStopsClickFocusPropagation: GraphicsItemFlag[src]

C++ enum variant: ItemStopsClickFocusPropagation = 131072

pub const ItemStopsFocusHandling: GraphicsItemFlag[src]

C++ enum variant: ItemStopsFocusHandling = 262144

pub const ItemContainsChildrenInShape: GraphicsItemFlag[src]

This flag indicates that all of the item's direct or indirect children only draw within the item's shape. Unlike ItemClipsChildrenToShape, this restriction is not enforced. Set ItemContainsChildrenInShape when you manually assure that drawing is bound to the item's shape and want to avoid the cost associated with enforcing the clip. Setting this flag enables more efficient drawing and collision detection. The flag is disabled by default. (C++ enum variant: ItemContainsChildrenInShape = 524288)

Trait Implementations

impl<T: Into<QFlags<GraphicsItemFlag>>> BitOr<T> for GraphicsItemFlag[src]

type Output = QFlags<GraphicsItemFlag>

The resulting type after applying the | operator.

impl Clone for GraphicsItemFlag[src]

impl Copy for GraphicsItemFlag[src]

impl Debug for GraphicsItemFlag[src]

impl Eq for GraphicsItemFlag[src]

impl From<GraphicsItemFlag> for c_int[src]

impl From<GraphicsItemFlag> for QFlags<GraphicsItemFlag>[src]

impl From<i32> for GraphicsItemFlag[src]

impl PartialEq<GraphicsItemFlag> for GraphicsItemFlag[src]

impl StructuralEq for GraphicsItemFlag[src]

impl StructuralPartialEq for GraphicsItemFlag[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.