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
qquickrectangularshadow_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_H
5#define QQUICKRECTANGULARSHADOW_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
21
23#include <QtQuick/qquickitem.h>
24#include <QtGui/qcolor.h>
25#include <QtGui/qvector2d.h>
26#include <QtCore/qrect.h>
27
28QT_BEGIN_NAMESPACE
29
30class QQuickRectangularShadowPrivate;
31
32class Q_QUICKEFFECTS_EXPORT QQuickRectangularShadow : public QQuickItem
33{
34 Q_OBJECT
35 Q_PROPERTY(QVector2D offset READ offset WRITE setOffset NOTIFY offsetChanged FINAL)
36 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
37 Q_PROPERTY(qreal blur READ blur WRITE setBlur NOTIFY blurChanged FINAL)
38 Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged FINAL)
39 Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY topLeftRadiusChanged RESET resetTopLeftRadius REVISION(6, 11))
40 Q_PROPERTY(qreal topRightRadius READ topRightRadius WRITE setTopRightRadius NOTIFY topRightRadiusChanged RESET resetTopRightRadius REVISION(6, 11))
41 Q_PROPERTY(qreal bottomLeftRadius READ bottomLeftRadius WRITE setBottomLeftRadius NOTIFY bottomLeftRadiusChanged RESET resetBottomLeftRadius REVISION(6, 11))
42 Q_PROPERTY(qreal bottomRightRadius READ bottomRightRadius WRITE setBottomRightRadius NOTIFY bottomRightRadiusChanged RESET resetBottomRightRadius REVISION(6, 11))
43 Q_PROPERTY(qreal spread READ spread WRITE setSpread NOTIFY spreadChanged FINAL)
44 Q_PROPERTY(bool cached READ isCached WRITE setCached NOTIFY cachedChanged FINAL)
45 Q_PROPERTY(QQuickItem *material READ material WRITE setMaterial NOTIFY materialChanged FINAL)
46 QML_NAMED_ELEMENT(RectangularShadow)
47 QML_ADDED_IN_VERSION(6, 9)
48public:
49 QQuickRectangularShadow(QQuickItem *parent = nullptr);
50
51 QVector2D offset() const;
52 void setOffset(const QVector2D &offset);
53 QColor color() const;
54 void setColor(const QColor &color);
55 qreal blur() const;
56 void setBlur(qreal blur);
57 qreal radius() const;
58 void setRadius(qreal radius);
59 qreal spread() const;
60 void setSpread(qreal spread);
61 bool isCached() const;
62 void setCached(bool cached);
63 QQuickItem *material() const;
64 void setMaterial(QQuickItem *item);
65
66 qreal topLeftRadius() const;
67 void setTopLeftRadius(qreal radius);
68 void resetTopLeftRadius();
69 qreal topRightRadius() const;
70 void setTopRightRadius(qreal radius);
71 void resetTopRightRadius();
72 qreal bottomLeftRadius() const;
73 void setBottomLeftRadius(qreal radius);
74 void resetBottomLeftRadius();
75 qreal bottomRightRadius() const;
76 void setBottomRightRadius(qreal radius);
77 void resetBottomRightRadius();
78
79Q_SIGNALS:
80 void offsetChanged();
81 void colorChanged();
82 void blurChanged();
83 void radiusChanged();
84 void spreadChanged();
85 void cachedChanged();
86 void materialChanged();
87 Q_REVISION(6, 11) void topLeftRadiusChanged();
88 Q_REVISION(6, 11) void topRightRadiusChanged();
89 Q_REVISION(6, 11) void bottomLeftRadiusChanged();
90 Q_REVISION(6, 11) void bottomRightRadiusChanged();
91
92protected:
93 void componentComplete() override;
94 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
95 void itemChange(ItemChange change, const ItemChangeData &value) override;
96
97private:
98 Q_DECLARE_PRIVATE(QQuickRectangularShadow)
99};
100
101QT_END_NAMESPACE
102
103#endif // QQUICKRECTANGULARSHADOW_P_H
QT_REQUIRE_CONFIG(quick_shadereffect)