com.trolltech.qt.gui
Class QGraphicsItem.GraphicsItemFlag

java.lang.Object
  extended by java.lang.Enum
      extended by com.trolltech.qt.gui.QGraphicsItem.GraphicsItemFlag
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable
Enclosing class:
QGraphicsItem

public static final class QGraphicsItem.GraphicsItemFlag
extends java.lang.Enum
implements QtEnumerator

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.

See Also:
Serialized Form

Field Summary
static QGraphicsItem.GraphicsItemFlag ItemClipsChildrenToShape
          The item clips the painting of all its descendants to its own shape.
static QGraphicsItem.GraphicsItemFlag ItemClipsToShape
          The item clips to its own shape.
static QGraphicsItem.GraphicsItemFlag ItemDoesntPropagateOpacityToChildren
          The item doesn't propagate its opacity to its children.
static QGraphicsItem.GraphicsItemFlag ItemIgnoresParentOpacity
          The item ignores its parent's opacity.
static QGraphicsItem.GraphicsItemFlag ItemIgnoresTransformations
          The item ignores inherited transformations (i.
static QGraphicsItem.GraphicsItemFlag ItemIsFocusable
          The item supports keyboard input focus (i.
static QGraphicsItem.GraphicsItemFlag ItemIsMovable
          The item supports interactive movement using the mouse.
static QGraphicsItem.GraphicsItemFlag ItemIsSelectable
          The item supports selection.
static QGraphicsItem.GraphicsItemFlag ItemStacksBehindParent
          The item is stacked behind its parent.
 
Method Summary
static QGraphicsItem.GraphicsItemFlags createQFlags(QGraphicsItem.GraphicsItemFlag[] values)
          This function creates a com.trolltech.qt.gui.QGraphicsItem$GraphicsItemFlags with the specified com.trolltech.qt.gui.QGraphicsItem$GraphicsItemFlag[] QGraphicsItem$GraphicsItemFlag values set.
static QGraphicsItem.GraphicsItemFlag resolve(int value)
          Returns the QGraphicsItem$GraphicsItemFlag constant with the specified int.
 int value()
          This function should return an integer value for the enum values of the enumeration that implements this interface.
static QGraphicsItem.GraphicsItemFlag valueOf(java.lang.String name)
           
static QGraphicsItem.GraphicsItemFlag[] values()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ItemIsMovable

public static final QGraphicsItem.GraphicsItemFlag ItemIsMovable
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.


ItemIsSelectable

public static final QGraphicsItem.GraphicsItemFlag ItemIsSelectable
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.


ItemIsFocusable

public static final QGraphicsItem.GraphicsItemFlag ItemIsFocusable
The item supports keyboard input focus (i. ., 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().


ItemClipsToShape

public static final QGraphicsItem.GraphicsItemFlag ItemClipsToShape
The item clips to its own shape. The item cannot draw or receive mouse, tablet, drag and drop or hover events outside ts shape. It is disabled by default. This behavior is enforced by QGraphicsView::drawItems() or QGraphicsScene::drawItems(). This flag was introduced in Qt 4.3.


ItemClipsChildrenToShape

public static final QGraphicsItem.GraphicsItemFlag ItemClipsChildrenToShape
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.


ItemIgnoresTransformations

public static final QGraphicsItem.GraphicsItemFlag ItemIgnoresTransformations
The item ignores inherited transformations (i. ., 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. Note: With this flag set you can still scale the item itself, and that scale transformation will influence the item's children.


ItemIgnoresParentOpacity

public static final QGraphicsItem.GraphicsItemFlag ItemIgnoresParentOpacity
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.


ItemDoesntPropagateOpacityToChildren

public static final QGraphicsItem.GraphicsItemFlag ItemDoesntPropagateOpacityToChildren
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.


ItemStacksBehindParent

public static final QGraphicsItem.GraphicsItemFlag ItemStacksBehindParent
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.

Method Detail

values

public static QGraphicsItem.GraphicsItemFlag[] values()

valueOf

public static QGraphicsItem.GraphicsItemFlag valueOf(java.lang.String name)

value

public int value()
This function should return an integer value for the enum values of the enumeration that implements this interface.

Specified by:
value in interface QtEnumerator

createQFlags

public static QGraphicsItem.GraphicsItemFlags createQFlags(QGraphicsItem.GraphicsItemFlag[] values)
This function creates a com.trolltech.qt.gui.QGraphicsItem$GraphicsItemFlags with the specified com.trolltech.qt.gui.QGraphicsItem$GraphicsItemFlag[] QGraphicsItem$GraphicsItemFlag values set.


resolve

public static QGraphicsItem.GraphicsItemFlag resolve(int value)
Returns the QGraphicsItem$GraphicsItemFlag constant with the specified int.