Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qsvganimatedproperty_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
QSVGANIMATEDPROPERTY_P_H
7
#
define
QSVGANIMATEDPROPERTY_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
/
qsvgeasinginterface_p
.
h
>
22
#
include
<
QtCore
/
qlist
.
h
>
23
#
include
<
QtCore
/
qvariant
.
h
>
24
#
include
<
QtCore
/
qvarlengtharray
.
h
>
25
#
include
<
QtCore
/
qstring
.
h
>
26
#
include
<
QtCore
/
qpoint
.
h
>
27
#
include
<
QtGui
/
qcolor
.
h
>
28
29
QT_BEGIN_NAMESPACE
30
31
class
Q_SVG_EXPORT
QSvgAbstractAnimatedProperty
32
{
33
Q_DISABLE_COPY_MOVE(QSvgAbstractAnimatedProperty)
34
public
:
35
enum
Type
36
{
37
Int,
38
Float,
39
Color,
40
Transform,
41
};
42
43
QSvgAbstractAnimatedProperty
(
const
QString &name, Type type);
44
virtual
~QSvgAbstractAnimatedProperty();
45
46
void
setKeyFrames
(
const
QList<qreal> &keyFrames);
47
void
appendKeyFrame
(qreal keyFrame);
48
QList
<
qreal
>
keyFrames
()
const
;
49
50
void
appendEasing
(QSvgEasingInterfacePtr easing);
51
const
QSvgEasingInterface
*
easingAt
(
unsigned
int
i)
const
;
52
void
setPropertyName
(
const
QString &name);
53
QStringView
propertyName
()
const
;
54
Type
type
()
const
;
55
QVariant
interpolatedValue
()
const
;
56
virtual
void
interpolate
(uint index, qreal t)
const
= 0;
57
58
static
QSvgAbstractAnimatedProperty
*
createAnimatedProperty
(
const
QString &name);
59
protected
:
60
QList<qreal> m_keyFrames;
61
std
::
vector
<
QSvgEasingInterfacePtr
>
m_easings
;
62
mutable
QVariant
m_interpolatedValue
;
63
64
private
:
65
QString m_propertyName;
66
Type m_type;
67
};
68
69
class
Q_SVG_EXPORT
QSvgAnimatedPropertyColor
:
public
QSvgAbstractAnimatedProperty
70
{
71
public
:
72
QSvgAnimatedPropertyColor(
const
QString &name);
73
~QSvgAnimatedPropertyColor() override;
74
75
void
setColors(
const
QList<QColor> &colors);
76
void
appendColor(
const
QColor &color);
77
QList<QColor> colors()
const
;
78
79
void
interpolate(uint index, qreal t)
const
override;
80
81
private
:
82
QList<QColor> m_colors;
83
};
84
85
class
Q_SVG_EXPORT
QSvgAnimatedPropertyFloat
:
public
QSvgAbstractAnimatedProperty
86
{
87
public
:
88
QSvgAnimatedPropertyFloat(
const
QString &name);
89
~QSvgAnimatedPropertyFloat() override;
90
91
void
setValues(
const
QList<qreal> &values);
92
void
appendValue(
const
qreal value);
93
QList<qreal> values()
const
;
94
95
void
interpolate(uint index, qreal t)
const
override;
96
97
private
:
98
QList<qreal> m_values;
99
};
100
101
class
Q_SVG_EXPORT
QSvgAnimatedPropertyTransform
:
public
QSvgAbstractAnimatedProperty
102
{
103
public
:
104
struct
TransformComponent {
105
enum
Type {
106
Translate,
107
Scale,
108
Rotate,
109
Skew,
110
Matrix
111
};
112
Type type;
113
QVarLengthArray<qreal, 16> values;
114
};
115
116
public
:
117
QSvgAnimatedPropertyTransform(
const
QString &name);
118
~QSvgAnimatedPropertyTransform() override;
119
120
void
setTransformCount(quint32 count);
121
quint32 transformCount()
const
;
122
void
appendComponents(
const
QList<TransformComponent> &components);
123
QList<TransformComponent> components()
const
;
124
125
void
interpolate(uint index, qreal t)
const
override;
126
127
private
:
128
QList<TransformComponent> m_components;
129
quint32 m_transformCount{0};
130
};
131
132
QT_END_NAMESPACE
133
134
#
endif
// QSVGANIMATEDPROPERTY_P_H
QPaintEngine::type
virtual Type type() const =0
Reimplement this function to return the paint engine \l{Type}.
QPainter::isActive
bool isActive() const
Returns true if begin() has been called and end() has not yet been called; otherwise returns false.
Definition
qpainter.cpp:1529
QPrinterPrivate::m_properties
QSet< QPrintEngine::PrintEnginePropertyKey > m_properties
Definition
qprinter_p.h:100
QSvgAbstractAnimatedProperty
Definition
qsvganimatedproperty_p.h:32
QSvgAbstractAnimatedProperty::appendKeyFrame
void appendKeyFrame(qreal keyFrame)
Definition
qsvganimatedproperty.cpp:83
QSvgAbstractAnimatedProperty::QSvgAbstractAnimatedProperty
QSvgAbstractAnimatedProperty(const QString &name, Type type)
Definition
qsvganimatedproperty.cpp:68
QSvgAbstractAnimatedProperty::m_easings
std::vector< QSvgEasingInterfacePtr > m_easings
Definition
qsvganimatedproperty_p.h:61
QSvgAbstractAnimatedProperty::m_interpolatedValue
QVariant m_interpolatedValue
Definition
qsvganimatedproperty_p.h:62
QSvgAbstractAnimatedProperty::interpolatedValue
QVariant interpolatedValue() const
Definition
qsvganimatedproperty.cpp:118
QSvgAbstractAnimatedProperty::keyFrames
QList< qreal > keyFrames() const
Definition
qsvganimatedproperty.cpp:88
QSvgAbstractAnimatedProperty::appendEasing
void appendEasing(QSvgEasingInterfacePtr easing)
Definition
qsvganimatedproperty.cpp:93
QSvgAbstractAnimatedProperty::createAnimatedProperty
static QSvgAbstractAnimatedProperty * createAnimatedProperty(const QString &name)
Definition
qsvganimatedproperty.cpp:123
QSvgAbstractAnimatedProperty::setKeyFrames
void setKeyFrames(const QList< qreal > &keyFrames)
Definition
qsvganimatedproperty.cpp:78
QSvgAbstractAnimatedProperty::setPropertyName
void setPropertyName(const QString &name)
Definition
qsvganimatedproperty.cpp:103
QSvgAbstractAnimatedProperty::propertyName
QStringView propertyName() const
Definition
qsvganimatedproperty.cpp:108
QSvgAbstractAnimatedProperty::easingAt
const QSvgEasingInterface * easingAt(unsigned int i) const
Definition
qsvganimatedproperty.cpp:98
QSvgAbstractAnimatedProperty::interpolate
virtual void interpolate(uint index, qreal t) const =0
QSvgAbstractAnimation
Definition
qsvgabstractanimation_p.h:28
QSvgAbstractAnimation::properties
QList< QSvgAbstractAnimatedProperty * > properties() const
Definition
qsvgabstractanimation.cpp:21
QSvgAbstractAnimation::duration
int duration() const
Definition
qsvgabstractanimation.cpp:83
QSvgAbstractAnimation::easing
QSvgEasingInterface * easing() const
Definition
qsvgabstractanimation.cpp:103
QSvgAbstractAnimation::setIterationCount
void setIterationCount(int count)
Definition
qsvgabstractanimation.cpp:88
QSvgAbstractAnimation::m_finished
bool m_finished
Definition
qsvgabstractanimation_p.h:62
QSvgAbstractAnimation::finished
bool finished() const
Definition
qsvgabstractanimation.cpp:26
QSvgAbstractAnimation::m_iterationCount
int m_iterationCount
Definition
qsvgabstractanimation_p.h:63
QSvgAbstractAnimation::QSvgAbstractAnimation
QSvgAbstractAnimation()=default
QSvgAbstractAnimation::m_duration
int m_duration
Definition
qsvgabstractanimation_p.h:61
QSvgAbstractAnimation::m_easing
QSvgEasingInterfacePtr m_easing
Definition
qsvgabstractanimation_p.h:64
QSvgAbstractAnimation::setRunningTime
void setRunningTime(int startMs, int durationMs)
Definition
qsvgabstractanimation.cpp:72
QSvgAbstractAnimation::iterationCount
int iterationCount() const
Definition
qsvgabstractanimation.cpp:93
QSvgAbstractAnimation::setEasing
void setEasing(QSvgEasingInterfacePtr easing)
Definition
qsvgabstractanimation.cpp:98
QSvgAbstractAnimation::start
int start() const
Definition
qsvgabstractanimation.cpp:78
QSvgAbstractAnimation::animationType
virtual AnimationType animationType() const =0
QSvgAbstractAnimation::appendProperty
virtual void appendProperty(QSvgAbstractAnimatedProperty *property)
Definition
qsvgabstractanimation.cpp:16
QSvgAbstractAnimation::evaluateAnimation
void evaluateAnimation(qreal elapsedTime)
Definition
qsvgabstractanimation.cpp:36
QSvgAnimatedPropertyColor
Definition
qsvganimatedproperty_p.h:70
QSvgAnimatedPropertyFloat
Definition
qsvganimatedproperty_p.h:86
QSvgAnimatedPropertyTransform
Definition
qsvganimatedproperty_p.h:102
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtsvg
src
svg
animation
qsvganimatedproperty_p.h
Generated on
for Qt by
1.18.0