|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QStyleOption
com.trolltech.qt.gui.QStyleOptionGraphicsItem
public class QStyleOptionGraphicsItem
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.
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.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
|
QStyleOptionGraphicsItem()
Constructs a QStyleOptionGraphicsItem. |
protected |
QStyleOptionGraphicsItem(int version)
This method is used internally by Qt Jambi. |
|
QStyleOptionGraphicsItem(QStyleOptionGraphicsItem other)
Constructs a copy of other. |
Method Summary | |
---|---|
QRectF |
exposedRect()
Returns the exposed rectangle, in item coordinates. |
static QStyleOptionGraphicsItem |
fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionGraphicsItem instance pointed to by nativePointer |
double |
levelOfDetail()
Returns a simple metric for determining an item's level of detail. |
QMatrix |
matrix()
Returns the complete transformation matrix for the item. |
static QNativePointer |
nativePointerArray(QStyleOptionGraphicsItem[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionGraphicsItem array. |
void |
setExposedRect(QRectF exposedRect)
Sets the exposed rectangle, in item coordinates to exposedRect. |
void |
setLevelOfDetail(double levelOfDetail)
Sets a simple metric for determining an item's level of detail to levelOfDetail. |
void |
setMatrix(QMatrix matrix)
Sets the complete transformation matrix for the item to matrix. |
Methods inherited from class com.trolltech.qt.gui.QStyleOption |
---|
direction, fontMetrics, initFrom, nativePointerArray, palette, rect, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setType, setVersion, state, type, version |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QStyleOptionGraphicsItem(QStyleOptionGraphicsItem other)
Constructs a copy of other.
public QStyleOptionGraphicsItem()
Constructs a QStyleOptionGraphicsItem. The levelOfDetail parameter is initialized to 1.
protected QStyleOptionGraphicsItem(int version)
This method is used internally by Qt Jambi. Do not use it in your applications.
Method Detail |
---|
public final void setExposedRect(QRectF exposedRect)
Sets the exposed rectangle, in item coordinates to exposedRect.
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().
public final QRectF exposedRect()
Returns 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().
public final void setMatrix(QMatrix matrix)
Sets the complete transformation matrix for the item to matrix.
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().
public final QMatrix matrix()
Returns 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().
public final void setLevelOfDetail(double levelOfDetail)
Sets a simple metric for determining an item's level of detail to levelOfDetail.
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.
public final double levelOfDetail()
Returns 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.
public static QStyleOptionGraphicsItem fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QStyleOptionGraphicsItem[] array)
array
- the array that the returned pointer will point to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |