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
qquickframeanimation_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QQUICKFRAMEANIMATION_H
5#define QQUICKFRAMEANIMATION_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 <QtCore/qobject.h>
20#include <private/qtqmlglobal_p.h>
21#include <private/qtquickglobal_p.h>
22
24
26class Q_QUICK_EXPORT QQuickFrameAnimation : public QObject, public QQmlParserStatus
27{
29 Q_DECLARE_PRIVATE(QQuickFrameAnimation)
31 Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
32 Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
33 Q_PROPERTY(int currentFrame READ currentFrame NOTIFY currentFrameChanged)
34 Q_PROPERTY(qreal frameTime READ frameTime NOTIFY frameTimeChanged)
35 Q_PROPERTY(qreal smoothFrameTime READ smoothFrameTime NOTIFY smoothFrameTimeChanged)
36 Q_PROPERTY(qreal elapsedTime READ elapsedTime NOTIFY elapsedTimeChanged)
37 QML_NAMED_ELEMENT(FrameAnimation)
39
40public:
41 QQuickFrameAnimation(QObject *parent = nullptr);
42
43 bool isRunning() const;
44 void setRunning(bool running);
45
46 bool isPaused() const;
47 void setPaused(bool paused);
48
49 int currentFrame() const;
50 qreal frameTime() const;
51 qreal smoothFrameTime() const;
52 qreal elapsedTime() const;
53
54protected:
55 void classBegin() override;
56 void componentComplete() override;
57
58public Q_SLOTS:
59 void start();
60 void stop();
61 void restart();
62 void pause();
63 void resume();
64 void reset();
65
67 void triggered();
68 void runningChanged();
69 void pausedChanged();
70 void currentFrameChanged();
71 void frameTimeChanged();
72 void smoothFrameTimeChanged();
73 void elapsedTimeChanged();
74
76 void setCurrentFrame(int frame);
77 void setElapsedTime(qreal elapsedTime);
78
79};
80
82
83#endif
\inmodule QtCore
Definition qobject.h:103
The QQmlParserStatus class provides updates on the QML parser state.
Combined button and popup list for selecting options.
static Q_CONSTINIT QBasicAtomicInt running
GLuint start
GLboolean reset
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static bool isRunning()
Definition main.cpp:452
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INTERFACES(x)
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
future resume()
QFrame frame
[0]