1 | // Copyright (C) 2016 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 LINEEXTRUDER_H |
5 | #define LINEEXTRUDER_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 | #include "qquickparticleextruder_p.h" |
18 | |
19 | class Q_QUICKPARTICLES_PRIVATE_EXPORT QQuickLineExtruder : public QQuickParticleExtruder |
20 | { |
21 | Q_OBJECT |
22 | //Default is topleft to bottom right. Flipped makes it topright to bottom left |
23 | Q_PROPERTY(bool mirrored READ mirrored WRITE setMirrored NOTIFY mirroredChanged FINAL) |
24 | QML_NAMED_ELEMENT(LineShape) |
25 | QML_ADDED_IN_VERSION(2, 0) |
26 | |
27 | public: |
28 | explicit QQuickLineExtruder(QObject *parent = nullptr); |
29 | QPointF extrude(const QRectF &) override; |
30 | bool mirrored() const |
31 | { |
32 | return m_mirrored; |
33 | } |
34 | |
35 | Q_SIGNALS: |
36 | |
37 | void mirroredChanged(bool arg); |
38 | |
39 | public Q_SLOTS: |
40 | |
41 | void setMirrored(bool arg) |
42 | { |
43 | if (m_mirrored != arg) { |
44 | m_mirrored = arg; |
45 | Q_EMIT mirroredChanged(arg); |
46 | } |
47 | } |
48 | private: |
49 | bool m_mirrored; |
50 | }; |
51 | |
52 | #endif // LINEEXTRUDER_H |
53 | |