summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstyleoption.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-07-29 06:41:41 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-07-29 06:41:41 (GMT)
commitbccbd58365b1a4dfce32701254145ba124270665 (patch)
tree7f03169fe44a0ff8a1687d84d8f61c3c934561f0 /src/gui/styles/qstyleoption.cpp
parentc50124a15be1e564190f4bb115e2fc67a4c82036 (diff)
parenta45fe18569be1fc91e26f6e58d2f16bc8c6958de (diff)
downloadQt-bccbd58365b1a4dfce32701254145ba124270665.zip
Qt-bccbd58365b1a4dfce32701254145ba124270665.tar.gz
Qt-bccbd58365b1a4dfce32701254145ba124270665.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/styles/qstyleoption.cpp')
-rw-r--r--src/gui/styles/qstyleoption.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index 7547dda..0ff7995 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5007,11 +5007,6 @@ QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version)
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.
-
- \sa QStyleOptionGraphicsItem::matrix
*/
qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &worldTransform)
{
@@ -5038,20 +5033,32 @@ qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &wor
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().
+
+ This member is only initialized for items that have the
+ QGraphicsItem::ItemUsesExtendedStyleOption flag set.
*/
/*!
\variable QStyleOptionGraphicsItem::matrix
\brief the complete transformation matrix for the item
+ \obsolete
- 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,
+ The QMatrix provided through this member does include information about
+ any perspective transformations applied to the view or item. To get the
+ correct transformation matrix, use QPainter::transform() on the painter
+ passed into the QGraphicsItem::paint() implementation.
+
+ This matrix is the combination 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),
+ To find the dimensions of an item in screen coordinates (i.e., pixels),
you can use the mapping functions of QMatrix, such as QMatrix::map().
+ This member is only initialized for items that have the
+ QGraphicsItem::ItemUsesExtendedStyleOption flag set.
+
\sa QStyleOptionGraphicsItem::levelOfDetailFromTransform()
*/
@@ -5059,7 +5066,7 @@ qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &wor
\variable QStyleOptionGraphicsItem::levelOfDetail
\obsolete
- Use QStyleOptionGraphicsItem::levelOfDetailFromTransform
+ Use QStyleOptionGraphicsItem::levelOfDetailFromTransform()
together with QPainter::worldTransform() instead.
*/