Qt Jambi Home

com.trolltech.qt.gui
Enum QGraphicsItem.GraphicsItemFlag

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

public static enum QGraphicsItem.GraphicsItemFlag
extends java.lang.Enum<QGraphicsItem.GraphicsItemFlag>
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.


Enum Constant Summary
ItemClipsChildrenToShape
          The item clips the painting of all its descendents to its own shape.
ItemClipsToShape
          The item clips (i.e., restricts) its own painting to inside its shape.
ItemIgnoresTransformations
          The item ignores inherited transformations (i.e., its position is still relative to its parent, but the parent or view rotation, zoom or shear transformations are ignored).
ItemIsFocusable
          The item supports keyboard input focus (i.e., it is an input item).
ItemIsMovable
          The item supports interactive movement using the mouse.
ItemIsSelectable
          The item supports selection.
 
Method Summary
static QGraphicsItem.GraphicsItemFlags createQFlags(QGraphicsItem.GraphicsItemFlag... values)
           
static QGraphicsItem.GraphicsItemFlag resolve(int value)
           
 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)
          Returns the enum constant of this type with the specified name.
static QGraphicsItem.GraphicsItemFlag[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
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
 

Enum Constant 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.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().


ItemClipsToShape

public static final QGraphicsItem.GraphicsItemFlag ItemClipsToShape

The item clips (i.e., restricts) its own painting to inside its shape. Its paintEvent() function cannot draw outside its shape. For complex shapes, this function can be expensive. 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 descendents 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.e., its position is still relative to its parent, but the parent or view rotation, zoom or shear transformations are ignored). This flag is particularly useful for text label items, which can become unreadable when the view zooms away from the scene. By default, this flag is disabled. This flag was introduced in Qt 4.3.

Method Detail

values

public static QGraphicsItem.GraphicsItemFlag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (QGraphicsItem.GraphicsItemFlag c : QGraphicsItem.GraphicsItemFlag.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static QGraphicsItem.GraphicsItemFlag valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

value

public int value()
Description copied from interface: QtEnumerator
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)

resolve

public static QGraphicsItem.GraphicsItemFlag resolve(int value)

Qt Jambi Home