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 QStyleOptionGraphicsItem

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.gui.QStyleOption
                      com.trolltech.qt.gui.QStyleOptionGraphicsItem

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

    public class QStyleOptionGraphicsItem

extends QStyleOption
implements java.lang.Cloneable

The `QStyleOptionGraphicsItem` class is used to describe the parameters needed to draw a `QGraphicsItem`. For performance reasons, the access to the member variables is direct (i.e., using the `.` or `->` operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters.

For an example demonstrating how style options can be used, see the Styles example.

See also:
  `QStyleOption`, and `QGraphicsItem::paint()`.

Nested Class Summary
`static class` | `QStyleOptionGraphicsItem.StyleOptionType` This enum is used to hold information about the type of the style option, and is defined for each `QStyleOption` subclass.
`static class` | `QStyleOptionGraphicsItem.StyleOptionVersion` This enum is used to hold information about the version of the style option, and is defined for each `QStyleOption` subclass.

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QStyleOption
`QStyleOption.OptionType`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QStyleOptionGraphicsItem()` Constructs a `QStyleOptionGraphicsItem`.
`QStyleOptionGraphicsItem(QStyleOptionGraphicsItem other)` Constructs a copy of `other`.

Method Summary
`QStyleOptionGraphicsItem` | `clone()` This method is reimplemented for internal reasons
`QRectF` | `exposedRect()` This variable holds the exposed rectangle, in item coordinates.
`double` | `levelOfDetail()` This variable holds a simple metric for determining an item's level of detail.
`QMatrix` | `matrix()` This variable holds the complete transformation matrix for the item.
`void` | `setExposedRect(QRectF exposedRect)` This variable holds the exposed rectangle, in item coordinates.
`void` | `setLevelOfDetail(double levelOfDetail)` This variable holds a simple metric for determining an item's level of detail.
`void` | `setMatrix(QMatrix matrix)` This variable holds the complete transformation matrix for the item.

Methods inherited from class com.trolltech.qt.gui.QStyleOption
`direction, fontMetrics, initFrom, palette, rect, setDirection, setFontMetrics, setPalette, setRect, setState, setType, setVersion, state, type, version`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

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

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QStyleOptionGraphicsItem

    public QStyleOptionGraphicsItem()

  Constructs a `QStyleOptionGraphicsItem`. The levelOfDetail parameter is initialized to 1.

### QStyleOptionGraphicsItem

    public QStyleOptionGraphicsItem(QStyleOptionGraphicsItem other)

  Constructs a copy of `other`.

Method Detail

### setExposedRect

    public final void setExposedRect(QRectF exposedRect)

  This variable holds the exposed rectangle, in item coordinates. Make use of this rectangle to speed up item drawing when only parts of the item are exposed. If the whole item is exposed, this rectangle will be the same as `QGraphicsItem::boundingRect()`.

### exposedRect

    public final QRectF exposedRect()

  This variable holds the exposed rectangle, in item coordinates. Make use of this rectangle to speed up item drawing when only parts of the item are exposed. If the whole item is exposed, this rectangle will be the same as `QGraphicsItem::boundingRect()`.

### setMatrix

    public final void setMatrix(QMatrix matrix)

  This variable holds the complete transformation matrix for the item. This matrix is the sum of the item's scene matrix and the matrix of the painter used for drawing the item. It is provided for convenience, allowing anvanced level-of-detail metrics that can be used to speed up item drawing.

  To find the dimentions of an item in screen coordinates (i.e., pixels), you can use the mapping functions of `QMatrix`, such as `QMatrix::map()`.

See also:
  QStyleOptionGraphicsItem::levelOfDetail.

### matrix

    public final QMatrix matrix()

  This variable holds the complete transformation matrix for the item. This matrix is the sum of the item's scene matrix and the matrix of the painter used for drawing the item. It is provided for convenience, allowing anvanced level-of-detail metrics that can be used to speed up item drawing.

  To find the dimentions of an item in screen coordinates (i.e., pixels), you can use the mapping functions of `QMatrix`, such as `QMatrix::map()`.

See also:
  QStyleOptionGraphicsItem::levelOfDetail.

### setLevelOfDetail

    public final void setLevelOfDetail(double levelOfDetail)

  This variable holds a simple metric for determining an item's level of detail. This simple metric provides an easy way to determine the level of detail for an item. Its value represents the maximum value of the height and width of a unity rectangle, mapped using the complete transformation matrix of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2.

  For more advanced level-of-detail metrics, use QStyleOptionGraphicsItem::matrix directly.

See also:
  QStyleOptionGraphicsItem::matrix.

### levelOfDetail

    public final double levelOfDetail()

  This variable holds a simple metric for determining an item's level of detail. This simple metric provides an easy way to determine the level of detail for an item. Its value represents the maximum value of the height and width of a unity rectangle, mapped using the complete transformation matrix of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2.

  For more advanced level-of-detail metrics, use QStyleOptionGraphicsItem::matrix directly.

See also:
  QStyleOptionGraphicsItem::matrix.

### clone

    public QStyleOptionGraphicsItem clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `QStyleOption`

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