Qt Jambi Home

com.trolltech.qt.gui
Enum QGraphicsView.ViewportUpdateMode

java.lang.Object
  extended by java.lang.Enum<QGraphicsView.ViewportUpdateMode>
      extended by com.trolltech.qt.gui.QGraphicsView.ViewportUpdateMode
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QGraphicsView.ViewportUpdateMode>
Enclosing class:
QGraphicsView

public static enum QGraphicsView.ViewportUpdateMode
extends java.lang.Enum<QGraphicsView.ViewportUpdateMode>
implements QtEnumerator

This enum describes how QGraphicsView updates its viewport when the scene contents change or are exposed.

See Also:
viewportUpdateMode

Enum Constant Summary
FullViewportUpdate
          When any visible part of the scene changes or is reexposed, QGraphicsView will update the entire viewport.
MinimalViewportUpdate
          QGraphicsView will determine the minimal viewport region that requires a redraw, minimizing the time spent drawing by avoiding a redraw of areas that have not changed.
NoViewportUpdate
          QGraphicsView will never update its viewport when the scene changes; the user is expected to control all updates.
SmartViewportUpdate
          QGraphicsView will attempt to find an optimal update mode by analyzing the areas that require a redraw.
 
Method Summary
static QGraphicsView.ViewportUpdateMode 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.ViewportUpdateMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QGraphicsView.ViewportUpdateMode[] 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

FullViewportUpdate

public static final QGraphicsView.ViewportUpdateMode FullViewportUpdate

When any visible part of the scene changes or is reexposed, QGraphicsView will update the entire viewport. This approach is fastest when QGraphicsView spends more time figuring out what to draw than it would spend drawing (e.g., when very many small items are repeatedly updated). This is the preferred update mode for viewports that do not support partial updates, such as QGLWidget.


MinimalViewportUpdate

public static final QGraphicsView.ViewportUpdateMode MinimalViewportUpdate

QGraphicsView will determine the minimal viewport region that requires a redraw, minimizing the time spent drawing by avoiding a redraw of areas that have not changed. This is QGraphicsView's default mode. Although this approach provides the best performance in general, if there are many small visible changes on the scene, QGraphicsView might end up spending more time finding the minimal approach than it will spend drawing.


SmartViewportUpdate

public static final QGraphicsView.ViewportUpdateMode SmartViewportUpdate

QGraphicsView will attempt to find an optimal update mode by analyzing the areas that require a redraw.


NoViewportUpdate

public static final QGraphicsView.ViewportUpdateMode NoViewportUpdate

QGraphicsView will never update its viewport when the scene changes; the user is expected to control all updates. This mode disables all (potentially slow) item visibility testing in QGraphicsView, and is suitable for scenes that either require a fixed frame rate, or where the viewport is otherwise updated externally.

Method Detail

values

public static final QGraphicsView.ViewportUpdateMode[] 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.ViewportUpdateMode c : QGraphicsView.ViewportUpdateMode.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.ViewportUpdateMode 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

resolve

public static QGraphicsView.ViewportUpdateMode resolve(int value)

Qt Jambi Home