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
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
4#ifndef QQUICKSPRINGANIMATION_H
5#define QQUICKSPRINGANIMATION_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
18#include <qqml.h>
19#include "qquickanimation_p.h"
20
21#include <QtCore/qobject.h>
22
24
26class Q_QUICK_EXPORT QQuickSpringAnimation : public QQuickNumberAnimation
27{
29 Q_DISABLE_COPY_MOVE(QQuickSpringAnimation)
30 Q_DECLARE_PRIVATE(QQuickSpringAnimation)
32
33 Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity)
34 Q_PROPERTY(qreal spring READ spring WRITE setSpring)
35 Q_PROPERTY(qreal damping READ damping WRITE setDamping)
36 Q_PROPERTY(qreal epsilon READ epsilon WRITE setEpsilon)
37 Q_PROPERTY(qreal modulus READ modulus WRITE setModulus NOTIFY modulusChanged)
38 Q_PROPERTY(qreal mass READ mass WRITE setMass NOTIFY massChanged)
39 QML_NAMED_ELEMENT(SpringAnimation)
41
42public:
43 QQuickSpringAnimation(QObject *parent=nullptr);
45
46 qreal velocity() const;
47 void setVelocity(qreal velocity);
48
49 qreal spring() const;
50 void setSpring(qreal spring);
51
52 qreal damping() const;
53 void setDamping(qreal damping);
54
55 qreal epsilon() const;
56 void setEpsilon(qreal epsilon);
57
58 qreal mass() const;
59 void setMass(qreal modulus);
60
61 qreal modulus() const;
62 void setModulus(qreal modulus);
63
64 QAbstractAnimationJob* transition(QQuickStateActions &actions,
65 QQmlProperties &modified,
67 QObject *defaultTarget = nullptr) override;
68
70 void modulusChanged();
71 void massChanged();
72 void syncChanged();
73};
74
76
77#endif // QQUICKSPRINGANIMATION_H
\inmodule QtCore
Definition qobject.h:103
The QQmlPropertyValueSource class is an interface for property value sources such as animations and b...
direction
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static const qreal epsilon
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INTERFACES(x)
#define Q_SIGNALS
double qreal
Definition qtypes.h:187