summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-09-04 17:09:47 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-09-06 18:31:43 +0200
commit4e2656a6d2de3be6cb98cbb98bbadf17815dae48 (patch)
treeda01f8daf752aaba7780125fe58503afe07205cc /src
parent68198de4dbe71ae97dc733606871f51bde804c1e (diff)
QStyleOptionGraphicsItem: remove deprecated member matrix/levelOfDetail
QStyleOptionGraphicsItem::matrix and levelOfDetail are deprecated and not used anywhere anymore. Change-Id: Id4b0fa8ac3ac53d771e858ecda5524a5e690342d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp14
-rw-r--r--src/widgets/styles/qstyleoption.cpp36
-rw-r--r--src/widgets/styles/qstyleoption.h2
3 files changed, 5 insertions, 47 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index fef3f0774f..942126f712 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -429,16 +429,12 @@
in Qt 4.5.
\value ItemUsesExtendedStyleOption The item makes use of either
- \l{QStyleOptionGraphicsItem::} {exposedRect} or
- \l{QStyleOptionGraphicsItem::} {matrix} in
+ \l{QStyleOptionGraphicsItem::} {exposedRect} in
QStyleOptionGraphicsItem. By default, the
\l{QStyleOptionGraphicsItem::} {exposedRect} is initialized to the
- item's boundingRect() and the
- \l{QStyleOptionGraphicsItem::}{matrix} is untransformed. You can
+ item's boundingRect(). You can
enable this flag for the style options to be set up with more
- fine-grained values. Note that
- QStyleOptionGraphicsItem::levelOfDetail is unaffected by this flag
- and always initialized to 1. Use
+ fine-grained values. Use
QStyleOptionGraphicsItem::levelOfDetailFromTransform() if you need
a higher value. This flag was introduced in Qt 4.6.
@@ -1476,7 +1472,6 @@ void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, con
const QRectF brect = q->boundingRect();
option->state = QStyle::State_None;
option->rect = brect.toRect();
- option->levelOfDetail = 1;
option->exposedRect = brect;
// Style animations require a QObject-based animation target.
@@ -1502,9 +1497,6 @@ void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, con
if (!(flags & QGraphicsItem::ItemUsesExtendedStyleOption))
return;
- // Initialize QStyleOptionGraphicsItem specific values (matrix, exposedRect).
- option->matrix = worldTransform; //### discards perspective
-
if (!allItems) {
// Determine the item's exposed area
option->exposedRect = QRectF();
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index b7b5b99e3a..485b1858c2 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -3630,7 +3630,7 @@ QStyleOptionSizeGrip::QStyleOptionSizeGrip(int version)
Constructs a QStyleOptionGraphicsItem.
*/
QStyleOptionGraphicsItem::QStyleOptionGraphicsItem()
- : QStyleOption(Version, Type), levelOfDetail(1)
+ : QStyleOption(Version, Type)
{
}
@@ -3638,7 +3638,7 @@ QStyleOptionGraphicsItem::QStyleOptionGraphicsItem()
\internal
*/
QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version)
- : QStyleOption(version, Type), levelOfDetail(1)
+ : QStyleOption(version, Type)
{
}
@@ -3686,38 +3686,6 @@ qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &wor
*/
/*!
- \variable QStyleOptionGraphicsItem::matrix
- \brief the complete transformation matrix for the item
- \obsolete
-
- The QTransform 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 dimensions of an item in screen coordinates (i.e., pixels),
- you can use the mapping functions of QTransform, such as QTransform::map().
-
- This member is only initialized for items that have the
- QGraphicsItem::ItemUsesExtendedStyleOption flag set.
-
- \sa QStyleOptionGraphicsItem::levelOfDetailFromTransform()
-*/
-
-/*!
- \variable QStyleOptionGraphicsItem::levelOfDetail
- \obsolete
-
- Use QStyleOptionGraphicsItem::levelOfDetailFromTransform()
- together with QPainter::worldTransform() instead.
-*/
-
-/*!
\class QStyleHintReturn
\brief The QStyleHintReturn class provides style hints that return more
than basic data types.
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 22ac309cc6..38e70e2078 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -669,8 +669,6 @@ public:
enum StyleOptionVersion { Version = 1 };
QRectF exposedRect;
- QTransform matrix;
- qreal levelOfDetail;
QStyleOptionGraphicsItem();
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }