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
qquickstylehelper_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#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 <QtCore/private/qglobal_p.h>
11#if QT_CONFIG(accessibility)
12#include <QtGui/qaccessible.h>
13#endif
14
15#ifndef QSTYLEHELPER_P_H
16#define QSTYLEHELPER_P_H
17
18//
19// W A R N I N G
20// -------------
21//
22// This file is not part of the Qt API. It exists purely as an
23// implementation detail. This header file may change from version to
24// version without notice, or even be removed.
25//
26// We mean it.
27//
28
30
31class QObject;
32class QPainter;
33class QPixmap;
34
35namespace QQC2 {
36
38class QStyleOption;
39
40namespace QStyleHelper
41{
42 QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size);
43
44 qreal dpi(const QStyleOption *option);
45 qreal dpiScaled(qreal value, qreal dpi);
46 qreal dpiScaled(qreal value, const QPaintDevice *device);
47 qreal dpiScaled(qreal value, const QStyleOption *option);
48
49 qreal angle(const QPointF &p1, const QPointF &p2);
51 int calcBigLineSize(int radius);
52 void drawDial(const QStyleOptionSlider *dial, QPainter *painter);
53
54 void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
55 int left = 0, int top = 0, int right = 0,
56 int bottom = 0);
57
58#if QT_CONFIG(accessibility)
61#endif
62 QColor backgroundColor(const QPalette &pal);
63
66}
67
68} // namespace QQC2
69
70QT_END_NAMESPACE
71
72#endif // QSTYLEHELPER_P_H
friend class QPainter
static void setStyle(QStyle *style)
virtual void connectToControl() const
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void layoutMarginsChanged()
qreal focusFrameRadius() const
virtual StyleItemGeometry calculateGeometry()=0
OverrideState m_overrideState
virtual void paintEvent(QPainter *painter) const =0
QSize imageSize() const
void itemChange(ItemChange change, const ItemChangeData &data) override
Called when change occurs for this item.
const T * control() const
void minimumSizeChanged()
qreal contentWidth()
QSize contentSize() const
void updatePolish() override
This function should perform any layout as required for this item.
void setContentHeight(qreal contentHeight)
QQuickStyleMargins contentPadding() const
~QQuickStyleItem() override
QQuickStyleMargins layoutMargins() const
void contentPaddingChanged()
QSize minimumSize() const
static QStyle::State controlSize(QQuickItem *item)
void setContentWidth(qreal contentWidth)
qreal contentHeight()
void initStyleOptionBase(QStyleOption &styleOption) const
static QStyle * style()
QSGNode * updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *updatePaintNodeData) override
Called on the render thread when it is time to sync the state of the item with the scene graph.
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
bool event(QEvent *event) override
\reimp
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
int calcBigLineSize(int radius)
void drawDial(const QStyleOptionSlider *dial, QPainter *painter)
QPolygonF calcLines(const QStyleOptionSlider *dial)
qreal dpi(const QStyleOption *option)
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 drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left=0, int top=0, int right=0, int bottom=0)
qreal angle(const QPointF &p1, const QPointF &p2)
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
static QWindow * effectiveWindow(QQuickWindow *window)
#define qqc2Info()
#define qqc2InfoHeading(HEADING)