7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtCore/qlocale.h>
9#include <QtCore/qvariant.h>
11#include <QtWidgets/qabstractspinbox.h>
13#include <QtGui/qicon.h>
14#include <QtGui/qtransform.h>
16#include <QtWidgets/qslider.h>
18#include <QtWidgets/qstyle.h>
20#include <QtWidgets/qtabbar.h>
22#if QT_CONFIG(tabwidget)
23#include <QtWidgets/qtabwidget.h>
25#if QT_CONFIG(rubberband)
26#include <QtWidgets/qrubberband.h>
28#include <QtWidgets/qframe.h>
29#if QT_CONFIG(itemviews)
30# include <QtCore/qabstractitemmodel.h>
42 SO_Default, SO_FocusRect,
SO_Button, SO_Tab, SO_MenuItem,
43 SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header,
47 SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton,
SO_ComboBox,
50 SO_CustomBase = 0xf00,
51 SO_ComplexCustomBase = 0xf000000
104 FrameFeatures features;
117#if QT_CONFIG(tabwidget)
118class Q_WIDGETS_EXPORT QStyleOptionTabWidgetFrame :
public QStyleOption
121 enum StyleOptionType {
Type = SO_TabWidgetFrame };
122 enum StyleOptionVersion {
Version = 1 };
128 QSize rightCornerWidgetSize;
129 QSize leftCornerWidgetSize;
131 QRect selectedTabRect;
133 QStyleOptionTabWidgetFrame();
134 inline QStyleOptionTabWidgetFrame(
const QStyleOptionTabWidgetFrame &
other)
136 QStyleOptionTabWidgetFrame &operator=(
const QStyleOptionTabWidgetFrame &) =
default;
139 QStyleOptionTabWidgetFrame(
int version);
146class Q_WIDGETS_EXPORT QStyleOptionTabBarBase :
public QStyleOption
149 enum StyleOptionType {
Type = SO_TabBarBase };
150 enum StyleOptionVersion {
Version = 1 };
154 QRect selectedTabRect;
157 QStyleOptionTabBarBase();
159 QStyleOptionTabBarBase &operator=(
const QStyleOptionTabBarBase &) =
default;
162 QStyleOptionTabBarBase(
int version);
175 NextAndPreviousAreSelected };
222 AutoDefaultButton = 0x08, CommandLinkButton = 0x10 };
225 ButtonFeatures features;
241class Q_WIDGETS_EXPORT QStyleOptionTab :
public QStyleOption
244 enum StyleOptionType {
Type = SO_Tab };
245 enum StyleOptionVersion {
Version = 1 };
247 enum TabPosition { Beginning,
Middle,
End, OnlyOneTab, Moving };
248 enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
249 enum CornerWidget { NoCornerWidgets = 0x00, LeftCornerWidget = 0x01,
250 RightCornerWidget = 0x02 };
251 enum TabFeature {
None = 0x00, HasFrame = 0x01 };
260 SelectedPosition selectedPosition;
261 CornerWidgets cornerWidgets;
264 QSize leftButtonSize;
265 QSize rightButtonSize;
266 TabFeatures features;
271 QStyleOptionTab &operator=(
const QStyleOptionTab &) =
default;
274 QStyleOptionTab(
int version);
282#if QT_CONFIG(toolbar)
284class Q_WIDGETS_EXPORT QStyleOptionToolBar :
public QStyleOption
287 enum StyleOptionType {
Type = SO_ToolBar };
288 enum StyleOptionVersion {
Version = 1 };
290 enum ToolBarFeature {
None = 0x0, Movable = 0x1 };
292 ToolBarPosition positionOfLine;
293 ToolBarPosition positionWithinLine;
295 ToolBarFeatures features;
298 QStyleOptionToolBar();
300 QStyleOptionToolBar &operator=(
const QStyleOptionToolBar &) =
default;
303 QStyleOptionToolBar(
int version);
341 enum CheckType { NotCheckable, Exclusive, NonExclusive };
382#if QT_CONFIG(itemviews)
384class Q_WIDGETS_EXPORT QStyleOptionViewItem :
public QStyleOption
387 enum StyleOptionType {
Type = SO_ViewItem };
388 enum StyleOptionVersion {
Version = 1 };
392 Qt::Alignment displayAlignment;
393 Qt::Alignment decorationAlignment;
395 Position decorationPosition;
396 QSize decorationSize;
398 bool showDecorationSelected;
400 enum ViewItemFeature {
404 HasCheckIndicator = 0x04,
410 ViewItemFeatures features;
421 ViewItemPosition viewItemPosition;
424 QStyleOptionViewItem();
426 QStyleOptionViewItem &operator=(
const QStyleOptionViewItem &) =
default;
429 QStyleOptionViewItem(
int version);
459#if QT_CONFIG(rubberband)
460class Q_WIDGETS_EXPORT QStyleOptionRubberBand :
public QStyleOption
463 enum StyleOptionType {
Type = SO_RubberBand };
464 enum StyleOptionVersion {
Version = 1 };
469 QStyleOptionRubberBand();
471 QStyleOptionRubberBand &operator=(
const QStyleOptionRubberBand &) =
default;
474 QStyleOptionRubberBand(
int version);
497 enum StyleOptionType {
Type = SO_Slider };
498 enum StyleOptionVersion {
Version = 1 };
512 Qt::KeyboardModifiers keyboardModifiers;
514 QStyleOptionSlider();
516 QStyleOptionSlider &operator=(
const QStyleOptionSlider &) =
default;
519 QStyleOptionSlider(
int version);
523#if QT_CONFIG(spinbox)
527 enum StyleOptionType {
Type = SO_SpinBox };
528 enum StyleOptionVersion {
Version = 1 };
531 QAbstractSpinBox::StepEnabled stepEnabled;
534 QStyleOptionSpinBox();
536 QStyleOptionSpinBox &operator=(
const QStyleOptionSpinBox &) =
default;
539 QStyleOptionSpinBox(
int version);
553 ToolButtonFeatures features;
557 Qt::ArrowType arrowType;
558 Qt::ToolButtonStyle toolButtonStyle;
659 static qreal levelOfDetailFromTransform(
const QTransform &worldTransform);
667 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>
::type Opt;
672 return static_cast<T
>(
opt);
679 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>
::type Opt;
684 return static_cast<T
>(
opt);
692 SH_Default=0xf000, SH_Mask, SH_Variant
730 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>
::type Opt;
731 if (
hint &&
hint->version <= Opt::Version &&
733 return static_cast<T
>(
hint);
740 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>
::type Opt;
741 if (
hint &&
hint->version <= Opt::Version &&
743 return static_cast<T
>(
hint);
747#if !defined(QT_NO_DEBUG_STREAM)
ButtonSymbols
This enum type describes the symbols that can be displayed on the buttons in a spin box.
The QColor class provides colors based on RGB, HSV or CMYK values.
\reentrant \inmodule QtGui
The QFrame class is the base class of widgets that can have a frame.
The QIcon class provides scalable icons in different modes and states.
The QPalette class contains color groups for each widget state.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
Shape
This enum specifies what shape a QRubberBand should have.
TickPosition
This enum specifies where the tick marks are to be drawn relative to the slider's groove and the hand...
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStyleHintReturnMask class provides style hints that return a QRegion.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
The QStyleHintReturnVariant class provides style hints that return a QVariant.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
\variable QStyleOptionGraphicsItem::exposedRect
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
HintReturnType
\value SH_Default QStyleHintReturn \value SH_Mask \l QStyle::SH_RubberBand_Mask QStyle::SH_FocusFrame...
\variable QStyleOptionToolButton::features
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionComboBox(const QStyleOptionComboBox &other)
Constructs a copy of the other style option.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionComboBox & operator=(const QStyleOptionComboBox &)=default
\variable QStyleOptionMenuItem::menuItemType
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionComplex(const QStyleOptionComplex &other)
Constructs a copy of the other style option.
QStyle::SubControls subControls
QStyleOptionComplex & operator=(const QStyleOptionComplex &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyle::SubControls activeSubControls
\variable QStyleOption::palette
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionFocusRect(const QStyleOptionFocusRect &other)
Constructs a copy of the other style option.
QStyleOptionFocusRect & operator=(const QStyleOptionFocusRect &)=default
\variable QStyleOptionFocusRect::backgroundColor
FrameFeature
\variable QStyleOptionFrame::lineWidth
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionFrame & operator=(const QStyleOptionFrame &)=default
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other)
Constructs a copy of other.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionGraphicsItem & operator=(const QStyleOptionGraphicsItem &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
\variable QStyleOptionFrame::features
Qt::Alignment textAlignment
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionFrame::FrameFeatures features
QStyleOptionGroupBox & operator=(const QStyleOptionGroupBox &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionGroupBox(const QStyleOptionGroupBox &other)
Constructs a copy of the other style option.
\variable QStyleOptionButton::features
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionProgressBar(const QStyleOptionProgressBar &other)
Constructs a copy of the other style option.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionProgressBar & operator=(const QStyleOptionProgressBar &)=default
Qt::Alignment textAlignment
QStyleOptionSizeGrip(int version)
QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other)
QStyleOptionSizeGrip & operator=(const QStyleOptionSizeGrip &)=default
\variable QStyleOptionToolBox::selectedPosition
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionTitleBar & operator=(const QStyleOptionTitleBar &)=default
QStyleOptionTitleBar(const QStyleOptionTitleBar &other)
Constructs a copy of the other style option.
Qt::WindowFlags titleBarFlags
The QStyleOption class stores the parameters used by QStyle functions.
OptionType
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine th...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
Qt::LayoutDirection direction
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
Shape
This enum type lists the built-in shapes supported by QTabBar.
Q_QML_PRIVATE_EXPORT QV4::ReturnedValue locale(QV4::ExecutionEngine *engine, const QString &localeName)
Provides locale specific properties and formatted data.
Combined button and popup list for selecting options.
QVector3D minimum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
QVector3D maximum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLfloat GLfloat GLfloat w
[0]
GLenum GLenum GLsizei void * row
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
T qstyleoption_cast(const QStyleOption *opt)