summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstyleoption.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qstyleoption.cpp')
-rw-r--r--src/widgets/styles/qstyleoption.cpp290
1 files changed, 78 insertions, 212 deletions
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 4624c6e7f0..d3a395246c 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWidgets module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "private/qstylehelper_p.h"
@@ -86,9 +50,6 @@ QT_BEGIN_NAMESPACE
The qstyleoption_cast() function will return 0 if the object to
which \c option points is not of the correct type.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyle, QStylePainter
*/
@@ -365,9 +326,6 @@ QStyleOption &QStyleOption::operator=(const QStyleOption &other)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -377,9 +335,8 @@ QStyleOption &QStyleOption::operator=(const QStyleOption &other)
*/
QStyleOptionFocusRect::QStyleOptionFocusRect()
- : QStyleOption(Version, SO_FocusRect)
+ : QStyleOptionFocusRect(Version)
{
- state |= QStyle::State_KeyboardFocusChange; // assume we had one, will be corrected in initFrom()
}
/*!
@@ -465,9 +422,6 @@ QStyleOptionFocusRect::QStyleOptionFocusRect(int version)
without breaking compatibility. If you use qstyleoption_cast(),
you normally do not need to check it.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -477,8 +431,7 @@ QStyleOptionFocusRect::QStyleOptionFocusRect(int version)
*/
QStyleOptionFrame::QStyleOptionFrame()
- : QStyleOption(Version, SO_Frame), lineWidth(0), midLineWidth(0),
- features(None), frameShape(QFrame::NoFrame)
+ : QStyleOptionFrame(Version)
{
}
@@ -593,9 +546,6 @@ QStyleOptionFrame::QStyleOptionFrame(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionComplex, QGroupBox
*/
@@ -690,8 +640,7 @@ QStyleOptionFrame::QStyleOptionFrame(int version)
variables to their default values.
*/
QStyleOptionGroupBox::QStyleOptionGroupBox()
- : QStyleOptionComplex(Version, Type), features(QStyleOptionFrame::None),
- textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0)
+ : QStyleOptionGroupBox(Version)
{
}
@@ -727,9 +676,6 @@ QStyleOptionGroupBox::QStyleOptionGroupBox(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -739,11 +685,7 @@ QStyleOptionGroupBox::QStyleOptionGroupBox(int version)
*/
QStyleOptionHeader::QStyleOptionHeader()
- : QStyleOption(QStyleOptionHeader::Version, SO_Header),
- section(0), textAlignment(Qt::AlignLeft), iconAlignment(Qt::AlignLeft),
- position(QStyleOptionHeader::Beginning),
- selectedPosition(QStyleOptionHeader::NotAdjacent), sortIndicator(None),
- orientation(Qt::Horizontal)
+ : QStyleOptionHeader(QStyleOptionHeader::Version)
{
}
@@ -899,6 +841,49 @@ QStyleOptionHeader::QStyleOptionHeader(int version)
*/
/*!
+ \class QStyleOptionHeaderV2
+ \brief The QStyleOptionHeaderV2 class is used to describe the
+ parameters for drawing a header.
+
+ \inmodule QtWidgets
+*/
+
+/*!
+ Constructs a QStyleOptionHeaderV2, initializing the members
+ variables to their default values.
+*/
+QStyleOptionHeaderV2::QStyleOptionHeaderV2()
+ : QStyleOptionHeaderV2(QStyleOptionHeaderV2::Version)
+{
+}
+
+/*!
+ \internal
+*/
+QStyleOptionHeaderV2::QStyleOptionHeaderV2(int version)
+: QStyleOptionHeader(version), textElideMode(Qt::ElideNone), isSectionDragTarget(false), unused(0)
+{}
+
+/*!
+ \variable QStyleOptionHeaderV2::textElideMode
+ \brief where ellipsis should be added for text that is too long to fit
+ into an item
+
+ The default value is Qt::ElideNone.
+
+ \sa Qt::TextElideMode
+*/
+
+/*!
+ \variable QStyleOptionHeaderV2::isSectionDragTarget
+
+ \brief whether the section is the location at which a dragged section
+ will be inserted
+
+ \sa QHeaderView::setSectionsMovable
+*/
+
+/*!
\class QStyleOptionButton
\brief The QStyleOptionButton class is used to describe the
parameters for drawing buttons.
@@ -915,9 +900,6 @@ QStyleOptionHeader::QStyleOptionHeader(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionToolButton
*/
@@ -942,7 +924,7 @@ QStyleOptionHeader::QStyleOptionHeader(int version)
*/
QStyleOptionButton::QStyleOptionButton()
- : QStyleOption(QStyleOptionButton::Version, SO_Button), features(None)
+ : QStyleOptionButton(QStyleOptionButton::Version)
{
}
@@ -1054,9 +1036,6 @@ QStyleOptionButton::QStyleOptionButton(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -1066,8 +1045,7 @@ QStyleOptionButton::QStyleOptionButton(int version)
*/
QStyleOptionToolBar::QStyleOptionToolBar()
- : QStyleOption(Version, SO_ToolBar), positionOfLine(OnlyOne), positionWithinLine(OnlyOne),
- toolBarArea(Qt::TopToolBarArea), features(None), lineWidth(0), midLineWidth(0)
+ : QStyleOptionToolBar(Version)
{
}
@@ -1239,9 +1217,6 @@ QStyleOptionToolBar::QStyleOptionToolBar(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -1251,13 +1226,7 @@ QStyleOptionToolBar::QStyleOptionToolBar(int version)
*/
QStyleOptionTab::QStyleOptionTab()
- : QStyleOption(QStyleOptionTab::Version, SO_Tab),
- shape(QTabBar::RoundedNorth),
- row(0),
- position(Beginning),
- selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets),
- documentMode(false),
- features(QStyleOptionTab::None)
+ : QStyleOptionTab(QStyleOptionTab::Version)
{
}
@@ -1321,6 +1290,7 @@ QStyleOptionTab::QStyleOptionTab(int version)
\value Middle The tab is neither the first nor the last tab in the tab bar.
\value End The tab is the last tab in the tab bar.
\value OnlyOneTab The tab is both the first and the last tab in the tab bar.
+ \value [since 6.6] Moving The tab is moving by mouse drag or animation.
\sa position
*/
@@ -1372,7 +1342,7 @@ QStyleOptionTab::QStyleOptionTab(int version)
/*!
\variable QStyleOptionTab::shape
\brief the tab shape used to draw the tab; by default
- QTabBar::RoundedNorth
+ QTabBar::RoundedNorth.
\sa QTabBar::Shape
*/
@@ -1482,9 +1452,6 @@ QStyleOptionTab::QStyleOptionTab(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -1494,9 +1461,7 @@ QStyleOptionTab::QStyleOptionTab(int version)
*/
QStyleOptionProgressBar::QStyleOptionProgressBar()
- : QStyleOption(QStyleOptionProgressBar::Version, SO_ProgressBar),
- minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false),
- orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
+ : QStyleOptionProgressBar(QStyleOptionProgressBar::Version)
{
}
@@ -1506,8 +1471,9 @@ QStyleOptionProgressBar::QStyleOptionProgressBar()
QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
: QStyleOption(version, SO_ProgressBar),
minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false),
- orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
+ invertedAppearance(false), bottomToTop(false)
{
+ state |= QStyle::State_Horizontal;
}
/*!
@@ -1591,7 +1557,7 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
/*!
\variable QStyleOptionProgressBar::textAlignment
- \brief the text alignment for the text in the QProgressBar
+ \brief the text alignment for the text in the QProgressBar.
This can be used as a guide on where the text should be in the
progress bar. The default value is Qt::AlignLeft.
@@ -1609,17 +1575,6 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
*/
/*!
- \variable QStyleOptionProgressBar::orientation
- \brief the progress bar's orientation (horizontal or vertical);
- the default orentation is Qt::Horizontal
-
- \deprecated
- Use the QStyle::State_Horizontal flag instead (in the QStyleOption::state member).
-
- \sa QProgressBar::orientation
-*/
-
-/*!
\variable QStyleOptionProgressBar::invertedAppearance
\brief whether the progress bar's appearance is inverted
@@ -1655,9 +1610,6 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -1667,8 +1619,7 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
*/
QStyleOptionMenuItem::QStyleOptionMenuItem()
- : QStyleOption(QStyleOptionMenuItem::Version, SO_MenuItem), menuItemType(Normal),
- checkType(NotCheckable), checked(false), menuHasCheckableItems(true), maxIconWidth(0), tabWidth(0)
+ : QStyleOptionMenuItem(QStyleOptionMenuItem::Version)
{
}
@@ -1677,7 +1628,8 @@ QStyleOptionMenuItem::QStyleOptionMenuItem()
*/
QStyleOptionMenuItem::QStyleOptionMenuItem(int version)
: QStyleOption(version, SO_MenuItem), menuItemType(Normal),
- checkType(NotCheckable), checked(false), menuHasCheckableItems(true), maxIconWidth(0), tabWidth(0)
+ checkType(NotCheckable), checked(false), menuHasCheckableItems(true), maxIconWidth(0),
+ reservedShortcutWidth(0)
{
}
@@ -1821,7 +1773,7 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version)
*/
/*!
- \variable QStyleOptionMenuItem::tabWidth
+ \variable QStyleOptionMenuItem::reservedShortcutWidth
\brief the reserved width for the menu item's shortcut
QMenu sets it to the width occupied by the widest shortcut among
@@ -1858,9 +1810,6 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -1951,9 +1900,6 @@ QStyleOptionComplex::QStyleOptionComplex(int version, int type)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOptionComplex, QSlider, QScrollBar
*/
@@ -1963,10 +1909,7 @@ QStyleOptionComplex::QStyleOptionComplex(int version, int type)
*/
QStyleOptionSlider::QStyleOptionSlider()
- : QStyleOptionComplex(Version, SO_Slider), orientation(Qt::Horizontal), minimum(0), maximum(0),
- tickPosition(QSlider::NoTicks), tickInterval(0), upsideDown(false),
- sliderPosition(0), sliderValue(0), singleStep(0), pageStep(0), notchTarget(0.0),
- dialWrapping(false), keyboardModifiers{}
+ : QStyleOptionSlider(Version)
{
}
@@ -2151,9 +2094,6 @@ QStyleOptionSlider::QStyleOptionSlider(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionComplex
*/
@@ -2163,8 +2103,7 @@ QStyleOptionSlider::QStyleOptionSlider(int version)
*/
QStyleOptionSpinBox::QStyleOptionSpinBox()
- : QStyleOptionComplex(Version, SO_SpinBox), buttonSymbols(QAbstractSpinBox::UpDownArrows),
- stepEnabled(QAbstractSpinBox::StepNone), frame(false)
+ : QStyleOptionSpinBox(Version)
{
}
@@ -2257,9 +2196,6 @@ QStyleOptionSpinBox::QStyleOptionSpinBox(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption
*/
@@ -2269,8 +2205,7 @@ QStyleOptionSpinBox::QStyleOptionSpinBox(int version)
*/
QStyleOptionDockWidget::QStyleOptionDockWidget()
- : QStyleOption(Version, SO_DockWidget), closable(false),
- movable(false), floatable(false), verticalTitleBar(false)
+ : QStyleOptionDockWidget(Version)
{
}
@@ -2364,9 +2299,6 @@ QStyleOptionDockWidget::QStyleOptionDockWidget(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionComplex, QStyleOptionButton
*/
@@ -2391,8 +2323,7 @@ QStyleOptionDockWidget::QStyleOptionDockWidget(int version)
*/
QStyleOptionToolButton::QStyleOptionToolButton()
- : QStyleOptionComplex(Version, SO_ToolButton), features(None), arrowType(Qt::DownArrow)
- , toolButtonStyle(Qt::ToolButtonIconOnly)
+ : QStyleOptionToolButton(Version)
{
}
@@ -2529,9 +2460,6 @@ QStyleOptionToolButton::QStyleOptionToolButton(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionComplex, QComboBox
*/
@@ -2541,7 +2469,7 @@ QStyleOptionToolButton::QStyleOptionToolButton(int version)
*/
QStyleOptionComboBox::QStyleOptionComboBox()
- : QStyleOptionComplex(Version, SO_ComboBox), editable(false), frame(true)
+ : QStyleOptionComboBox(Version)
{
}
@@ -2643,7 +2571,7 @@ QStyleOptionComboBox::QStyleOptionComboBox(int version)
*/
/*!
- \variable QStyleOptionGroupBox::textAlignment
+ \variable QStyleOptionComboBox::textAlignment
\brief the alignment of the current text in the combo box
The default value is Qt::AlignLeft | Qt::AlignVCenter.
@@ -2665,9 +2593,6 @@ QStyleOptionComboBox::QStyleOptionComboBox(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QToolBox
*/
@@ -2677,7 +2602,7 @@ QStyleOptionComboBox::QStyleOptionComboBox(int version)
*/
QStyleOptionToolBox::QStyleOptionToolBox()
- : QStyleOption(Version, SO_ToolBox), position(Beginning), selectedPosition(NotAdjacent)
+ : QStyleOptionToolBox(Version)
{
}
@@ -2792,9 +2717,6 @@ QStyleOptionToolBox::QStyleOptionToolBox(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QRubberBand
*/
@@ -2804,7 +2726,7 @@ QStyleOptionToolBox::QStyleOptionToolBox(int version)
*/
QStyleOptionRubberBand::QStyleOptionRubberBand()
- : QStyleOption(Version, SO_RubberBand), shape(QRubberBand::Line), opaque(false)
+ : QStyleOptionRubberBand(Version)
{
}
@@ -2884,9 +2806,6 @@ QStyleOptionRubberBand::QStyleOptionRubberBand(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionComplex, QMdiSubWindow
*/
@@ -2896,7 +2815,7 @@ QStyleOptionRubberBand::QStyleOptionRubberBand(int version)
*/
QStyleOptionTitleBar::QStyleOptionTitleBar()
- : QStyleOptionComplex(Version, SO_TitleBar), titleBarState(0)
+ : QStyleOptionTitleBar(Version)
{
}
@@ -2997,9 +2916,6 @@ QStyleOptionTitleBar::QStyleOptionTitleBar(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, {model-view-programming.html}{Model/View
Programming}
*/
@@ -3046,11 +2962,7 @@ QStyleOptionTitleBar::QStyleOptionTitleBar(int version)
*/
QStyleOptionViewItem::QStyleOptionViewItem()
- : QStyleOption(Version, SO_ViewItem),
- displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft),
- textElideMode(Qt::ElideMiddle), decorationPosition(Left),
- showDecorationSelected(false), features(None), widget(nullptr),
- checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid)
+ : QStyleOptionViewItem(Version)
{
}
@@ -3264,9 +3176,6 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QTabWidget
*/
@@ -3275,8 +3184,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
variables to their default values.
*/
QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame()
- : QStyleOption(Version, SO_TabWidgetFrame), lineWidth(0), midLineWidth(0),
- shape(QTabBar::RoundedNorth)
+ : QStyleOptionTabWidgetFrame(Version)
{
}
@@ -3407,19 +3315,15 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QTabBar::drawBase()
*/
/*!
Construct a QStyleOptionTabBarBase, initializing the members
- vaiables to their default values.
+ variables to their default values.
*/
QStyleOptionTabBarBase::QStyleOptionTabBarBase()
- : QStyleOption(Version, SO_TabBarBase), shape(QTabBar::RoundedNorth),
- documentMode(false)
+ : QStyleOptionTabBarBase(Version)
{
}
@@ -3518,9 +3422,6 @@ QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QStyleOptionComplex, QSizeGrip
*/
@@ -3528,7 +3429,7 @@ QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version)
Constructs a QStyleOptionSizeGrip.
*/
QStyleOptionSizeGrip::QStyleOptionSizeGrip()
- : QStyleOptionComplex(Version, Type), corner(Qt::BottomRightCorner)
+ : QStyleOptionSizeGrip(Version)
{
}
@@ -3598,9 +3499,6 @@ QStyleOptionSizeGrip::QStyleOptionSizeGrip(int version)
and emphasizes that these are simply parameters used by the style
functions.
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
\sa QStyleOption, QGraphicsItem::paint()
*/
@@ -3639,7 +3537,7 @@ QStyleOptionSizeGrip::QStyleOptionSizeGrip(int version)
Constructs a QStyleOptionGraphicsItem.
*/
QStyleOptionGraphicsItem::QStyleOptionGraphicsItem()
- : QStyleOption(Version, Type), levelOfDetail(1)
+ : QStyleOptionGraphicsItem(Version)
{
}
@@ -3647,7 +3545,7 @@ QStyleOptionGraphicsItem::QStyleOptionGraphicsItem()
\internal
*/
QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version)
- : QStyleOption(version, Type), levelOfDetail(1)
+ : QStyleOption(version, Type)
{
}
@@ -3695,38 +3593,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.