|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QGraphicsItem.GraphicsItemFlag>
com.trolltech.qt.gui.QGraphicsItem.GraphicsItemFlag
public static enum QGraphicsItem.GraphicsItemFlag
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 |
---|
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.
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.
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().
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.
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.
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 |
---|
public static QGraphicsItem.GraphicsItemFlag[] values()
for (QGraphicsItem.GraphicsItemFlag c : QGraphicsItem.GraphicsItemFlag.values()) System.out.println(c);
public static QGraphicsItem.GraphicsItemFlag valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic int value()
QtEnumerator
value
in interface QtEnumerator
public static QGraphicsItem.GraphicsItemFlags createQFlags(QGraphicsItem.GraphicsItemFlag... values)
public static QGraphicsItem.GraphicsItemFlag resolve(int value)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |