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
qquickpointdirection_p.h
Go to the documentation of this file.
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 POINTVECTOR_H
5#define POINTVECTOR_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 "qquickdirection_p.h"
18
20
21class Q_QUICKPARTICLES_EXPORT QQuickPointDirection : public QQuickDirection
22{
24 Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
25 Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
26 Q_PROPERTY(qreal xVariation READ xVariation WRITE setXVariation NOTIFY xVariationChanged)
27 Q_PROPERTY(qreal yVariation READ yVariation WRITE setYVariation NOTIFY yVariationChanged)
28 QML_NAMED_ELEMENT(PointDirection)
30public:
31 explicit QQuickPointDirection(QObject *parent = nullptr);
32 QPointF sample(const QPointF &from) override;
33 qreal x() const
34 {
35 return m_x;
36 }
37
38 qreal y() const
39 {
40 return m_y;
41 }
42
44 {
45 return m_xVariation;
46 }
47
49 {
50 return m_yVariation;
51 }
52
54
56
58
60
62
63public Q_SLOTS:
65 {
66 if (m_x != arg) {
67 m_x = arg;
68 Q_EMIT xChanged(arg);
69 }
70 }
71
73 {
74 if (m_y != arg) {
75 m_y = arg;
76 Q_EMIT yChanged(arg);
77 }
78 }
79
81 {
82 if (m_xVariation != arg) {
83 m_xVariation = arg;
84 Q_EMIT xVariationChanged(arg);
85 }
86 }
87
89 {
90 if (m_yVariation != arg) {
91 m_yVariation = arg;
92 Q_EMIT yVariationChanged(arg);
93 }
94 }
95
96private:
97
98 qreal m_x;
99 qreal m_y;
100 qreal m_xVariation;
101 qreal m_yVariation;
102};
103
105#endif // POINTVECTOR_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:217
void xVariationChanged(qreal arg)
void xChanged(qreal arg)
void yVariationChanged(qreal arg)
void yChanged(qreal arg)
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint x
[0]
GLint y
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
SSL_CTX int void * arg
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_EMIT
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit
p setX(p.x()+1)