Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquickrectangularshadow_p_p.h
Go to the documentation of this file.
1
// Copyright (C) 2024 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
QQUICKRECTANGULARSHADOW_P_P_H
5
#
define
QQUICKRECTANGULARSHADOW_P_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
<
private
/
qtquickglobal_p
.
h
>
19
20
QT_REQUIRE_CONFIG
(
quick_shadereffect
);
21
22
#
include
<
private
/
qquickrectangularshadow_p
.
h
>
23
#
include
<
private
/
qquickitem_p
.
h
>
24
#
include
<
private
/
qlazilyallocated_p
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QQuickShaderEffect;
29
30
class
QQuickRectangularShadowPrivate
:
public
QQuickItemPrivate
31
{
32
Q_DECLARE_PUBLIC(QQuickRectangularShadow)
33
34
public
:
35
QQuickRectangularShadowPrivate
();
36
37
private
:
38
void
initialize();
39
void
handleGeometryChange(
const
QRectF &newGeometry,
const
QRectF &oldGeometry);
40
void
handleItemChange(QQuickItem::ItemChange change,
const
QQuickItem::ItemChangeData &value);
41
qreal getPadding()
const
;
42
void
updateColor();
43
void
updateShaderSource();
44
void
updateSizeProperties();
45
void
updateCached();
46
qreal clampedRadius(qreal radius)
const
;
47
QVector4D clampedRadius4R()
const
;
48
QQuickItem *currentMaterial()
const
;
49
void
maybeSetImplicitAntialiasing();
50
bool
useIndividualRadius()
const
;
51
void
updateDefaultShader();
52
53
QQuickShaderEffect *m_defaultMaterial =
nullptr
;
54
QQuickItem *m_material =
nullptr
;
55
QColor m_color = { 0, 0, 0, 255 };
56
QVector2D m_offset;
57
qreal m_blur = 10.0;
58
qreal m_radius = 0.0;
59
qreal m_spread = 0.0;
60
bool
m_cached =
false
;
61
bool
m_initialized =
false
;
62
63
struct
ExtraData {
64
ExtraData()
65
: topLeftRadius(0),
66
topRightRadius(0),
67
bottomLeftRadius(0),
68
bottomRightRadius(0),
69
isTopLeftRadiusSet(
false
),
70
isTopRightRadiusSet(
false
),
71
isBottomLeftRadiusSet(
false
),
72
isBottomRightRadiusSet(
false
)
73
{
74
}
75
qreal topLeftRadius;
76
qreal topRightRadius;
77
qreal bottomLeftRadius;
78
qreal bottomRightRadius;
79
80
unsigned
isTopLeftRadiusSet : 1;
81
unsigned
isTopRightRadiusSet : 1;
82
unsigned
isBottomLeftRadiusSet : 1;
83
unsigned
isBottomRightRadiusSet : 1;
84
};
85
QLazilyAllocated<ExtraData> extra;
86
};
87
88
QT_END_NAMESPACE
89
90
#
endif
// QQUICKRECTANGULARSHADOW_P_P_H
QQuickRectangularShadowPrivate
Definition
qquickrectangularshadow_p_p.h:31
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(quick_shadereffect)
qtdeclarative
src
effects
qquickrectangularshadow_p_p.h
Generated on
for Qt by
1.18.0