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
qqc2qstylehelper_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QQC2QSTYLEHELPER_P_H
6#define QQC2QSTYLEHELPER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qglobal_p.h>
20
21#include <QtGui/qpaintdevice.h>
22#include <QtGui/qpolygon.h>
23
24#include <QtCore/qpoint.h>
25#include <QtCore/qstring.h>
26#include <QtCore/qstringbuilder.h>
27
28#if QT_CONFIG(accessibility)
29#include <QtGui/qaccessible.h>
30#endif
31
32QT_BEGIN_NAMESPACE
33
34class QObject;
35class QPainter;
36class QPixmap;
37
38namespace QQC2 {
39
41class QStyleOption;
42
43namespace QStyleHelper
44{
45 QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size);
46
47 qreal dpi(const QStyleOption *option);
48 qreal dpiScaled(qreal value, qreal dpi);
49 qreal dpiScaled(qreal value, const QPaintDevice *device);
50 qreal dpiScaled(qreal value, const QStyleOption *option);
51
52 qreal angle(const QPointF &p1, const QPointF &p2);
54 int calcBigLineSize(int radius);
55 void drawDial(const QStyleOptionSlider *dial, QPainter *painter);
56
57 void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
58 int left = 0, int top = 0, int right = 0,
59 int bottom = 0);
60
61#if QT_CONFIG(accessibility)
64#endif
65 QColor backgroundColor(const QPalette &pal);
66
69}
70
71} // namespace QQC2
72
73QT_END_NAMESPACE
74
75#endif // QQC2QSTYLEHELPER_P_H
friend class QPainter
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
int calcBigLineSize(int radius)
QPolygonF calcLines(const QStyleOptionSlider *dial)
static QPointF calcRadialPos(const QStyleOptionSlider *dial, qreal offset)
qreal dpi(const QStyleOption *option)
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left, int top, int right, int bottom)
static const qreal qstyleBaseDpi
qreal dpiScaled(qreal value, const QStyleOption *option)
WidgetSizePolicy widgetSizePolicy(const QStyleOption *opt)
QColor backgroundColor(const QPalette &pal)
qreal dpiScaled(qreal value, const QPaintDevice *device)
qreal dpiScaled(qreal value, qreal dpi)
void drawDial(const QStyleOptionSlider *option, QPainter *painter)
qreal angle(const QPointF &p1, const QPointF &p2)
Combined button and popup list for selecting options.