Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.gui
Enum QGraphicsView.OptimizationFlag

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

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable<QGraphicsView.OptimizationFlag>

Enclosing class:
  QGraphicsView

    public static enum QGraphicsView.OptimizationFlag

extends java.lang.Enum<QGraphicsView.OptimizationFlag>
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.

Enum Constant Summary
`DontAdjustForAntialiasing` Disables `QGraphicsView`'s antialiasing auto-adjustment of exposed areas.
`DontClipPainter` `QGraphicsView` sometimes clips the painter when rendering the scene contents.
`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)`
`static QGraphicsView.OptimizationFlag` | `resolve(int value)`
`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)` Returns the enum constant of this type with the specified name.
`static QGraphicsView.OptimizationFlag[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant 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 final QGraphicsView.OptimizationFlag[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(QGraphicsView.OptimizationFlag c : QGraphicsView.OptimizationFlag.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static QGraphicsView.OptimizationFlag valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

### value

    public int value()

  Description copied from interface: `QtEnumerator`
  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)

### resolve

    public static QGraphicsView.OptimizationFlag resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD