Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcommonstyle.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
4#ifndef QCOMMONSTYLE_H
5#define QCOMMONSTYLE_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qstyle.h>
9
11
13
14class Q_WIDGETS_EXPORT QCommonStyle: public QStyle
15{
17
18public:
21
23 const QWidget *w = nullptr) const override;
24 void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
25 const QWidget *w = nullptr) const override;
26 QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
27 void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
28 const QWidget *w = nullptr) const override;
29 SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
30 const QPoint &pt, const QWidget *w = nullptr) const override;
31 QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc,
32 const QWidget *w = nullptr) const override;
33 QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,
34 const QSize &contentsSize, const QWidget *widget = nullptr) const override;
35
36 int pixelMetric(PixelMetric m, const QStyleOption *opt = nullptr, const QWidget *widget = nullptr) const override;
37
38 int styleHint(StyleHint sh, const QStyleOption *opt = nullptr, const QWidget *w = nullptr,
39 QStyleHintReturn *shret = nullptr) const override;
40
41 QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = nullptr,
42 const QWidget *widget = nullptr) const override;
43 QPixmap standardPixmap(StandardPixmap sp, const QStyleOption *opt = nullptr,
44 const QWidget *widget = nullptr) const override;
45
46 QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
47 const QStyleOption *opt) const override;
48 int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2,
49 Qt::Orientation orientation, const QStyleOption *option = nullptr,
50 const QWidget *widget = nullptr) const override;
51
52 void polish(QPalette &) override;
53 void polish(QApplication *app) override;
54 void polish(QWidget *widget) override;
55 void unpolish(QWidget *widget) override;
56 void unpolish(QApplication *application) override;
57
58protected:
60
61private:
62 Q_DECLARE_PRIVATE(QCommonStyle)
63 Q_DISABLE_COPY(QCommonStyle)
64};
65
67
68#endif // QCOMMONSTYLE_H
The QApplication class manages the GUI application's control flow and main settings.
The QCommonStyle class encapsulates the common Look and Feel of a GUI.
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
Mode
This enum type describes the mode for which a pixmap is intended to be used.
Definition qicon.h:22
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\variable QStyleOptionGraphicsItem::exposedRect
\variable QStyleOptionMenuItem::menuItemType
The QStyleOption class stores the parameters used by QStyle functions.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
Definition qstyle.h:29
ContentsType
This enum describes the available contents types.
Definition qstyle.h:546
StyleHint
This enum describes the available style hints.
Definition qstyle.h:584
StandardPixmap
This enum describes the available standard pixmaps.
Definition qstyle.h:716
ControlElement
This enum represents a control element.
Definition qstyle.h:170
PixelMetric
This enum describes the various available pixel metrics.
Definition qstyle.h:413
ComplexControl
This enum describes the available complex controls.
Definition qstyle.h:331
PrimitiveElement
This enum describes the various primitive elements.
Definition qstyle.h:102
SubElement
This enum represents a sub-area of a widget.
Definition qstyle.h:242
SubControl
This enum describes the available sub controls.
Definition qstyle.h:347
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
drawPrimitive(PE_IndicatorCheckBox, &subopt, p, widget)
QStyleOptionButton opt
p drawControl(QStyle::CE_CheckBox, opt)
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
const GLfloat * m
GLfloat GLfloat GLfloat w
[0]
GLboolean r
[2]
GLfloat GLfloat p
[1]
GLuint GLenum option
#define sp
#define Q_OBJECT
QApplication app(argc, argv)
[0]
widget render & pixmap