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
qquicksmoothedanimation_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 QQUICKSMOOTHEDANIMATION_H
6#define QQUICKSMOOTHEDANIMATION_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
26class QQmlProperty;
28class Q_QUICK_EXPORT QQuickSmoothedAnimation : public QQuickNumberAnimation
29{
30 Q_OBJECT
31 Q_DECLARE_PRIVATE(QQuickSmoothedAnimation)
32
33 Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged)
34 Q_PROPERTY(ReversingMode reversingMode READ reversingMode WRITE setReversingMode NOTIFY reversingModeChanged)
35 Q_PROPERTY(qreal maximumEasingTime READ maximumEasingTime WRITE setMaximumEasingTime NOTIFY maximumEasingTimeChanged)
36 QML_NAMED_ELEMENT(SmoothedAnimation)
37 QML_ADDED_IN_VERSION(2, 0)
38
39public:
40 enum ReversingMode { Eased, Immediate, Sync };
41 Q_ENUM(ReversingMode)
42
43 QQuickSmoothedAnimation(QObject *parent = nullptr);
44
45 ReversingMode reversingMode() const;
46 void setReversingMode(ReversingMode);
47
48 int duration() const override;
49 void setDuration(int) override;
50
51 qreal velocity() const;
52 void setVelocity(qreal);
53
54 int maximumEasingTime() const;
55 void setMaximumEasingTime(int);
56
57 QAbstractAnimationJob* transition(QQuickStateActions &actions,
58 QQmlProperties &modified,
59 TransitionDirection direction,
60 QObject *defaultTarget = nullptr) override;
61Q_SIGNALS:
62 void velocityChanged();
63 void reversingModeChanged();
64 void maximumEasingTimeChanged();
65};
66
67QT_END_NAMESPACE
68
69#endif // QQUICKSMOOTHEDANIMATION_H
QObject * parent
Definition qobject.h:73
#define DELAY_STOP_TIMER_INTERVAL