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 QGraphicsView.OptimizationFlag

    java.lang.Object
      java.lang.Enum
          com.trolltech.qt.gui.QGraphicsView.OptimizationFlag

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

Enclosing class:
  QGraphicsView

    public static final class QGraphicsView.OptimizationFlag

extends java.lang.Enum
implements QtEnumerator

This enum describes flags that you can enable to improve rendering performance in `QGraphicsView`. By default, none of these flags are set. Note that setting a flag usually imposes a side effect, and this effect can vary between paint devices and platforms.

See Also:
  Serialized Form

Field Summary
`static QGraphicsView.OptimizationFlag` | `DontAdjustForAntialiasing` Disables `QGraphicsView`'s antialiasing auto-adjustment of exposed areas.
`static QGraphicsView.OptimizationFlag` | `DontClipPainter` `QGraphicsView` sometimes clips the painter when rendering the scene contents.
`static QGraphicsView.OptimizationFlag` | `DontSavePainterState` When rendering, `QGraphicsView` protects the painter state (see `QPainter::save()`) when rendering the background or foreground, and when rendering each item.

Method Summary
`static QGraphicsView.OptimizationFlags` | `createQFlags(QGraphicsView.OptimizationFlag[] values)` This function creates a com.trolltech.qt.gui.QGraphicsView$OptimizationFlags with the specified `com.trolltech.qt.gui.QGraphicsView$OptimizationFlag[]` OptimizationFlag values set.
`static QGraphicsView.OptimizationFlag` | `resolve(int value)` Returns the OptimizationFlag 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 QGraphicsView.OptimizationFlag` | `valueOf(java.lang.String name)`
`static QGraphicsView.OptimizationFlag[]` | `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

### DontClipPainter

    public static final QGraphicsView.OptimizationFlag DontClipPainter

  `QGraphicsView` sometimes clips the painter when rendering the scene contents. This can generally improve performance (e.g., rendering only small parts of a large pixmap), and protects against rendering mistakes (e.g., drawing outside bounding rectangles, or outside the exposed area). In some situations, however, the painter clip can slow down rendering; especially when all painting is restricted to inside exposed areas. By enabling this flag, `QGraphicsView` will completely disable its implicit clipping. Note that rendering artifacts from using a semi-transparent foreground or background brush can occur if clipping is disabled.

### DontSavePainterState

    public static final QGraphicsView.OptimizationFlag DontSavePainterState

  When rendering, `QGraphicsView` protects the painter state (see `QPainter::save()`) when rendering the background or foreground, and when rendering each item. This allows you to leave the painter in an altered state (i.e., you can call `QPainter::setPen()` or `QPainter::setBrush()` without restoring the state after painting). However, if the items consistently do restore the state, you should enable this flag to prevent `QGraphicsView` from doing the same.

### DontAdjustForAntialiasing

    public static final QGraphicsView.OptimizationFlag DontAdjustForAntialiasing

  Disables `QGraphicsView`'s antialiasing auto-adjustment of exposed areas. Items that render antialiased lines on the boundaries of their `QGraphicsItem::boundingRect()` can end up rendering parts of the line outside. To prevent rendering artifacts, `QGraphicsView` expands all exposed regions by 2 pixels in all directions. If you enable this flag, `QGraphicsView` will no longer perform these adjustments, minimizing the areas that require redrawing, which improves performance. A common side effect is that items that do draw with antialiasing can leave painting traces behind on the scene as they are moved.

Method Detail

### values

    public static QGraphicsView.OptimizationFlag[] values()

### valueOf

    public static QGraphicsView.OptimizationFlag 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`

### createQFlags

    public static QGraphicsView.OptimizationFlags createQFlags(QGraphicsView.OptimizationFlag[] values)

  This function creates a com.trolltech.qt.gui.QGraphicsView$OptimizationFlags with the specified `com.trolltech.qt.gui.QGraphicsView$OptimizationFlag[]` OptimizationFlag values set.

### resolve

    public static QGraphicsView.OptimizationFlag resolve(int value)

  Returns the OptimizationFlag 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