|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Enum
com.trolltech.qt.gui.QGraphicsItem.GraphicsItemChange
public static final class QGraphicsItem.GraphicsItemChange
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()
.
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)
|
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 |
---|
public static final QGraphicsItem.GraphicsItemChange ItemPositionChange
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
ItemTransformChange
instead.
public static final QGraphicsItem.GraphicsItemChange ItemVisibleChange
setVisible()
in itemChange()
as this notification is delivered; instead, you can return the new visible state from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemEnabledChange
setEnabled()
in itemChange()
as this notification is delivered. Instead, you can return the new state from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemSelectedChange
setSelected()
in itemChange()
as this notification is delivered(); instead, you can return the new selected state from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemParentChange
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
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
QGraphicsItem
pointer). The return value is unused; you cannot adjust anything in this notification.
public static final QGraphicsItem.GraphicsItemChange ItemTransformChange
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
pos()
), and QGraphicsItem
ignores the return value for this notification (i.e., a read-only notification).
public static final QGraphicsItem.GraphicsItemChange ItemTransformHasChanged
transform()
), and QGraphicsItem
ignores the return value for this notification (i.e., a read-only notification).
public static final QGraphicsItem.GraphicsItemChange ItemSceneChange
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.
public static final QGraphicsItem.GraphicsItemChange ItemVisibleHasChanged
setVisible()
in itemChange()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemEnabledHasChanged
setEnabled()
in itemChange()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemSelectedHasChanged
setSelected()
in itemChange()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemParentHasChanged
QGraphicsItem
). Do not call setParentItem()
in itemChange()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemSceneHasChanged
QGraphicsScene
). Do not call setScene() in itemChange()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemCursorChange
QCursor
). Do not call setCursor()
in itemChange()
as this notification is delivered. Instead, you can return a new cursor from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemCursorHasChanged
QCursor
). Do not call setCursor()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemToolTipChange
QToolTip
). Do not call setToolTip()
in itemChange()
as this notification is delivered. Instead, you can return a new tooltip from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemToolTipHasChanged
QToolTip
). Do not call setToolTip()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemFlagsChange
setFlags()
in itemChange()
as this notification is delivered. Instead, you can return the new flags from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemFlagsHaveChanged
setFlags()
in itemChange()
as this notification is delivered. The return value is ignored.
public static final QGraphicsItem.GraphicsItemChange ItemZValueChange
setZValue()
in itemChange()
as this notification is delivered. Instead, you can return a new Z-value from itemChange()
.
public static final QGraphicsItem.GraphicsItemChange ItemZValueHasChanged
setZValue()
as this notification is delivered. The return value is ignored.
Method Detail |
---|
public static QGraphicsItem.GraphicsItemChange[] values()
public static QGraphicsItem.GraphicsItemChange valueOf(java.lang.String name)
public int value()
value
in interface QtEnumerator
public static QGraphicsItem.GraphicsItemChange resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |