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,
44 SO_DockWidget, SO_ViewItem, SO_TabWidgetFrame,
45 SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem,
47 SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox,
48 SO_TitleBar, SO_GroupBox, SO_SizeGrip,
50 SO_CustomBase = 0xf00,
51 SO_ComplexCustomBase = 0xf000000
54 enum StyleOptionType { Type = SO_Default };
55 enum StyleOptionVersion { Version = 1 };
60 Qt::LayoutDirection direction;
62 QFontMetrics fontMetrics;
66 QStyleOption(
int version = QStyleOption::Version,
int type = SO_Default);
67 QStyleOption(
const QStyleOption &other);
70 void initFrom(
const QWidget *w);
71 QStyleOption &operator=(
const QStyleOption &other);
77 enum StyleOptionType { Type = SO_FocusRect };
78 enum StyleOptionVersion { Version = 1 };
80 QColor backgroundColor;
82 QStyleOptionFocusRect();
83 QStyleOptionFocusRect(
const QStyleOptionFocusRect &other) : QStyleOption(Version, Type) { *
this = other; }
84 QStyleOptionFocusRect &operator=(
const QStyleOptionFocusRect &) =
default;
87 QStyleOptionFocusRect(
int version);
93 enum StyleOptionType { Type = SO_Frame };
94 enum StyleOptionVersion { Version = 1 };
103 Q_DECLARE_FLAGS(FrameFeatures, FrameFeature)
104 FrameFeatures features;
105 QFrame::Shape frameShape;
108 QStyleOptionFrame(
const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *
this = other; }
109 QStyleOptionFrame &operator=(
const QStyleOptionFrame &) =
default;
112 QStyleOptionFrame(
int version);
115Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrame::FrameFeatures)
117#if QT_CONFIG(tabwidget)
118class Q_WIDGETS_EXPORT QStyleOptionTabWidgetFrame :
public QStyleOption
121 enum StyleOptionType { Type = SO_TabWidgetFrame };
122 enum StyleOptionVersion { Version = 1 };
126 QTabBar::Shape shape;
128 QSize rightCornerWidgetSize;
129 QSize leftCornerWidgetSize;
131 QRect selectedTabRect;
133 QStyleOptionTabWidgetFrame();
134 inline QStyleOptionTabWidgetFrame(
const QStyleOptionTabWidgetFrame &other)
135 : QStyleOption(Version, Type) { *
this = 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 };
152 QTabBar::Shape shape;
154 QRect selectedTabRect;
157 QStyleOptionTabBarBase();
158 QStyleOptionTabBarBase(
const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *
this = other; }
159 QStyleOptionTabBarBase &operator=(
const QStyleOptionTabBarBase &) =
default;
162 QStyleOptionTabBarBase(
int version);
167class Q_WIDGETS_EXPORT QStyleOptionHeader :
public QStyleOption
170 enum StyleOptionType { Type = SO_Header };
171 enum StyleOptionVersion { Version = 1 };
173 enum SectionPosition { Beginning, Middle, End, OnlyOneSection };
174 enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected,
175 NextAndPreviousAreSelected };
176 enum SortIndicator { None, SortUp, SortDown };
180 Qt::Alignment textAlignment;
182 Qt::Alignment iconAlignment;
183 SectionPosition position;
184 SelectedPosition selectedPosition;
185 SortIndicator sortIndicator;
186 Qt::Orientation orientation;
188 QStyleOptionHeader();
189 QStyleOptionHeader(
const QStyleOptionHeader &other) : QStyleOption(Version, Type) { *
this = other; }
190 QStyleOptionHeader &operator=(
const QStyleOptionHeader &) =
default;
193 QStyleOptionHeader(
int version);
200 enum StyleOptionType { Type = SO_Header };
201 enum StyleOptionVersion { Version = 2 };
203 QStyleOptionHeaderV2();
204 QStyleOptionHeaderV2(
const QStyleOptionHeaderV2 &other) : QStyleOptionHeader(Version) { *
this = other; }
205 QStyleOptionHeaderV2 &operator=(
const QStyleOptionHeaderV2 &) =
default;
207 Qt::TextElideMode textElideMode:2;
208 bool isSectionDragTarget:1;
212 QStyleOptionHeaderV2(
int version);
218 enum StyleOptionType { Type = SO_Button };
219 enum StyleOptionVersion { Version = 1 };
221 enum ButtonFeature { None = 0x00, Flat = 0x01, HasMenu = 0x02, DefaultButton = 0x04,
222 AutoDefaultButton = 0x08, CommandLinkButton = 0x10 };
223 Q_DECLARE_FLAGS(ButtonFeatures, ButtonFeature)
225 ButtonFeatures features;
230 QStyleOptionButton();
231 QStyleOptionButton(
const QStyleOptionButton &other) : QStyleOption(Version, Type) { *
this = other; }
232 QStyleOptionButton &operator=(
const QStyleOptionButton &) =
default;
235 QStyleOptionButton(
int version);
238Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionButton::ButtonFeatures)
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, MinimumSizeHint = 0x02 };
252 Q_DECLARE_FLAGS(CornerWidgets, CornerWidget)
253 Q_DECLARE_FLAGS(TabFeatures, TabFeature)
255 QTabBar::Shape shape;
259 TabPosition position;
260 SelectedPosition selectedPosition;
261 CornerWidgets cornerWidgets;
264 QSize leftButtonSize;
265 QSize rightButtonSize;
266 TabFeatures features;
270 QStyleOptionTab(
const QStyleOptionTab &other) : QStyleOption(Version, Type) { *
this = other; }
271 QStyleOptionTab &operator=(
const QStyleOptionTab &) =
default;
274 QStyleOptionTab(
int version);
277Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
282#if QT_CONFIG(toolbar)
284class Q_WIDGETS_EXPORT QStyleOptionToolBar :
public QStyleOption
287 enum StyleOptionType { Type = SO_ToolBar };
288 enum StyleOptionVersion { Version = 1 };
289 enum ToolBarPosition { Beginning, Middle, End, OnlyOne };
290 enum ToolBarFeature { None = 0x0, Movable = 0x1 };
291 Q_DECLARE_FLAGS(ToolBarFeatures, ToolBarFeature)
292 ToolBarPosition positionOfLine;
293 ToolBarPosition positionWithinLine;
294 Qt::ToolBarArea toolBarArea;
295 ToolBarFeatures features;
298 QStyleOptionToolBar();
299 QStyleOptionToolBar(
const QStyleOptionToolBar &other) : QStyleOption(Version, Type) { *
this = other; }
300 QStyleOptionToolBar &operator=(
const QStyleOptionToolBar &) =
default;
303 QStyleOptionToolBar(
int version);
306Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolBar::ToolBarFeatures)
310class Q_WIDGETS_EXPORT QStyleOptionProgressBar :
public QStyleOption
313 enum StyleOptionType { Type = SO_ProgressBar };
314 enum StyleOptionVersion { Version = 1 };
320 Qt::Alignment textAlignment;
322 bool invertedAppearance;
325 QStyleOptionProgressBar();
326 QStyleOptionProgressBar(
const QStyleOptionProgressBar &other) : QStyleOption(Version, Type) { *
this = other; }
327 QStyleOptionProgressBar &operator=(
const QStyleOptionProgressBar &) =
default;
330 QStyleOptionProgressBar(
int version);
336 enum StyleOptionType { Type = SO_MenuItem };
337 enum StyleOptionVersion { Version = 1 };
339 enum MenuItemType { Normal, DefaultItem, Separator, SubMenu, Scroller, TearOff, Margin,
341 enum CheckType { NotCheckable, Exclusive, NonExclusive };
343 MenuItemType menuItemType;
346 bool menuHasCheckableItems;
351 int reservedShortcutWidth;
354 QStyleOptionMenuItem();
355 QStyleOptionMenuItem(
const QStyleOptionMenuItem &other) : QStyleOption(Version, Type) { *
this = other; }
356 QStyleOptionMenuItem &operator=(
const QStyleOptionMenuItem &) =
default;
359 QStyleOptionMenuItem(
int version);
365 enum StyleOptionType { Type = SO_DockWidget };
366 enum StyleOptionVersion { Version = 1 };
372 bool verticalTitleBar;
374 QStyleOptionDockWidget();
375 QStyleOptionDockWidget(
const QStyleOptionDockWidget &other) : QStyleOption(Version, Type) { *
this = other; }
376 QStyleOptionDockWidget &operator=(
const QStyleOptionDockWidget &) =
default;
379 QStyleOptionDockWidget(
int version);
382#if QT_CONFIG(itemviews)
384class Q_WIDGETS_EXPORT QStyleOptionViewItem :
public QStyleOption
387 enum StyleOptionType { Type = SO_ViewItem };
388 enum StyleOptionVersion { Version = 1 };
390 enum Position { Left, Right, Top, Bottom };
392 Qt::Alignment displayAlignment;
393 Qt::Alignment decorationAlignment;
394 Qt::TextElideMode textElideMode;
395 Position decorationPosition;
396 QSize decorationSize;
398 bool showDecorationSelected;
400 enum ViewItemFeature {
404 HasCheckIndicator = 0x04,
408 Q_DECLARE_FLAGS(ViewItemFeatures, ViewItemFeature)
410 ViewItemFeatures features;
413 const QWidget *widget;
415 enum ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne };
418 Qt::CheckState checkState;
421 ViewItemPosition viewItemPosition;
422 QBrush backgroundBrush;
424 QStyleOptionViewItem();
425 QStyleOptionViewItem(
const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *
this = other; }
426 QStyleOptionViewItem &operator=(
const QStyleOptionViewItem &) =
default;
429 QStyleOptionViewItem(
int version);
432Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionViewItem::ViewItemFeatures)
439 enum StyleOptionType { Type = SO_ToolBox };
440 enum StyleOptionVersion { Version = 1 };
445 enum TabPosition { Beginning, Middle, End, OnlyOneTab };
446 enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
448 TabPosition position;
449 SelectedPosition selectedPosition;
451 QStyleOptionToolBox();
452 QStyleOptionToolBox(
const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *
this = other; }
453 QStyleOptionToolBox &operator=(
const QStyleOptionToolBox &) =
default;
456 QStyleOptionToolBox(
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 };
466 QRubberBand::Shape shape;
469 QStyleOptionRubberBand();
470 QStyleOptionRubberBand(
const QStyleOptionRubberBand &other) : QStyleOption(Version, Type) { *
this = other; }
471 QStyleOptionRubberBand &operator=(
const QStyleOptionRubberBand &) =
default;
474 QStyleOptionRubberBand(
int version);
482 enum StyleOptionType { Type = SO_Complex };
483 enum StyleOptionVersion { Version = 1 };
485 QStyle::SubControls subControls;
486 QStyle::SubControls activeSubControls;
488 QStyleOptionComplex(
int version = QStyleOptionComplex::Version,
int type = SO_Complex);
489 QStyleOptionComplex(
const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *
this = other; }
490 QStyleOptionComplex &operator=(
const QStyleOptionComplex &) =
default;
494class Q_WIDGETS_EXPORT QStyleOptionSlider :
public QStyleOptionComplex
497 enum StyleOptionType { Type = SO_Slider };
498 enum StyleOptionVersion { Version = 1 };
500 Qt::Orientation orientation;
503 QSlider::TickPosition tickPosition;
512 Qt::KeyboardModifiers keyboardModifiers;
514 QStyleOptionSlider();
515 QStyleOptionSlider(
const QStyleOptionSlider &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
516 QStyleOptionSlider &operator=(
const QStyleOptionSlider &) =
default;
519 QStyleOptionSlider(
int version);
523#if QT_CONFIG(spinbox)
524class Q_WIDGETS_EXPORT QStyleOptionSpinBox :
public QStyleOptionComplex
527 enum StyleOptionType { Type = SO_SpinBox };
528 enum StyleOptionVersion { Version = 1 };
530 QAbstractSpinBox::ButtonSymbols buttonSymbols;
531 QAbstractSpinBox::StepEnabled stepEnabled;
534 QStyleOptionSpinBox();
535 QStyleOptionSpinBox(
const QStyleOptionSpinBox &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
536 QStyleOptionSpinBox &operator=(
const QStyleOptionSpinBox &) =
default;
539 QStyleOptionSpinBox(
int version);
546 enum StyleOptionType { Type = SO_ToolButton };
547 enum StyleOptionVersion { Version = 1 };
549 enum ToolButtonFeature { None = 0x00, Arrow = 0x01, Menu = 0x04, MenuButtonPopup = Menu, PopupDelay = 0x08,
551 Q_DECLARE_FLAGS(ToolButtonFeatures, ToolButtonFeature)
553 ToolButtonFeatures features;
557 Qt::ArrowType arrowType;
558 Qt::ToolButtonStyle toolButtonStyle;
562 QStyleOptionToolButton();
563 QStyleOptionToolButton(
const QStyleOptionToolButton &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
564 QStyleOptionToolButton &operator=(
const QStyleOptionToolButton &) =
default;
567 QStyleOptionToolButton(
int version);
570Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolButton::ToolButtonFeatures)
572class Q_WIDGETS_EXPORT QStyleOptionComboBox :
public QStyleOptionComplex
575 enum StyleOptionType { Type = SO_ComboBox };
576 enum StyleOptionVersion { Version = 1 };
584 Qt::Alignment textAlignment = Qt::AlignLeft | Qt::AlignVCenter;
586 QStyleOptionComboBox();
587 QStyleOptionComboBox(
const QStyleOptionComboBox &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
588 QStyleOptionComboBox &operator=(
const QStyleOptionComboBox &) =
default;
591 QStyleOptionComboBox(
int version);
597 enum StyleOptionType { Type = SO_TitleBar };
598 enum StyleOptionVersion { Version = 1 };
603 Qt::WindowFlags titleBarFlags;
605 QStyleOptionTitleBar();
606 QStyleOptionTitleBar(
const QStyleOptionTitleBar &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
607 QStyleOptionTitleBar &operator=(
const QStyleOptionTitleBar &) =
default;
610 QStyleOptionTitleBar(
int version);
616 enum StyleOptionType { Type = SO_GroupBox };
617 enum StyleOptionVersion { Version = 1 };
619 QStyleOptionFrame::FrameFeatures features;
621 Qt::Alignment textAlignment;
626 QStyleOptionGroupBox();
627 QStyleOptionGroupBox(
const QStyleOptionGroupBox &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
628 QStyleOptionGroupBox &operator=(
const QStyleOptionGroupBox &) =
default;
630 QStyleOptionGroupBox(
int version);
636 enum StyleOptionType { Type = SO_SizeGrip };
637 enum StyleOptionVersion { Version = 1 };
641 QStyleOptionSizeGrip();
642 QStyleOptionSizeGrip(
const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *
this = other; }
643 QStyleOptionSizeGrip &operator=(
const QStyleOptionSizeGrip &) =
default;
645 QStyleOptionSizeGrip(
int version);
651 enum StyleOptionType { Type = SO_GraphicsItem };
652 enum StyleOptionVersion { Version = 1 };
656 QStyleOptionGraphicsItem();
657 QStyleOptionGraphicsItem(
const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *
this = other; }
658 QStyleOptionGraphicsItem &operator=(
const QStyleOptionGraphicsItem &) =
default;
659 static qreal levelOfDetailFromTransform(
const QTransform &worldTransform);
661 QStyleOptionGraphicsItem(
int version);
667 typedef typename std::remove_cv<
typename std::remove_pointer<T>::type>::type Opt;
668 if (opt && opt->version >= Opt::Version && (opt->type == Opt::Type
669 ||
int(Opt::Type) == QStyleOption::SO_Default
670 || (
int(Opt::Type) == QStyleOption::SO_Complex
671 && opt->type > QStyleOption::SO_Complex)))
672 return static_cast<T>(opt);
679 typedef typename std::remove_cv<
typename std::remove_pointer<T>::type>::type Opt;
680 if (opt && opt->version >= Opt::Version && (opt->type == Opt::Type
681 ||
int(Opt::Type) == QStyleOption::SO_Default
682 || (
int(Opt::Type) == QStyleOption::SO_Complex
683 && opt->type > QStyleOption::SO_Complex)))
684 return static_cast<T>(opt);
691 enum HintReturnType {
692 SH_Default=0xf000, SH_Mask, SH_Variant
695 enum StyleOptionType { Type = SH_Default };
696 enum StyleOptionVersion { Version = 1 };
698 QStyleHintReturn(
int version = QStyleOption::Version,
int type = SH_Default);
707 enum StyleOptionType { Type = SH_Mask };
708 enum StyleOptionVersion { Version = 1 };
710 QStyleHintReturnMask();
711 ~QStyleHintReturnMask();
718 enum StyleOptionType { Type = SH_Variant };
719 enum StyleOptionVersion { Version = 1 };
721 QStyleHintReturnVariant();
722 ~QStyleHintReturnVariant();
730 typedef typename std::remove_cv<
typename std::remove_pointer<T>::type>::type Opt;
731 if (hint && hint->version <= Opt::Version &&
732 (hint->type == Opt::Type ||
int(Opt::Type) == QStyleHintReturn::SH_Default))
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 &&
742 (hint->type == Opt::Type ||
int(Opt::Type) == QStyleHintReturn::SH_Default))
743 return static_cast<T>(hint);
747#if !defined(QT_NO_DEBUG_STREAM)
748Q_WIDGETS_EXPORT
QDebug operator<<(QDebug debug,
const QStyleOption::OptionType &optionType);
749Q_WIDGETS_EXPORT
QDebug operator<<(QDebug debug,
const QStyleOption &option);
The QApplication class manages the GUI application's control flow and main settings.
QScopedPointer< QImageIOHandlerPrivate > d_ptr
The QPaintEngineState class provides information about the active paint engine's current state....
virtual QPixmap createPixmap(QSize size)
void setSystemRect(const QRect &rect)
void setActive(bool newState)
Sets the active state of the paint engine to state.
virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual QPixmap createPixmapFromImage(QImage image, Qt::ImageConversionFlags flags=Qt::AutoColor)
friend class QWidgetPrivate
QPaintEngine(PaintEngineFeatures features=PaintEngineFeatures())
Creates a paint engine with the featureset specified by caps.
friend class QFontEngineQPF2
friend class QMacCGContext
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem)
This function draws the text item textItem at position p.
virtual void drawLines(const QLineF *lines, int lineCount)
The default implementation splits the list of lines in lines into lineCount separate calls to drawPat...
PolygonDrawMode
\value OddEvenMode The polygon should be drawn using OddEven fill rule.
virtual void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the buffer points.
virtual void drawRects(const QRectF *rects, int rectCount)
Draws the first rectCount rectangles in the buffer rects.
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
QPainter * painter() const
Returns the paint engine's painter.
void fix_neg_rect(int *x, int *y, int *w, int *h)
void setPaintDevice(QPaintDevice *device)
virtual QPoint coordinateOffset() const
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
void setDirty(DirtyFlags df)
void setSystemClip(const QRegion &baseClip)
QPaintEngineState * state
friend class QPainterReplayer
friend class QX11GLPlatformPixmap
PaintEngineFeatures gccaps
void clearDirty(DirtyFlags df)
bool hasFeature(PaintEngineFeatures feature) const
Returns true if the paint engine supports the specified feature; otherwise returns false.
virtual void drawEllipse(const QRectF &r)
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
QRegion systemClip() const
QPaintDevice * paintDevice() const
Returns the device that this engine is painting on, if painting is active; otherwise returns \nullptr...
bool testDirty(DirtyFlags df)
virtual void updateState(const QPaintEngineState &state)=0
Reimplement this function to update the state of a paint engine.
DirtyFlag
\value DirtyPen The pen is dirty and needs to be updated.
Type
\value X11 \value Windows \value MacPrinter \value CoreGraphics \macos's Quartz2D (CoreGraphics) \val...
virtual Type type() const =0
Reimplement this function to return the paint engine \l{Type}.
void drawPath(const QPainterPath &path)
Draws the given painter path using the current pen for outline and the current brush for filling.
bool begin(QPaintDevice *)
Begins painting the paint device and returns true if successful; otherwise returns false.
void drawRects(const QRectF *rects, int rectCount)
Draws the first rectCount of the given rectangles using the current pen and brush.
void drawLines(const QLineF *lines, int lineCount)
Draws the first lineCount lines in the array lines using the current pen.
friend class QFontEngineMac
friend class QWin32PaintEngine
friend class QWin32PaintEnginePrivate
friend class QFontEngineWin
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the array points using the current pen's color.
bool isActive() const
Returns true if begin() has been called and end() has not yet been called; otherwise returns false.
\inmodule QtCore\reentrant
The QPolygonF class provides a list of points using floating point precision.
The QStyleHintReturnMask class provides style hints that return a QRegion.
The QStyleHintReturnVariant class provides style hints that return a QVariant.
\variable QStyleOptionGraphicsItem::exposedRect
\variable QStyleOptionMenuItem::menuItemType
\variable QStyleOption::palette
\variable QStyleOptionFocusRect::backgroundColor
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
\variable QStyleOptionFrame::features
\variable QStyleOptionToolBox::selectedPosition
The QStyleOption class stores the parameters used by QStyle functions.
The QWindows11Style class provides a look and feel suitable for applications on Microsoft Windows 11.
void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
void unpolish(QWidget *widget) override
void polish(QWidget *widget) override
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const override
QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const override
QWindows11Style(QWindows11StylePrivate &dd)
void polish(QPalette &pal) override
int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
int styleHint(StyleHint hint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const override
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
QRect subElementRect(QStyle::SubElement element, const QStyleOption *option, const QWidget *widget=nullptr) const override
~QWindows11Style() override
Destructor.
HRGN mask(QWidget *widget)
QWindowsThemeData(const QWidget *w=nullptr, QPainter *p=nullptr, int themeIn=-1, int part=0, int state=0, const QRect &r=QRect())
QMarginsF margins(const QRect &rect, int propId=TMT_CONTENTMARGINS)
static RECT toRECT(const QRect &qr)
QMarginsF margins(int propId=TMT_CONTENTMARGINS)
static QSizeF themeSize(const QWidget *w=nullptr, QPainter *p=nullptr, int themeIn=-1, int part=0, int state=0)
HBITMAP buffer(int w=0, int h=0)
static int fixedPixelMetric(QStyle::PixelMetric pm)
static HDC hdcForWidgetBackingStore(const QWidget *widget)
static QBackingStore * backingStoreForWidget(const QWidget *widget)
bool swapAlphaChannel(const QRect &rect, bool allPixels=false)
bool drawBackgroundThruNativeBuffer(QWindowsThemeData &QWindowsThemeData, qreal aditionalDevicePixelRatio, qreal correctionFactor)
static HWND winId(const QWidget *widget)
void init(bool force=false)
static bool isLineEditBaseColorSet(const QStyleOption *option, const QWidget *widget)
bool transitionsEnabled() const
bool drawBackgroundDirectly(HDC dc, QWindowsThemeData &QWindowsThemeData, qreal aditionalDevicePixelRatio)
static bool isItemViewDelegateLineEdit(const QWidget *widget)
static bool useVista(bool update=false)
QRgb groupBoxTextColorDisabled
bool fixAlphaChannel(const QRect &rect)
void cleanup(bool force=false)
QWindowsVistaStylePrivate()
bool isTransparent(QWindowsThemeData &QWindowsThemeData)
bool hasAlphaChannel(const QRect &rect)
QRegion region(QWindowsThemeData &QWindowsThemeData)
QTime animationTime() const
~QWindowsVistaStylePrivate()
bool drawBackground(QWindowsThemeData &QWindowsThemeData, qreal correctionFactor=1)
static HTHEME createTheme(int theme, const QWidget *widget)
static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option=nullptr, const QWidget *widget=nullptr)
static QString themeName(int theme)
The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows ...
QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const override
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const override
int styleHint(StyleHint hint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const override
SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget=nullptr) const override
void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
void polish(QWidget *widget) override
int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=nullptr) const override
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
\reimp
~QWindowsVistaStyle() override
Destructor.
void polish(QPalette &pal) override
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=nullptr) const override
QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override
QWindowsVistaStyle(QWindowsVistaStylePrivate &dd)
void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const override
void unpolish(QWidget *widget) override
Combined button and popup list for selecting options.
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
T qstyleoption_cast(const QStyleOption *opt)
T qstyleoption_cast(QStyleOption *opt)
bool operator==(const ThemeMapKey &k1, const ThemeMapKey &k2)
size_t qHash(const ThemeMapKey &key)
AlphaChannelType alphaType
ThemeMapKey(const QWindowsThemeData &data)