DtkDeclarative
DTK Declarative module
载入中...
搜索中...
未找到
dquickopacitymask_p.h
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DQUICKOPACITYMASK_P_H
6#define DQUICKOPACITYMASK_P_H
7
8#include <dtkdeclarative_global.h>
9
10#include <QQuickItem>
11
12DQUICK_BEGIN_NAMESPACE
13
14class DQuickOpacityMaskPrivate;
15class DQuickOpacityMask : public QQuickItem
16{
17 Q_OBJECT
18 Q_PROPERTY(bool invert READ invert WRITE setInvert NOTIFY invertChanged)
19 Q_PROPERTY(QQuickItem *source READ source WRITE setSource NOTIFY sourceChanged)
20 Q_PROPERTY(QQuickItem *maskSource READ maskSource WRITE setMaskSource NOTIFY maskSourceChanged)
21#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
22 QML_NAMED_ELEMENT(SoftwareOpacityMask)
23#endif
24
25public:
26 explicit DQuickOpacityMask(QQuickItem *parent = nullptr);
27
28 bool invert();
29 void setInvert(bool invert);
30
31 QQuickItem *source() const;
32 void setSource(QQuickItem *item);
33
34 QQuickItem *maskSource() const;
35 void setMaskSource(QQuickItem *item);
36
37Q_SIGNALS:
38 void invertChanged();
39 void sourceChanged();
40 void maskSourceChanged();
41
42protected:
43 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
44
45protected:
46 DQuickOpacityMask(DQuickOpacityMaskPrivate &dd, QQuickItem *parent = nullptr);
47
48private:
49 Q_DISABLE_COPY(DQuickOpacityMask)
50 Q_DECLARE_PRIVATE(DQuickOpacityMask)
51};
52
53DQUICK_END_NAMESPACE
54
55#endif // DQUICKOPACITYMASK_P_H
Definition dquickopacitymask_p_p.h:15
Definition dquickopacitymask_p.h:16
Definition SoftwareOpacityMask.qml:12