Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickmultieffect_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QQUICKMULTIEFFECT_H
5#define QQUICKMULTIEFFECT_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
20QT_REQUIRE_CONFIG(quick_shadereffect);
21
23#include <QtQuick/qquickitem.h>
24#include <QtCore/qrect.h>
25#include <QtGui/qvector4d.h>
26#include <QtGui/qcolor.h>
27
29
31
32class Q_QUICKEFFECTS_EXPORT QQuickMultiEffect : public QQuickItem
33{
35 Q_PROPERTY(QQuickItem *source READ source WRITE setSource NOTIFY sourceChanged)
36 Q_PROPERTY(bool autoPaddingEnabled READ autoPaddingEnabled WRITE setAutoPaddingEnabled NOTIFY autoPaddingEnabledChanged)
37 Q_PROPERTY(QRectF paddingRect READ paddingRect WRITE setPaddingRect NOTIFY paddingRectChanged)
38 Q_PROPERTY(qreal brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
39 Q_PROPERTY(qreal contrast READ contrast WRITE setContrast NOTIFY contrastChanged)
40 Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
41 Q_PROPERTY(qreal colorization READ colorization WRITE setColorization NOTIFY colorizationChanged)
42 Q_PROPERTY(QColor colorizationColor READ colorizationColor WRITE setColorizationColor NOTIFY colorizationColorChanged)
43 Q_PROPERTY(bool blurEnabled READ blurEnabled WRITE setBlurEnabled NOTIFY blurEnabledChanged)
44 Q_PROPERTY(qreal blur READ blur WRITE setBlur NOTIFY blurChanged)
45 Q_PROPERTY(int blurMax READ blurMax WRITE setBlurMax NOTIFY blurMaxChanged)
46 Q_PROPERTY(qreal blurMultiplier READ blurMultiplier WRITE setBlurMultiplier NOTIFY blurMultiplierChanged)
47 Q_PROPERTY(bool shadowEnabled READ shadowEnabled WRITE setShadowEnabled NOTIFY shadowEnabledChanged)
48 Q_PROPERTY(qreal shadowOpacity READ shadowOpacity WRITE setShadowOpacity NOTIFY shadowOpacityChanged)
49 Q_PROPERTY(qreal shadowBlur READ shadowBlur WRITE setShadowBlur NOTIFY shadowBlurChanged)
50 Q_PROPERTY(qreal shadowHorizontalOffset READ shadowHorizontalOffset WRITE setShadowHorizontalOffset NOTIFY shadowHorizontalOffsetChanged)
51 Q_PROPERTY(qreal shadowVerticalOffset READ shadowVerticalOffset WRITE setShadowVerticalOffset NOTIFY shadowVerticalOffsetChanged)
52 Q_PROPERTY(QColor shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged)
53 Q_PROPERTY(qreal shadowScale READ shadowScale WRITE setShadowScale NOTIFY shadowScaleChanged)
54 Q_PROPERTY(bool maskEnabled READ maskEnabled WRITE setMaskEnabled NOTIFY maskEnabledChanged)
55 Q_PROPERTY(QQuickItem *maskSource READ maskSource WRITE setMaskSource NOTIFY maskSourceChanged)
56 Q_PROPERTY(qreal maskThresholdMin READ maskThresholdMin WRITE setMaskThresholdMin NOTIFY maskThresholdMinChanged)
57 Q_PROPERTY(qreal maskSpreadAtMin READ maskSpreadAtMin WRITE setMaskSpreadAtMin NOTIFY maskSpreadAtMinChanged)
58 Q_PROPERTY(qreal maskThresholdMax READ maskThresholdMax WRITE setMaskThresholdMax NOTIFY maskThresholdMaxChanged)
59 Q_PROPERTY(qreal maskSpreadAtMax READ maskSpreadAtMax WRITE setMaskSpreadAtMax NOTIFY maskSpreadAtMaxChanged)
60 Q_PROPERTY(bool maskInverted READ maskInverted WRITE setMaskInverted NOTIFY maskInvertedChanged)
61 Q_PROPERTY(QRectF itemRect READ itemRect NOTIFY itemRectChanged)
62 Q_PROPERTY(QString fragmentShader READ fragmentShader NOTIFY fragmentShaderChanged)
63 Q_PROPERTY(QString vertexShader READ vertexShader NOTIFY vertexShaderChanged)
64 Q_PROPERTY(bool hasProxySource READ hasProxySource NOTIFY hasProxySourceChanged)
65 QML_NAMED_ELEMENT(MultiEffect)
67
68public:
69 QQuickMultiEffect(QQuickItem *parent = nullptr);
70 ~QQuickMultiEffect() override;
71
72 QQuickItem *source() const;
73 void setSource(QQuickItem *item);
74
75 bool autoPaddingEnabled() const;
76 void setAutoPaddingEnabled(bool enabled);
77
78 QRectF paddingRect() const;
79 void setPaddingRect(const QRectF &rect);
80
81 qreal brightness() const;
82 void setBrightness(qreal brightness);
83
84 qreal contrast() const;
85 void setContrast(qreal contrast);
86
87 qreal saturation() const;
88 void setSaturation(qreal saturation);
89
90 qreal colorization() const;
91 void setColorization(qreal colorization);
92
93 QColor colorizationColor() const;
94 void setColorizationColor(const QColor &color);
95
96 bool blurEnabled() const;
97 void setBlurEnabled(bool enabled);
98
99 qreal blur() const;
100 void setBlur(qreal blur);
101
102 int blurMax() const;
103 void setBlurMax(int blurMax);
104
105 qreal blurMultiplier() const;
106 void setBlurMultiplier(qreal blurMultiplier);
107
108 bool shadowEnabled() const;
109 void setShadowEnabled(bool enabled);
110
111 qreal shadowOpacity() const;
112 void setShadowOpacity(qreal shadowOpacity);
113
114 qreal shadowBlur() const;
115 void setShadowBlur(qreal shadowBlur);
116
117 qreal shadowHorizontalOffset() const;
118 void setShadowHorizontalOffset(qreal offset);
119
120 qreal shadowVerticalOffset() const;
121 void setShadowVerticalOffset(qreal offset);
122
123 QColor shadowColor() const;
124 void setShadowColor(const QColor &color);
125
126 qreal shadowScale() const;
127 void setShadowScale(qreal shadowScale);
128
129 bool maskEnabled() const;
130 void setMaskEnabled(bool enabled);
131
132 QQuickItem *maskSource() const;
133 void setMaskSource(QQuickItem *item);
134
135 qreal maskThresholdMin() const;
136 void setMaskThresholdMin(qreal threshold);
137
138 qreal maskSpreadAtMin() const;
139 void setMaskSpreadAtMin(qreal spread);
140
141 qreal maskThresholdMax() const;
142 void setMaskThresholdMax(qreal threshold);
143
144 qreal maskSpreadAtMax() const;
145 void setMaskSpreadAtMax(qreal spread);
146
147 bool maskInverted() const;
148 void setMaskInverted(bool inverted);
149
150 QRectF itemRect() const;
151 QString fragmentShader() const;
152 QString vertexShader() const;
153 bool hasProxySource() const;
154
156 void shaderChanged();
157 void itemSizeChanged();
158 void sourceChanged();
159 void autoPaddingEnabledChanged();
160 void paddingRectChanged();
161 void brightnessChanged();
162 void contrastChanged();
163 void saturationChanged();
164 void colorizationChanged();
165 void colorizationColorChanged();
166 void blurEnabledChanged();
167 void blurChanged();
168 void blurMaxChanged();
169 void blurMultiplierChanged();
170 void shadowEnabledChanged();
171 void shadowOpacityChanged();
172 void shadowBlurChanged();
173 void shadowHorizontalOffsetChanged();
174 void shadowVerticalOffsetChanged();
175 void shadowColorChanged();
176 void shadowScaleChanged();
177 void maskEnabledChanged();
178 void maskSourceChanged();
179 void maskThresholdMinChanged();
180 void maskSpreadAtMinChanged();
181 void maskThresholdMaxChanged();
182 void maskSpreadAtMaxChanged();
183 void maskInvertedChanged();
184 void itemRectChanged();
185 void fragmentShaderChanged();
186 void vertexShaderChanged();
187 void hasProxySourceChanged();
188
189protected:
190 void componentComplete() override;
191 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
192 void itemChange(ItemChange change, const ItemChangeData &value) override;
193
194private:
195 Q_DECLARE_PRIVATE(QQuickMultiEffect)
196};
197
199
200#endif // QQUICKMULTIEFFECT_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:144
\inmodule QtCore\reentrant
Definition qrect.h:484
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
rect
[4]
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint color
[2]
GLenum GLuint GLintptr offset
GLsizei GLsizei GLchar * source
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
QGraphicsItem * item
\inmodule QtQuick
Definition qquickitem.h:159