|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QGraphicsItem.GraphicsItemChange>
com.trolltech.qt.gui.QGraphicsItem.GraphicsItemChange
public static enum QGraphicsItem.GraphicsItemChange
This enum describes the state changes that are notified by QGraphicsItem.:itemChange(). The notifications are sent as the state changes, and in some cases, adjustments can be made (see the documentation for each change for details).
Note: Be careful with calling functions on the QGraphicsItem itself inside itemChange, as certain function calls can lead to unwanted recursion. For example, you cannot call setPos in itemChange on an ItemPositionChange notification, as the setPos function will again call itemChange(ItemPositionChange). Instead, you can return the new, adjusted position from itemChange.
Enum Constant Summary | |
---|---|
ItemChildAddedChange
A child is added to this item. |
|
ItemChildRemovedChange
A child is removed from this item. |
|
ItemEnabledChange
The item's enabled state changes. |
|
ItemMatrixChange
The item's affine transformation matrix is changing. |
|
ItemParentChange
The item's parent changes. |
|
ItemPositionChange
The item's position changes. |
|
ItemPositionHasChanged
The item's position has changed. |
|
ItemSceneChange
The item is moved to a new scene. |
|
ItemSelectedChange
The item's selected state changes. |
|
ItemTransformChange
The item's transformation matrix changes. |
|
ItemTransformHasChanged
The item's transformation matrix has changed. |
|
ItemVisibleChange
The item's visible state changes. |
Method Summary | |
---|---|
static QGraphicsItem.GraphicsItemChange |
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.GraphicsItemChange |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static QGraphicsItem.GraphicsItemChange[] |
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.GraphicsItemChange ItemPositionChange
The item's position changes. This notification is only sent when the item's local position changes, relative to its parent, has changed (i.e., as a result of calling setPos or moveBy). The value argument is the new position (i.e., a QPointF). You can call pos to get the original position. Do not call setPos or moveBy in itemChange as this notification is delivered; instead, you can return the new, adjusted position from itemChange. After this notification, QGraphicsItem immediately sends the ItemPositionHasChanged notification if the position changed.
public static final QGraphicsItem.GraphicsItemChange ItemMatrixChange
The item's affine transformation matrix is changing. This value is obsolete; you can use ItemTransformChange instead.
public static final QGraphicsItem.GraphicsItemChange ItemVisibleChange
The item's visible state changes. If the item is presently visible, it will become invisible, and vice verca. The value argument is the new visible state (i.e., true or false). Do not call setVisible in itemChange as this notification is delivered; instead, you can return the new visible state from itemChange.
public static final QGraphicsItem.GraphicsItemChange ItemEnabledChange
The item's enabled state changes. If the item is presently enabled, it will become disabled, and vice verca. The value argument is the new enabled state (i.e., true or false). Do not call setEnabled in itemChange as this notification is delivered. Instead, you can return the new state from itemChange.
public static final QGraphicsItem.GraphicsItemChange ItemSelectedChange
The item's selected state changes. If the item is presently selected, it will become unselected, and vice verca. The value argument is the new selected state (i.e., true or false). Do not call setSelected in itemChange as this notification is delivered(); instead, you can return the new selected state from itemChange.
public static final QGraphicsItem.GraphicsItemChange ItemParentChange
The item's parent changes. The value argument is the new parent item (i.e., a QGraphicsItem pointer). Do not call setParentItem in itemChange as this notification is delivered; instead, you can return the new parent from itemChange.
public static final QGraphicsItem.GraphicsItemChange ItemChildAddedChange
A child is added to this item. The value argument is the new child item (i.e., a QGraphicsItem pointer). Do not pass this item to any item's setParentItem function as this notification is delivered. The return value is unused; you cannot adjust anything in this notification. Note that the new child might not be fully constructed when this notification is sent; calling pure virtual functions on the child can lead to a crash.
public static final QGraphicsItem.GraphicsItemChange ItemChildRemovedChange
A child is removed from this item. The value argument is the child item that is about to be removed (i.e., a QGraphicsItem pointer). The return value is unused; you cannot adjust anything in this notification.
public static final QGraphicsItem.GraphicsItemChange ItemTransformChange
The item's transformation matrix changes. This notification is only sent when the item's local transformation matrix changes (i.e., as a result of calling setTransform, or one of the convenience transformation functions, such as rotate). The value argument is the new matrix (i.e., a QTransform); to get the old matrix, call transform. Do not call setTransform or any of the transformation convenience functions in itemChange as this notification is delivered; instead, you can return the new matrix from itemChange.
public static final QGraphicsItem.GraphicsItemChange ItemPositionHasChanged
The item's position has changed. This notification is only sent after the item's local position, relative to its parent, has changed. The value argument is the new position (the same as pos), and QGraphicsItem ignores the return value for this notification (i.e., a read-only notification).
public static final QGraphicsItem.GraphicsItemChange ItemTransformHasChanged
The item's transformation matrix has changed. This notification is only sent after the item's local trasformation matrix has changed. The value argument is the new matrix (same as transform), and QGraphicsItem ignores the return value for this notification (i.e., a read-only notification).
public static final QGraphicsItem.GraphicsItemChange ItemSceneChange
The item is moved to a new scene. This notification is also sent when the item is added to its initial scene, and when it is removed. The value argument is the new scene (i.e., a QGraphicsScene pointer), or a null pointer if the item is removed from a scene. Do not override this change by passing this item to QGraphicsScene::addItem() as this notification is delivered; instead, you can return the new scene from itemChange.
Method Detail |
---|
public static QGraphicsItem.GraphicsItemChange[] values()
for (QGraphicsItem.GraphicsItemChange c : QGraphicsItem.GraphicsItemChange.values()) System.out.println(c);
public static QGraphicsItem.GraphicsItemChange 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.GraphicsItemChange resolve(int value)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |