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
qstylehelper_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#include <QtWidgets/private/qtwidgetsglobal_p.h>
5#include <QtCore/qpoint.h>
6#include <QtCore/qstring.h>
7#include <QtGui/qpaintdevice.h>
8#include <QtGui/qpolygon.h>
9#include <QtCore/qstringbuilder.h>
10#include <QtGui/qaccessible.h>
11
12#ifndef QSTYLEHELPER_P_H
13#define QSTYLEHELPER_P_H
14
15//
16// W A R N I N G
17// -------------
18//
19// This file is not part of the Qt API. It exists purely as an
20// implementation detail. This header file may change from version to
21// version without notice, or even be removed.
22//
23// We mean it.
24//
25
26#include <private/qhexstring_p.h>
27
29
30class QColor;
31class QObject;
32class QPainter;
33class QPalette;
34class QPixmap;
35class QStyleOptionSlider;
36class QStyleOption;
37class QWidget;
38class QWindow;
39
40namespace QStyleHelper
41{
43
44 Q_WIDGETS_EXPORT qreal dpi(const QStyleOption *option);
45
46 Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, qreal dpi);
47 Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, const QPaintDevice *device);
48 Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, const QStyleOption *option);
49
50#if QT_CONFIG(dial)
51 qreal angle(const QPointF &p1, const QPointF &p2);
52 QPolygonF calcLines(const QStyleOptionSlider *dial);
53 int calcBigLineSize(int radius);
54 Q_WIDGETS_EXPORT void drawDial(const QStyleOptionSlider *dial, QPainter *painter);
55#endif //QT_CONFIG(dial)
56 Q_WIDGETS_EXPORT void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
57 int left = 0, int top = 0, int right = 0,
58 int bottom = 0);
59#if QT_CONFIG(accessibility)
60 Q_WIDGETS_EXPORT bool isInstanceOf(QObject *obj, QAccessible::Role role);
61 Q_WIDGETS_EXPORT bool hasAncestor(QObject *obj, QAccessible::Role role);
62#endif
63 Q_WIDGETS_EXPORT QColor backgroundColor(const QPalette &pal, const QWidget* widget = nullptr);
64
66
67 Q_WIDGETS_EXPORT WidgetSizePolicy widgetSizePolicy(const QWidget *w, const QStyleOption *opt = nullptr);
68}
69
70
72
73#endif // QSTYLEHELPER_P_H
IOBluetoothDevice * device
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qobject.h:103
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:217
The QPolygonF class provides a list of points using floating point precision.
Definition qpolygon.h:96
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QStyleOption class stores the parameters used by QStyle functions.
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
\inmodule QtGui
Definition qwindow.h:63
QOpenGLWidget * widget
[1]
QPixmap p2
QPixmap p1
[0]
rect
[4]
QStyleOptionButton opt
int calcBigLineSize(int radius)
QPolygonF calcLines(const QStyleOptionSlider *dial)
void drawDial(const QStyleOptionSlider *option, QPainter *painter)
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left, int top, int right, int bottom)
Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, qreal dpi)
Q_WIDGETS_EXPORT qreal dpi(const QStyleOption *option)
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size, qreal dpr)
WidgetSizePolicy widgetSizePolicy(const QWidget *widget, const QStyleOption *opt)
QColor backgroundColor(const QPalette &pal, const QWidget *widget)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint64 key
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
GLfloat angle
GLhandleARB obj
[2]
GLuint GLenum option
static QT_BEGIN_NAMESPACE qreal dpr(const QWindow *w)
double qreal
Definition qtypes.h:187
widget render & pixmap
QPainter painter(this)
[7]