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
4#include <QtCore/qpoint.h>
5#include <QtCore/qstring.h>
6#include <QtGui/qpaintdevice.h>
7#include <QtGui/qpolygon.h>
8#include <QtCore/qstringbuilder.h>
9#include <QtCore/private/qglobal_p.h>
10#if QT_CONFIG(accessibility)
11#include <QtGui/qaccessible.h>
12#endif
13
14#ifndef QSTYLEHELPER_P_H
15#define QSTYLEHELPER_P_H
16
17//
18// W A R N I N G
19// -------------
20//
21// This file is not part of the Qt API. It exists purely as an
22// implementation detail. This header file may change from version to
23// version without notice, or even be removed.
24//
25// We mean it.
26//
27
29
30class QObject;
31class QPainter;
32class QPixmap;
33
34namespace QQC2 {
35
37class QStyleOption;
38
39namespace QStyleHelper
40{
41 QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size);
42
43 qreal dpi(const QStyleOption *option);
44 qreal dpiScaled(qreal value, qreal dpi);
45 qreal dpiScaled(qreal value, const QPaintDevice *device);
46 qreal dpiScaled(qreal value, const QStyleOption *option);
47
48 qreal angle(const QPointF &p1, const QPointF &p2);
50 int calcBigLineSize(int radius);
51 void drawDial(const QStyleOptionSlider *dial, QPainter *painter);
52
53 void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
54 int left = 0, int top = 0, int right = 0,
55 int bottom = 0);
56
57#if QT_CONFIG(accessibility)
60#endif
61 QColor backgroundColor(const QPalette &pal);
62
65}
66
67} // namespace QQC2
68
69QT_END_NAMESPACE
70
71#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)
Combined button and popup list for selecting options.
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
static QWindow * effectiveWindow(QQuickWindow *window)
#define qqc2Info()
#define qqc2InfoHeading(HEADING)