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
qquickspringanimation_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 QQUICKSPRINGANIMATION_H
6#define QQUICKSPRINGANIMATION_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 <qqml.h>
21
22#include <QtCore/qobject.h>
23
25
27class Q_QUICK_EXPORT QQuickSpringAnimation : public QQuickNumberAnimation
28{
29 Q_OBJECT
30 Q_DISABLE_COPY_MOVE(QQuickSpringAnimation)
31 Q_DECLARE_PRIVATE(QQuickSpringAnimation)
32 Q_INTERFACES(QQmlPropertyValueSource)
33
34 Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity)
35 Q_PROPERTY(qreal spring READ spring WRITE setSpring)
36 Q_PROPERTY(qreal damping READ damping WRITE setDamping)
37 Q_PROPERTY(qreal epsilon READ epsilon WRITE setEpsilon)
38 Q_PROPERTY(qreal modulus READ modulus WRITE setModulus NOTIFY modulusChanged)
39 Q_PROPERTY(qreal mass READ mass WRITE setMass NOTIFY massChanged)
40 QML_NAMED_ELEMENT(SpringAnimation)
41 QML_ADDED_IN_VERSION(2, 0)
42
43public:
44 QQuickSpringAnimation(QObject *parent=nullptr);
45 ~QQuickSpringAnimation();
46
47 qreal velocity() const;
48 void setVelocity(qreal velocity);
49
50 qreal spring() const;
51 void setSpring(qreal spring);
52
53 qreal damping() const;
54 void setDamping(qreal damping);
55
56 qreal epsilon() const;
57 void setEpsilon(qreal epsilon);
58
59 qreal mass() const;
60 void setMass(qreal modulus);
61
62 qreal modulus() const;
63 void setModulus(qreal modulus);
64
65 QAbstractAnimationJob* transition(QQuickStateActions &actions,
66 QQmlProperties &modified,
67 TransitionDirection direction,
68 QObject *defaultTarget = nullptr) override;
69
70Q_SIGNALS:
71 void modulusChanged();
72 void massChanged();
73 void syncChanged();
74};
75
76QT_END_NAMESPACE
77
78#endif // QQUICKSPRINGANIMATION_H
#define DELAY_STOP_TIMER_INTERVAL