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
qquickanimationcontroller_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 QQUICKANIMATIONCONTROLLER_H
6#define QQUICKANIMATIONCONTROLLER_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>
20#include <private/qqmlfinalizer_p.h>
22
24
26class Q_QUICK_EXPORT QQuickAnimationController : public QObject, public QQmlFinalizerHook
27{
28 Q_OBJECT
29 Q_DISABLE_COPY_MOVE(QQuickAnimationController)
30 Q_INTERFACES(QQmlFinalizerHook)
31
32 Q_DECLARE_PRIVATE(QQuickAnimationController)
33 Q_CLASSINFO("DefaultProperty", "animation")
34 QML_NAMED_ELEMENT(AnimationController)
35 QML_ADDED_IN_VERSION(2, 0)
36
37 Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
38 Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation NOTIFY animationChanged)
39
40public:
41 QQuickAnimationController(QObject *parent=nullptr);
42 ~QQuickAnimationController();
43
44 qreal progress() const;
45 void setProgress(qreal progress);
46
47 QQuickAbstractAnimation *animation() const;
48 void setAnimation(QQuickAbstractAnimation *animation);
49
50 void componentFinalized() override;
51Q_SIGNALS:
52 void progressChanged();
53 void animationChanged();
54public Q_SLOTS:
55 void reload();
56 void completeToBeginning();
57 void completeToEnd();
58private Q_SLOTS:
59 void updateProgress();
60};
61
62QT_END_NAMESPACE
63
64#endif // QQUICKANIMATIONCONTROLLER_H
void animationCurrentTimeChanged(QAbstractAnimationJob *job, int currentTime) override