Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmessagebox.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QMESSAGEBOX_H
6#define QMESSAGEBOX_H
7
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtWidgets/qdialog.h>
10#include <QtWidgets/qdialogbuttonbox.h>
11
12QT_REQUIRE_CONFIG(messagebox);
13
14QT_BEGIN_NAMESPACE
15
16class QAnyStringView;
17class QLabel;
19class QAbstractButton;
20class QCheckBox;
21
22class Q_WIDGETS_EXPORT QMessageBox : public QDialog
23{
24 Q_OBJECT
25 Q_PROPERTY(QString text READ text WRITE setText)
26 Q_PROPERTY(Icon icon READ icon WRITE setIcon)
27 Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap)
28 Q_PROPERTY(Qt::TextFormat textFormat READ textFormat WRITE setTextFormat)
29 Q_PROPERTY(StandardButtons standardButtons READ standardButtons WRITE setStandardButtons)
30#if QT_CONFIG(textedit)
31 Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText)
32#endif
33 Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText)
34 Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags
35 WRITE setTextInteractionFlags)
36 Q_PROPERTY(Options options READ options WRITE setOptions)
37public:
38 // Keep in sync with MessageBoxOption in qplatformdialoghelper.h
39 enum class Option {
40 DontUseNativeDialog = 0x00000001
41 };
42 Q_FLAG(Option)
44 enum Icon {
45 // keep this in sync with QMessageDialogOptions::StandardIcon
46 NoIcon = 0,
47 Information = 1,
48 Warning = 2,
49 Critical = 3,
50 Question = 4
51 };
52 Q_ENUM(Icon)
54 enum ButtonRole {
55 // keep this in sync with QDialogButtonBox::ButtonRole and QPlatformDialogHelper::ButtonRole
56 InvalidRole = -1,
57 AcceptRole,
58 RejectRole,
59 DestructiveRole,
60 ActionRole,
61 HelpRole,
62 YesRole,
63 NoRole,
64 ResetRole,
65 ApplyRole,
67 NRoles
68 };
69 Q_ENUM(ButtonRole)
71 enum StandardButton {
72 // keep this in sync with QDialogButtonBox::StandardButton and QPlatformDialogHelper::StandardButton
73 NoButton = 0x00000000,
74 Ok = 0x00000400,
75 Save = 0x00000800,
76 SaveAll = 0x00001000,
77 Open = 0x00002000,
78 Yes = 0x00004000,
79 YesToAll = 0x00008000,
80 No = 0x00010000,
81 NoToAll = 0x00020000,
82 Abort = 0x00040000,
83 Retry = 0x00080000,
84 Ignore = 0x00100000,
85 Close = 0x00200000,
86 Cancel = 0x00400000,
87 Discard = 0x00800000,
88 Help = 0x01000000,
89 Apply = 0x02000000,
90 Reset = 0x04000000,
91 RestoreDefaults = 0x08000000,
93 FirstButton = Ok, // internal
94 LastButton = RestoreDefaults, // internal
96 YesAll = YesToAll, // obsolete
97 NoAll = NoToAll, // obsolete
99 Default = 0x00000100, // obsolete
100 Escape = 0x00000200, // obsolete
101 FlagMask = 0x00000300, // obsolete
102 ButtonMask = ~FlagMask // obsolete
103 };
104 Q_ENUM(StandardButton)
105
106#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
107 typedef StandardButton Button;
108#endif
109 Q_DECLARE_FLAGS(Options, Option)
110 Q_DECLARE_FLAGS(StandardButtons, StandardButton)
111
112 Q_FLAG(StandardButtons)
113
114 explicit QMessageBox(QWidget *parent = nullptr);
115 QMessageBox(Icon icon, const QString &title, const QString &text,
116 StandardButtons buttons = NoButton, QWidget *parent = nullptr,
117 Qt::WindowFlags flags = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
118 ~QMessageBox();
119
120 void addButton(QAbstractButton *button, ButtonRole role);
121 QPushButton *addButton(const QString &text, ButtonRole role);
122 QPushButton *addButton(StandardButton button);
123 void removeButton(QAbstractButton *button);
124
125 using QDialog::open;
126 void open(QObject *receiver, const char *member);
127
128 QList<QAbstractButton *> buttons() const;
129 ButtonRole buttonRole(QAbstractButton *button) const;
130
131 void setStandardButtons(StandardButtons buttons);
132 StandardButtons standardButtons() const;
133 StandardButton standardButton(QAbstractButton *button) const;
134 QAbstractButton *button(StandardButton which) const;
135
136 QPushButton *defaultButton() const;
137 void setDefaultButton(QPushButton *button);
138 void setDefaultButton(StandardButton button);
139
140 QAbstractButton *escapeButton() const;
141 void setEscapeButton(QAbstractButton *button);
142 void setEscapeButton(StandardButton button);
143
144 QAbstractButton *clickedButton() const;
145
146 QString text() const;
147 void setText(const QString &text);
148
149 Icon icon() const;
150 void setIcon(Icon);
151
152 QPixmap iconPixmap() const;
153 void setIconPixmap(const QPixmap &pixmap);
154
155 Qt::TextFormat textFormat() const;
156 void setTextFormat(Qt::TextFormat format);
157
158 void setTextInteractionFlags(Qt::TextInteractionFlags flags);
159 Qt::TextInteractionFlags textInteractionFlags() const;
160
161 void setCheckBox(QCheckBox *cb);
162 QCheckBox* checkBox() const;
163
164 void setOption(Option option, bool on = true);
165 bool testOption(Option option) const;
166 void setOptions(Options options);
167 Options options() const;
168
169 static StandardButton information(QWidget *parent,
170 const QString &title,
171 const QString &text,
172 Qt::TextFormat textFormat,
173 StandardButtons buttons = Ok,
174 StandardButton defaultButton = NoButton);
175
176 static StandardButton information(QWidget *parent, const QString &title,
177 const QString &text, StandardButtons buttons = Ok,
178 StandardButton defaultButton = NoButton);
179#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) // needed as long as we have int overloads
180 inline static StandardButton information(QWidget *parent, const QString &title,
181 const QString& text,
182 StandardButton button0, StandardButton button1 = NoButton)
183 { return information(parent, title, text, StandardButtons(button0), button1); }
184#endif
185
186 static StandardButton question(QWidget *parent,
187 const QString &title,
188 const QString &text,
189 Qt::TextFormat textFormat,
190 StandardButtons buttons = StandardButtons(Yes | No),
191 StandardButton defaultButton = NoButton);
192
193 static StandardButton question(QWidget *parent, const QString &title,
194 const QString &text, StandardButtons buttons = StandardButtons(Yes | No),
195 StandardButton defaultButton = NoButton);
196#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
197 inline static int question(QWidget *parent, const QString &title,
198 const QString& text,
199 StandardButton button0, StandardButton button1)
200 { return question(parent, title, text, StandardButtons(button0), button1); }
201#endif
202
203 static StandardButton warning(QWidget *parent,
204 const QString &title,
205 const QString &text,
206 Qt::TextFormat textFormat,
207 StandardButtons buttons = Ok,
208 StandardButton defaultButton = NoButton);
209
210 static StandardButton warning(QWidget *parent, const QString &title,
211 const QString &text, StandardButtons buttons = Ok,
212 StandardButton defaultButton = NoButton);
213#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
214 inline static int warning(QWidget *parent, const QString &title,
215 const QString& text,
216 StandardButton button0, StandardButton button1)
217 { return warning(parent, title, text, StandardButtons(button0), button1); }
218#endif
219
220 static StandardButton critical(QWidget *parent,
221 const QString &title,
222 const QString &text,
223 Qt::TextFormat textFormat,
224 StandardButtons buttons = Ok,
225 StandardButton defaultButton = NoButton);
226
227 static StandardButton critical(QWidget *parent, const QString &title,
228 const QString &text, StandardButtons buttons = Ok,
229 StandardButton defaultButton = NoButton);
230#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
231 inline static int critical(QWidget *parent, const QString &title,
232 const QString& text,
233 StandardButton button0, StandardButton button1)
234 { return critical(parent, title, text, StandardButtons(button0), button1); }
235#endif
236
237 static void about(QWidget *parent,
238 const QString &title,
239 const QString &text,
240 Qt::TextFormat textFormat);
241 static void about(QWidget *parent, const QString &title, const QString &text);
242
243 static void aboutQt(QWidget *parent, const QString &title = QString());
244
245#if QT_DEPRECATED_SINCE(6,2)
246 // the following functions are obsolete:
247 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
248 QMessageBox(const QString &title, const QString &text, Icon icon,
249 int button0, int button1, int button2,
250 QWidget *parent = nullptr,
251 Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
252
253 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
254 static int information(QWidget *parent, const QString &title,
255 const QString& text,
256 int button0, int button1 = 0, int button2 = 0);
257 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
258 static int information(QWidget *parent, const QString &title,
259 const QString& text,
260 const QString& button0Text,
261 const QString& button1Text = QString(),
262 const QString& button2Text = QString(),
263 int defaultButtonNumber = 0,
264 int escapeButtonNumber = -1);
265
266 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
267 static int question(QWidget *parent, const QString &title,
268 const QString& text,
269 int button0, int button1 = 0, int button2 = 0);
270 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
271 static int question(QWidget *parent, const QString &title,
272 const QString& text,
273 const QString& button0Text,
274 const QString& button1Text = QString(),
275 const QString& button2Text = QString(),
276 int defaultButtonNumber = 0,
277 int escapeButtonNumber = -1);
278
279 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
280 static int warning(QWidget *parent, const QString &title,
281 const QString& text,
282 int button0, int button1, int button2 = 0);
283 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
284 static int warning(QWidget *parent, const QString &title,
285 const QString& text,
286 const QString& button0Text,
287 const QString& button1Text = QString(),
288 const QString& button2Text = QString(),
289 int defaultButtonNumber = 0,
290 int escapeButtonNumber = -1);
291
292 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
293 static int critical(QWidget *parent, const QString &title,
294 const QString& text,
295 int button0, int button1, int button2 = 0);
296 QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
297 static int critical(QWidget *parent, const QString &title,
298 const QString& text,
299 const QString& button0Text,
300 const QString& button1Text = QString(),
301 const QString& button2Text = QString(),
302 int defaultButtonNumber = 0,
303 int escapeButtonNumber = -1);
304
305 QT_DEPRECATED_VERSION_X_6_2("Use button() and QPushButton::text() instead.")
306 QString buttonText(int button) const;
307 QT_DEPRECATED_VERSION_X_6_2("Use addButton() instead.")
308 void setButtonText(int button, const QString &text);
309#endif
310
311 QString informativeText() const;
312 void setInformativeText(const QString &text);
313
314#if QT_CONFIG(textedit)
315 QString detailedText() const;
316 void setDetailedText(const QString &text);
317#endif
318
319 void setWindowTitle(const QString &title);
320 void setWindowModality(Qt::WindowModality windowModality);
321
322#if QT_DEPRECATED_SINCE(6,2)
323 QT_DEPRECATED_VERSION_X_6_2("Use QStyle::standardIcon() instead.")
324 static QPixmap standardIcon(Icon icon);
325#endif
326
327Q_SIGNALS:
328 void buttonClicked(QAbstractButton *button);
329
330#ifdef Q_QDOC
331public Q_SLOTS:
332 int exec() override;
333#endif
334
335protected:
336 bool event(QEvent *e) override;
337 void resizeEvent(QResizeEvent *event) override;
338 void showEvent(QShowEvent *event) override;
339 void closeEvent(QCloseEvent *event) override;
340 void keyPressEvent(QKeyEvent *event) override;
341 void changeEvent(QEvent *event) override;
342
343private:
344 Q_DISABLE_COPY(QMessageBox)
345 Q_DECLARE_PRIVATE(QMessageBox)
346};
347
348Q_DECLARE_OPERATORS_FOR_FLAGS(QMessageBox::StandardButtons)
349
350Q_WIDGETS_EXPORT void qRequireVersion(int argc, char *argv[], QAnyStringView req);
351
352#define QT_REQUIRE_VERSION(argc, argv, str) qRequireVersion(argc, argv, str);
353
354QT_END_NAMESPACE
355
356#endif // QMESSAGEBOX_H
The QApplication class manages the GUI application's control flow and main settings.
The QGroupBox widget provides a group box frame with a title.
Definition qgroupbox.h:18
The QMessageBox class provides a modal dialog for informing the user or for asking the user a questio...
Definition qmessagebox.h:23
The QPaintEngineState class provides information about the active paint engine's current state....
\inmodule QtGui
virtual QPixmap createPixmap(QSize size)
friend class QPainter
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
QRect systemRect() const
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
bool isExtended() 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.
friend class QFontEngine
Definition qpainter.h:433
void drawLines(const QLineF *lines, int lineCount)
Draws the first lineCount lines in the array lines using the current pen.
friend class QFontEngineMac
Definition qpainter.h:436
friend class QWin32PaintEngine
Definition qpainter.h:441
friend class QWin32PaintEnginePrivate
Definition qpainter.h:442
friend class QWidget
Definition qpainter.h:432
friend class QFontEngineWin
Definition qpainter.h:437
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 QtGui
\inmodule QtCore\reentrant
Definition qpoint.h:232
The QPolygonF class provides a list of points using floating point precision.
Definition qpolygon.h:97
Q_DECLARE_FLAGS(InitFlags, InitFlag)
The QRadioButton widget provides a radio button with a text label.
The QStyleHintReturnMask class provides style hints that return a QRegion.
The QStyleHintReturnVariant class provides style hints that return a QVariant.
\variable QStyleOptionGraphicsItem::exposedRect
\variable QStyleOptionHeaderV2::textElideMode
\variable QStyleOptionDockWidget::title
\variable QStyleOptionMenuItem::menuItemType
\variable QStyleOptionComplex::subControls
\variable QStyleOption::palette
\variable QStyleOptionFocusRect::backgroundColor
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
\variable QStyleOptionFrame::features
The QStyleOptionHeaderV2 class is used to describe the parameters for drawing a header.
\variable QStyleOptionProgressBar::minimum
QStyleOptionMenuItemV2(const QStyleOptionMenuItemV2 &other)
Constructs a copy of the other style option.
QStyleOptionMenuItemV2()
Constructs a QStyleOptionMenuItemV2, initializing the members variables to their default values.
QStyleOptionMenuItemV2 & operator=(const QStyleOptionMenuItemV2 &)=default
Q_DECL_UNUSED_MEMBER int unused
\variable QStyleOptionMenuItemV2::mouseDown
\variable QStyleOptionToolBox::selectedPosition
\variable QStyleOptionComboBox::editable
The QStyleOption class stores the parameters used by QStyle functions.
The QTextEdit class provides a widget that is used to edit and display both plain and rich text.
Definition qtextedit.h:30
Internal QTextItem.
\inmodule QtGui
const_iterator end() const noexcept
uint is_closing
Definition qwidget.h:82
QPalette pal
Definition qwidget.h:91
uint focus_policy
Definition qwidget.h:80
uint in_show
Definition qwidget.h:83
uint unused
Definition qwidget.h:89
uint fstrut_dirty
Definition qwidget.h:85
QRect wrect
Definition qwidget.h:93
QRect crect
Definition qwidget.h:90
uint in_destructor
Definition qwidget.h:88
uint sizehint_forced
Definition qwidget.h:81
uint in_set_window_state
Definition qwidget.h:84
Qt::WindowFlags window_flags
Definition qwidget.h:78
QFont fnt
Definition qwidget.h:92
uint window_modality
Definition qwidget.h:87
uint window_state
Definition qwidget.h:79
WId winid
Definition qwidget.h:76
uint context_menu_policy
Definition qwidget.h:86
uint widget_attributes
Definition qwidget.h:77
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QVarLengthFlatMap< QWindows11Style::Icon, QIcon, 16 > m_standardIcons
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
QWindows11Style()
Constructs a QWindows11Style object.
bool eventFilter(QObject *obj, QEvent *event) 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
void unpolish(QApplication *app) override
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const override
QWindows11Style(QWindows11StylePrivate &dd)
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
void polish(QPalette &pal) override
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *option) const 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
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
void polish(QApplication *app) override
~QWindows11Style() override
Destructor.
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 drawBackgroundDirectly(HDC dc, QWindowsThemeData &QWindowsThemeData, qreal aditionalDevicePixelRatio)
static bool isItemViewDelegateLineEdit(const QWidget *widget)
static bool useVista(bool update=false)
bool fixAlphaChannel(const QRect &rect)
void cleanup(bool force=false)
bool isTransparent(QWindowsThemeData &QWindowsThemeData)
bool hasAlphaChannel(const QRect &rect)
QRegion region(QWindowsThemeData &QWindowsThemeData)
bool drawBackground(QWindowsThemeData &QWindowsThemeData, qreal correctionFactor=1)
QFont assetFont(qreal pointSize) const
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
WinFontIconEngine(const QString &glyph, const QFont &font)
QString string() const override
void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override
Uses the given painter to paint the icon with the required mode and state into the rectangle rect.
QString key() const override
\variable QIconEngine::ScaledPixmapArgument::size
QIconEngine * clone() const override
Reimplement this method to return a clone of this icon engine.
void setScale(double scale)
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)
Definition qdir.cpp:2620
QT_REQUIRE_CONFIG(liburing)
T qstyleoption_cast(const QStyleOption *opt)
T qstyleoption_cast(QStyleOption *opt)
WINUI3Color
@ dividerStrokeDefault
@ fillControlAltSecondary
@ fillControlTertiary
@ frameColorStrongDisabled
@ textOnAccentPrimary
@ fillControlDefault
@ controlStrokeSecondary
@ frameColorStrong
@ surfaceStroke
@ fillControlDisabled
@ fillMicaAltSecondary
@ subtleHighlightColor
@ textPrimary
@ controlFillSolid
@ fillAccentSecondary
@ frameColorLight
@ subtlePressedColor
@ fillMicaAltDefault
@ textDisabled
@ fillControlSecondary
@ textSecondary
@ controlStrokeOnAccentSecondary
@ fillAccentDefault
@ textOnAccentSecondary
@ focusFrameOuterStroke
@ textOnAccentDisabled
@ fillControlAltQuarternary
@ fillControlInputActive
@ menuPanelFill
@ controlStrongFill
@ fillMicaAltTransparent
@ controlStrokePrimary
@ fillAccentDisabled
@ fillControlAltTertiary
@ fillControlAltDisabled
@ focusFrameInnerStroke
@ fillAccentTertiary
bool operator==(const ThemeMapKey &k1, const ThemeMapKey &k2)
@ UnknownAlpha
AlphaChannelType alphaType
friend size_t qHash(const ThemeMapKey &key, size_t seed=0) noexcept
ThemeMapKey(const QWindowsThemeData &data)
ThemeMapKey()=default