com.trolltech.qt.gui
Class QGraphicsItem.GraphicsItemChange

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

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

ItemVisibleHasChanged , ItemEnabledHasChanged , ItemSelectedHasChanged , ItemParentHasChanged , ItemSceneHasChanged

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

See Also:
Serialized Form

Field Summary
static QGraphicsItem.GraphicsItemChange ItemChildAddedChange
          A child is added to this item.
static QGraphicsItem.GraphicsItemChange ItemChildRemovedChange
          A child is removed from this item.
static QGraphicsItem.GraphicsItemChange ItemCursorChange
          The item's cursor changes.
static QGraphicsItem.GraphicsItemChange ItemCursorHasChanged
          The item's cursor has changed.
static QGraphicsItem.GraphicsItemChange ItemEnabledChange
          The item's enabled state changes.
static QGraphicsItem.GraphicsItemChange ItemEnabledHasChanged
          The item's enabled state has changed.
static QGraphicsItem.GraphicsItemChange ItemFlagsChange
          The item's flags change.
static QGraphicsItem.GraphicsItemChange ItemFlagsHaveChanged
          The item's flags have changed.
static QGraphicsItem.GraphicsItemChange ItemMatrixChange
          The item's affine transformation matrix is changing.
static QGraphicsItem.GraphicsItemChange ItemOpacityChange
          The item's opacity changes.
static QGraphicsItem.GraphicsItemChange ItemOpacityHasChanged
          The item's opacity has changed.
static QGraphicsItem.GraphicsItemChange ItemParentChange
          The item's parent changes.
static QGraphicsItem.GraphicsItemChange ItemParentHasChanged
          The item's parent has changed.
static QGraphicsItem.GraphicsItemChange ItemPositionChange
          The item's position changes.
static QGraphicsItem.GraphicsItemChange ItemPositionHasChanged
          The item's position has changed.
static QGraphicsItem.GraphicsItemChange ItemSceneChange
          The item is moved to a new scene.
static QGraphicsItem.GraphicsItemChange ItemSceneHasChanged
          The item's scene has changed.
static QGraphicsItem.GraphicsItemChange ItemSelectedChange
          The item's selected state changes.
static QGraphicsItem.GraphicsItemChange ItemSelectedHasChanged
          The item's selected state has changed.
static QGraphicsItem.GraphicsItemChange ItemToolTipChange
          The item's tooltip changes.
static QGraphicsItem.GraphicsItemChange ItemToolTipHasChanged
          The item's tooltip has changed.
static QGraphicsItem.GraphicsItemChange ItemTransformChange
          The item's transformation matrix changes.
static QGraphicsItem.GraphicsItemChange ItemTransformHasChanged
          The item's transformation matrix has changed.
static QGraphicsItem.GraphicsItemChange ItemVisibleChange
          The item's visible state changes.
static QGraphicsItem.GraphicsItemChange ItemVisibleHasChanged
          The item's visible state has changed.
static QGraphicsItem.GraphicsItemChange ItemZValueChange
          The item's Z-value changes.
static QGraphicsItem.GraphicsItemChange ItemZValueHasChanged
          The item's Z-value has changed.
 
Method Summary
static QGraphicsItem.GraphicsItemChange resolve(int value)
          Returns the QGraphicsItem$GraphicsItemChange 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.GraphicsItemChange valueOf(java.lang.String name)
           
static QGraphicsItem.GraphicsItemChange[] 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

ItemPositionChange

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.


ItemMatrixChange

public static final QGraphicsItem.GraphicsItemChange ItemMatrixChange
The item's affine transformation matrix is changing. This value is obsolete; you can use ItemTransformChange instead.


ItemVisibleChange

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


ItemEnabledChange

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


ItemSelectedChange

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


ItemParentChange

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


ItemChildAddedChange

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.


ItemChildRemovedChange

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.


ItemTransformChange

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


ItemPositionHasChanged

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).


ItemTransformHasChanged

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).


ItemSceneChange

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(). Use this feature with caution; objecting to a scene change can quickly lead to unwanted recursion.


ItemVisibleHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemVisibleHasChanged
The item's visible state has changed. The value argument is the new visible state (i.e., true or false). Do not call setVisible() in itemChange() as this notification is delivered. The return value is ignored.


ItemEnabledHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemEnabledHasChanged
The item's enabled state has changed. The value argument is the new enabled state (i.e., true or false). Do not call setEnabled() in itemChange() as this notification is delivered. The return value is ignored.


ItemSelectedHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemSelectedHasChanged
The item's selected state has changed. The value argument is the new selected state (i.e., true or false). Do not call setSelected() in itemChange() as this notification is delivered. The return value is ignored.


ItemParentHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemParentHasChanged
The item's parent has changed. The value argument is the new parent (i.e., a pointer to a QGraphicsItem). Do not call setParentItem() in itemChange() as this notification is delivered. The return value is ignored.


ItemSceneHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemSceneHasChanged
The item's scene has changed. The value argument is the new scene (i.e., a pointer to a QGraphicsScene). Do not call setScene() in itemChange() as this notification is delivered. The return value is ignored.


ItemCursorChange

public static final QGraphicsItem.GraphicsItemChange ItemCursorChange
The item's cursor changes. The value argument is the new cursor (i.e., a QCursor). Do not call setCursor() in itemChange() as this notification is delivered. Instead, you can return a new cursor from itemChange().


ItemCursorHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemCursorHasChanged
The item's cursor has changed. The value argument is the new cursor (i.e., a QCursor). Do not call setCursor() as this notification is delivered. The return value is ignored.


ItemToolTipChange

public static final QGraphicsItem.GraphicsItemChange ItemToolTipChange
The item's tooltip changes. The value argument is the new tooltip (i.e., a QToolTip). Do not call setToolTip() in itemChange() as this notification is delivered. Instead, you can return a new tooltip from itemChange().


ItemToolTipHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemToolTipHasChanged
The item's tooltip has changed. The value argument is the new tooltip (i.e., a QToolTip). Do not call setToolTip() as this notification is delivered. The return value is ignored.


ItemFlagsChange

public static final QGraphicsItem.GraphicsItemChange ItemFlagsChange
The item's flags change. The value argument is the new flags (i.e., a quint32). Do not call setFlags() in itemChange() as this notification is delivered. Instead, you can return the new flags from itemChange().


ItemFlagsHaveChanged

public static final QGraphicsItem.GraphicsItemChange ItemFlagsHaveChanged
The item's flags have changed. The value argument is the new flags (i.e., a quint32). Do not call setFlags() in itemChange() as this notification is delivered. The return value is ignored.


ItemZValueChange

public static final QGraphicsItem.GraphicsItemChange ItemZValueChange
The item's Z-value changes. The value argument is the new Z-value (i.e., a double). Do not call setZValue() in itemChange() as this notification is delivered. Instead, you can return a new Z-value from itemChange().


ItemZValueHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemZValueHasChanged
The item's Z-value has changed. The value argument is the new Z-value (i.e., a double). Do not call setZValue() as this notification is delivered. The return value is ignored.


ItemOpacityChange

public static final QGraphicsItem.GraphicsItemChange ItemOpacityChange
The item's opacity changes. The value argument is the new opacity (i.e., a double). Do not call setOpacity() in itemChange() as this notification is delivered. Instead, you can return a new opacity from itemChange().


ItemOpacityHasChanged

public static final QGraphicsItem.GraphicsItemChange ItemOpacityHasChanged
The item's opacity has changed. The value argument is the new opacity (i.e., a double). Do not call setOpacity() as this notification is delivered. The return value is ignored.

Method Detail

values

public static QGraphicsItem.GraphicsItemChange[] values()

valueOf

public static QGraphicsItem.GraphicsItemChange 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

resolve

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