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.cpp120
1 files changed, 7 insertions, 113 deletions
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index fba7bd071d..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
*/
@@ -464,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
*/
@@ -591,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
*/
@@ -724,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
*/
@@ -951,9 +900,6 @@ QStyleOptionHeaderV2::QStyleOptionHeaderV2(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
*/
@@ -1090,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
*/
@@ -1274,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
*/
@@ -1350,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
*/
@@ -1401,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
*/
@@ -1511,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
*/
@@ -1535,6 +1473,7 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false),
invertedAppearance(false), bottomToTop(false)
{
+ state |= QStyle::State_Horizontal;
}
/*!
@@ -1618,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.
@@ -1671,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
*/
@@ -1874,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
*/
@@ -1967,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
*/
@@ -2164,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
*/
@@ -2269,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
*/
@@ -2375,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
*/
@@ -2539,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
*/
@@ -2675,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
*/
@@ -2802,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
*/
@@ -2894,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
*/
@@ -3007,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}
*/
@@ -3270,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
*/
@@ -3412,15 +3315,12 @@ 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()
: QStyleOptionTabBarBase(Version)
@@ -3522,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
*/
@@ -3602,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()
*/