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
qmacstyle_mac_p.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 QMACSTYLE_MAC_P_H
5#define QMACSTYLE_MAC_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
19#include <QtWidgets/qcommonstyle.h>
20
22
23class QPalette;
24
25class QPushButton;
28class QMacStyle : public QCommonStyle
29{
31public:
32 QMacStyle();
33 virtual ~QMacStyle();
34
35 void polish(QWidget *w);
36 void unpolish(QWidget *w);
37
38 void polish(QApplication*);
40
41 void polish(QPalette &pal);
42
44 const QWidget *w = nullptr) const;
45 void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
46 const QWidget *w = nullptr) const;
47 QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const;
49 const QWidget *w = nullptr) const;
51 const QPoint &pt, const QWidget *w = nullptr) const;
53 const QWidget *w = nullptr) const;
55 const QSize &contentsSize, const QWidget *w = nullptr) const;
56
57 int pixelMetric(PixelMetric pm, const QStyleOption *opt = 0, const QWidget *widget = nullptr) const;
58
60
61 virtual int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = nullptr,
62 QStyleHintReturn *shret = nullptr) const;
63
65 const QWidget *widget = nullptr) const;
66
68 const QStyleOption *opt) const;
69
70 virtual void drawItemText(QPainter *p, const QRect &r, int flags, const QPalette &pal,
71 bool enabled, const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const;
72
73 bool event(QEvent *e);
74
76 const QWidget *widget = nullptr) const;
78 Qt::Orientation orientation, const QStyleOption *option = nullptr,
79 const QWidget *widget = nullptr) const;
80
81private:
82 Q_DISABLE_COPY_MOVE(QMacStyle)
83 Q_DECLARE_PRIVATE(QMacStyle)
84};
85
87
88#endif // QMACSTYLE_MAC_P_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.
\inmodule QtCore
Definition qcoreevent.h:45
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
virtual void drawItemText(QPainter *p, const QRect &r, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const
Draws the given text in the specified rectangle using the provided painter and palette.
int pixelMetric(PixelMetric pm, const QStyleOption *opt=0, const QWidget *widget=nullptr) const
\reimp
QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const
\reimp
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const
\reimp
virtual int styleHint(StyleHint sh, const QStyleOption *opt=0, const QWidget *w=nullptr, QStyleHintReturn *shret=nullptr) const
\reimp
QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget=nullptr) const
\reimp
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *w=nullptr) const
\reimp
SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *w=nullptr) const
\reimp
void polish(QWidget *w)
\reimp
int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const
\reimp
void unpolish(QWidget *w)
\reimp
QPalette standardPalette() const
Returns the style's standard palette.
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
\reimp
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr) const
virtual ~QMacStyle()
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const
\reimp
QPixmap standardPixmap(StandardPixmap sp, const QStyleOption *opt, const QWidget *widget=nullptr) const
\reimp
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w=nullptr) const
\reimp
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
The QPushButton widget provides a command button.
Definition qpushbutton.h:20
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\variable QStyleOptionGraphicsItem::exposedRect
\variable QStyleOptionHeaderV2::textElideMode
\variable QStyleOptionMenuItem::menuItemType
The QStyleOption class stores the parameters used by QStyle functions.
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]
QString text
QStyleOptionButton opt
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
GLfloat GLfloat GLfloat w
[0]
GLboolean r
[2]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLbitfield flags
struct _cl_event * event
GLfloat GLfloat p
[1]
GLuint GLenum option
#define sp
#define Q_OBJECT
widget render & pixmap