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 spread READ spread WRITE setSpread NOTIFY spreadChanged FINAL)
40 Q_PROPERTY(bool cached READ isCached WRITE setCached NOTIFY cachedChanged FINAL)
41 Q_PROPERTY(QQuickItem *material READ material WRITE setMaterial NOTIFY materialChanged FINAL)
42 QML_NAMED_ELEMENT(RectangularShadow)
43 QML_ADDED_IN_VERSION(6, 9)
44public:
45 QQuickRectangularShadow(QQuickItem *parent = nullptr);
46
47 QVector2D offset() const;
48 void setOffset(const QVector2D &offset);
49 QColor color() const;
50 void setColor(const QColor &color);
51 qreal blur() const;
52 void setBlur(qreal blur);
53 qreal radius() const;
54 void setRadius(qreal radius);
55 qreal spread() const;
56 void setSpread(qreal spread);
57 bool isCached() const;
58 void setCached(bool cached);
59 QQuickItem *material() const;
60 void setMaterial(QQuickItem *item);
61
62Q_SIGNALS:
63 void offsetChanged();
64 void colorChanged();
65 void blurChanged();
66 void radiusChanged();
67 void spreadChanged();
68 void cachedChanged();
69 void materialChanged();
70
71protected:
72 void componentComplete() override;
73 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
74 void itemChange(ItemChange change, const ItemChangeData &value) override;
75
76private:
77 Q_DECLARE_PRIVATE(QQuickRectangularShadow)
78};
79
80QT_END_NAMESPACE
81
82#endif // QQUICKRECTANGULARSHADOW_P_H
QT_REQUIRE_CONFIG(quick_shadereffect)