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
qsvganimator_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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
6#ifndef QSVGANIMATOR_P_H
7#define QSVGANIMATOR_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtSvg/private/qtsvgglobal_p.h>
21#include <QtSvg/private/qsvgnode_p.h>
23
25
26class Q_SVG_EXPORT QSvgAbstractAnimator
27{
28public:
29 QSvgAbstractAnimator();
30 virtual ~QSvgAbstractAnimator();
31
32 void appendAnimation(const QSvgNode *node, QSvgAbstractAnimation *anim);
33 QList<QSvgAbstractAnimation *> animationsForNode(const QSvgNode *node) const;
34
35 void advanceAnimations();
36 virtual void restartAnimation() = 0;
37 virtual qint64 currentElapsed() = 0;
38 virtual void setAnimatorTime(qint64 time) = 0;
39
40 void setAnimationDuration(qint64 dur);
41 qint64 animationDuration() const;
42
43protected:
44 qint64 m_time;
45 qint64 m_animationDuration;
46
47private:
48 QList<QSvgAbstractAnimation *> combinedAnimationsForNode(const QSvgNode *node) const;
49
50private:
51 QHash<const QSvgNode *, QList<QSvgAbstractAnimation *>> m_animationsSMIL;
52 QHash<const QSvgNode *, QList<QSvgAbstractAnimation *>> m_animationsCSS;
53};
54
55class Q_SVG_EXPORT QSvgAnimator : public QSvgAbstractAnimator
56{
57public:
58 QSvgAnimator();
59 ~QSvgAnimator();
60
61 virtual void restartAnimation() override;
62 virtual qint64 currentElapsed() override;
63 virtual void setAnimatorTime(qint64 time) override;
64};
65
66class Q_SVG_EXPORT QSvgAnimationController : public QSvgAbstractAnimator
67{
68public:
69 QSvgAnimationController();
70 ~QSvgAnimationController();
71
72 virtual void restartAnimation() override;
73 virtual qint64 currentElapsed() override;
74 virtual void setAnimatorTime(qint64 time) override;
75};
76
77
78QT_END_NAMESPACE
79
80#endif // QSVGANIMATOR_P_H
Combined button and popup list for selecting options.