Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QGraphicsItem.CacheMode

    java.lang.Object
      java.lang.Enum
          com.trolltech.qt.gui.QGraphicsItem.CacheMode

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable

Enclosing class:
  QGraphicsItem

    public static final class QGraphicsItem.CacheMode

extends java.lang.Enum
implements QtEnumerator

This enum describes `QGraphicsItem`'s cache modes. Caching is used to speed up rendering by allocating and rendering to an off-screen pixel buffer, which can be reused when the item requires redrawing. For some paint devices, the cache is stored directly in graphics memory, which makes rendering very quick.

See also:
  `QGraphicsItem::setCacheMode()`.

See Also:
  Serialized Form

Field Summary
`static QGraphicsItem.CacheMode` | `DeviceCoordinateCache` Caching is enabled at the paint device level, in device coordinates.
`static QGraphicsItem.CacheMode` | `ItemCoordinateCache` Caching is enabled for the item's logical (local) coordinate system.
`static QGraphicsItem.CacheMode` | `NoCache` The default; all item caching is disabled.

Method Summary
`static QGraphicsItem.CacheMode` | `resolve(int value)` Returns the QGraphicsItem$CacheMode 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.CacheMode` | `valueOf(java.lang.String name)`
`static QGraphicsItem.CacheMode[]` | `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

### NoCache

    public static final QGraphicsItem.CacheMode NoCache

  The default; all item caching is disabled. `QGraphicsItem::paint()` is called every time the item needs redrawing.

### ItemCoordinateCache

    public static final QGraphicsItem.CacheMode ItemCoordinateCache

  Caching is enabled for the item's logical (local) coordinate system. `QGraphicsItem` creates an off-screen pixel buffer with a configurable size / resolution that you can pass to `QGraphicsItem::setCacheMode()`. Rendering quality will typically degrade, depending on the resolution of the cache and the item transformation. The first time the item is redrawn, it will render itself into the cache, and the cache is then reused for every subsequent expose. The cache is also reused as the item is transformed. To adjust the resolution of the cache, you can call `setCacheMode()` again.

### DeviceCoordinateCache

    public static final QGraphicsItem.CacheMode DeviceCoordinateCache

  Caching is enabled at the paint device level, in device coordinates. This mode is for items that can move, but are not rotated, scaled or sheared. If the item is transformed directly or indirectly, the cache will be regenerated automatically. Unlike ItemCoordinateCacheMode, `DeviceCoordinateCache` always renders at maximum quality.

Method Detail

### values

    public static QGraphicsItem.CacheMode[] values()

### valueOf

    public static QGraphicsItem.CacheMode 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.CacheMode resolve(int value)

  Returns the QGraphicsItem$CacheMode constant with the specified `int`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD