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
qquickpathinterpolator_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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKPATHINTERPOLATOR_P_H
6#define QQUICKPATHINTERPOLATOR_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qtquickglobal_p.h>
20
22
23#include <qqml.h>
24#include <QObject>
25
27
28class QQuickPath;
29class Q_QUICK_EXPORT QQuickPathInterpolator : public QObject
30{
31 Q_OBJECT
32 Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged)
33 Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
34 Q_PROPERTY(qreal x READ x NOTIFY xChanged)
35 Q_PROPERTY(qreal y READ y NOTIFY yChanged)
36 Q_PROPERTY(qreal angle READ angle NOTIFY angleChanged)
37 QML_NAMED_ELEMENT(PathInterpolator)
38 QML_ADDED_IN_VERSION(2, 0)
39public:
40 explicit QQuickPathInterpolator(QObject *parent = nullptr);
41
42 QQuickPath *path() const;
43 void setPath(QQuickPath *path);
44
45 qreal progress() const;
46 void setProgress(qreal progress);
47
48 qreal x() const;
49 qreal y() const;
50 qreal angle() const;
51
52Q_SIGNALS:
53 void pathChanged();
54 void progressChanged();
55 void xChanged();
56 void yChanged();
57 void angleChanged();
58
59private Q_SLOTS:
60 void _q_pathUpdated();
61
62private:
63 QQuickPath *_path;
64 qreal _x;
65 qreal _y;
66 qreal _angle;
67 qreal _progress;
68};
69
70QT_END_NAMESPACE
71
72#endif // QQUICKPATHINTERPOLATOR_P_H
QT_REQUIRE_CONFIG(quick_path)