OpenCoverage

qquickanimation_p_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickanimation_p_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11class QAbstractAnimationAction-
12{-
13public:-
14 virtual ~QAbstractAnimationAction() {}-
15 virtual void doAction() = 0;-
16 virtual void debugAction(QDebug, int) const {}-
17};-
18-
19-
20-
21-
22template<class T, void (T::*method)(), void (T::*debugMethod)(QDebug, int) const>-
23class QAnimationActionProxy : public QAbstractAnimationAction-
24{-
25public:-
26 QAnimationActionProxy(T *instance) : m_instance(instance) {}
executed 21638 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_scenegraph
21638
27 void doAction() override { (m_instance->*method)(); }
executed 18056 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_scenegraph
18056
28 void debugAction(QDebug d, int indentLevel) const override { (m_instance->*debugMethod)(d, indentLevel); }
never executed: end of block
0
29private:-
30 T *m_instance;-
31};-
32-
33-
34class __attribute__((visibility("default"))) QActionAnimation : public QAbstractAnimationJob-
35{-
36 QActionAnimation(const QActionAnimation &) = delete; QActionAnimation &operator=(const QActionAnimation &) = delete;-
37public:-
38 QActionAnimation();-
39-
40 QActionAnimation(QAbstractAnimationAction *action);-
41 ~QActionAnimation() override;-
42-
43 int duration() const override;-
44 void setAnimAction(QAbstractAnimationAction *action);-
45-
46protected:-
47 void updateCurrentTime(int) override;-
48 void updateState(State newState, State oldState) override;-
49 void debugAnimation(QDebug d) const override;-
50-
51private:-
52 QAbstractAnimationAction *animAction;-
53};-
54-
55class QQuickBulkValueUpdater-
56{-
57public:-
58 virtual ~QQuickBulkValueUpdater() {}-
59 virtual void setValue(qreal value) = 0;-
60 virtual void debugUpdater(QDebug, int) const {}-
61};-
62-
63-
64class __attribute__((visibility("default"))) QQuickBulkValueAnimator : public QAbstractAnimationJob-
65{-
66 QQuickBulkValueAnimator(const QQuickBulkValueAnimator &) = delete; QQuickBulkValueAnimator &operator=(const QQuickBulkValueAnimator &) = delete;-
67public:-
68 QQuickBulkValueAnimator();-
69 ~QQuickBulkValueAnimator() override;-
70-
71 void setAnimValue(QQuickBulkValueUpdater *value);-
72 QQuickBulkValueUpdater *getAnimValue() const { return
executed 12 times by 2 tests: return animValue;
Executed by:
  • tst_examples
  • tst_qquickanimations
animValue;
executed 12 times by 2 tests: return animValue;
Executed by:
  • tst_examples
  • tst_qquickanimations
}
12
73-
74 void setFromSourcedValue(bool *value) { fromSourced = value; }
executed 34524 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickwindow
  • tst_scenegraph
34524
75-
76 int duration() const override { return
executed 1162518 times by 13 tests: return m_duration;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickwindow
  • tst_scenegraph
m_duration;
executed 1162518 times by 13 tests: return m_duration;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickwindow
  • tst_scenegraph
}
1162518
77 void setDuration(int msecs) { m_duration = msecs; }
executed 34538 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickwindow
  • tst_scenegraph
34538
78-
79 QEasingCurve easingCurve() const { return
executed 2 times by 1 test: return easing;
Executed by:
  • tst_qquickanimations
easing;
executed 2 times by 1 test: return easing;
Executed by:
  • tst_qquickanimations
}
2
80 void setEasingCurve(const QEasingCurve &curve) { easing = curve; }
executed 34538 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickwindow
  • tst_scenegraph
34538
81-
82protected:-
83 void updateCurrentTime(int currentTime) override;-
84 void topLevelAnimationLoopChanged() override;-
85 void debugAnimation(QDebug d) const override;-
86-
87private:-
88 QQuickBulkValueUpdater *animValue;-
89 bool *fromSourced;-
90 int m_duration;-
91 QEasingCurve easing;-
92};-
93-
94-
95template<class T, void (T::*method)(int)>-
96class QTickAnimationProxy : public QAbstractAnimationJob-
97{-
98 QTickAnimationProxy(const QTickAnimationProxy &) = delete; QTickAnimationProxy &operator=(const QTickAnimationProxy &) = delete;-
99public:-
100 QTickAnimationProxy(T *instance) : QAbstractAnimationJob(), m_instance(instance) {}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickitemparticle
8
101 int duration() const override { return
executed 226 times by 2 tests: return -1;
Executed by:
  • tst_examples
  • tst_qquickitemparticle
-1;
executed 226 times by 2 tests: return -1;
Executed by:
  • tst_examples
  • tst_qquickitemparticle
}
226
102protected:-
103 void updateCurrentTime(int msec) override { (m_instance->*method)(msec); }
executed 226 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickitemparticle
226
104-
105private:-
106 T *m_instance;-
107};-
108-
109class __attribute__((visibility("default"))) QQuickAbstractAnimationPrivate : public QObjectPrivate, public QAnimationJobChangeListener-
110{-
111 inline QQuickAbstractAnimation* q_func() { return static_cast<QQuickAbstractAnimation *>(q_ptr); } inline const QQuickAbstractAnimation* q_func() const { return static_cast<const QQuickAbstractAnimation *>(q_ptr); } friend class QQuickAbstractAnimation;-
112public:-
113 QQuickAbstractAnimationPrivate()-
114 : running(false), paused(false), alwaysRunToEnd(false),-
115 componentComplete(true),-
116 avoidPropertyValueSourceStart(false), disableUserControl(false),-
117 registered(false), loopCount(1), group(nullptr), animationInstance(nullptr) {}
executed 27504 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlenginedebugservice
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qquickwindow
  • tst_scenegraph
27504
118-
119 bool running:1;-
120 bool paused:1;-
121 bool alwaysRunToEnd:1;-
122-
123 bool componentComplete:1;-
124 bool avoidPropertyValueSourceStart:1;-
125 bool disableUserControl:1;-
126 bool registered:1;-
127-
128 int loopCount;-
129-
130 void commence();-
131 void animationFinished(QAbstractAnimationJob *) override;-
132-
133 QQmlProperty defaultProperty;-
134-
135 QQuickAnimationGroup *group;-
136 QAbstractAnimationJob* animationInstance;-
137-
138 static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = nullptr);-
139};-
140-
141class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate-
142{-
143 inline QQuickPauseAnimation* q_func() { return static_cast<QQuickPauseAnimation *>(q_ptr); } inline const QQuickPauseAnimation* q_func() const { return static_cast<const QQuickPauseAnimation *>(q_ptr); } friend class QQuickPauseAnimation;-
144public:-
145 QQuickPauseAnimationPrivate()-
146 : QQuickAbstractAnimationPrivate(), duration(250) {}
executed 4290 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquickwindow
4290
147-
148 int duration;-
149};-
150-
151class QQuickScriptActionPrivate : public QQuickAbstractAnimationPrivate-
152{-
153 inline QQuickScriptAction* q_func() { return static_cast<QQuickScriptAction *>(q_ptr); } inline const QQuickScriptAction* q_func() const { return static_cast<const QQuickScriptAction *>(q_ptr); } friend class QQuickScriptAction;-
154public:-
155 QQuickScriptActionPrivate();-
156-
157 QQmlScriptString script;-
158 QString name;-
159 QQmlScriptString runScriptScript;-
160 bool hasRunScriptScript;-
161 bool reversing;-
162-
163 void execute();-
164 QAbstractAnimationAction* createAction();-
165 void debugAction(QDebug d, int indentLevel) const;-
166 typedef QAnimationActionProxy<QQuickScriptActionPrivate,-
167 &QQuickScriptActionPrivate::execute,-
168 &QQuickScriptActionPrivate::debugAction> Proxy;-
169};-
170-
171class QQuickPropertyActionPrivate : public QQuickAbstractAnimationPrivate-
172{-
173 inline QQuickPropertyAction* q_func() { return static_cast<QQuickPropertyAction *>(q_ptr); } inline const QQuickPropertyAction* q_func() const { return static_cast<const QQuickPropertyAction *>(q_ptr); } friend class QQuickPropertyAction;-
174public:-
175 QQuickPropertyActionPrivate()-
176 : QQuickAbstractAnimationPrivate(), target(nullptr) {}
executed 3598 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquicktaphandler
  • tst_qquickwindow
  • tst_scenegraph
3598
177-
178 QObject *target;-
179 QString propertyName;-
180 QString properties;-
181 QList<QObject *> targets;-
182 QList<QObject *> exclude;-
183-
184 QQmlNullableValue<QVariant> value;-
185};-
186-
187class QQuickAnimationGroupPrivate : public QQuickAbstractAnimationPrivate-
188{-
189 inline QQuickAnimationGroup* q_func() { return static_cast<QQuickAnimationGroup *>(q_ptr); } inline const QQuickAnimationGroup* q_func() const { return static_cast<const QQuickAnimationGroup *>(q_ptr); } friend class QQuickAnimationGroup;-
190public:-
191 QQuickAnimationGroupPrivate()-
192 : QQuickAbstractAnimationPrivate() {}
executed 5156 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicktaphandler
  • tst_qquickwindow
  • tst_scenegraph
5156
193-
194 static void append_animation(QQmlListProperty<QQuickAbstractAnimation> *list, QQuickAbstractAnimation *role);-
195 static void clear_animation(QQmlListProperty<QQuickAbstractAnimation> *list);-
196 QList<QQuickAbstractAnimation *> animations;-
197};-
198-
199class QQuickPropertyAnimationPrivate : public QQuickAbstractAnimationPrivate-
200{-
201 inline QQuickPropertyAnimation* q_func() { return static_cast<QQuickPropertyAnimation *>(q_ptr); } inline const QQuickPropertyAnimation* q_func() const { return static_cast<const QQuickPropertyAnimation *>(q_ptr); } friend class QQuickPropertyAnimation;-
202public:-
203 QQuickPropertyAnimationPrivate()-
204 : QQuickAbstractAnimationPrivate(), target(nullptr), fromSourced(false), fromIsDefined(false), toIsDefined(false),-
205 defaultToInterpolatorType(0), interpolatorType(0), interpolator(nullptr), duration(250), actions(nullptr) {}
executed 10358 times by 16 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquickwindow
  • tst_scenegraph
10358
206-
207 QVariant from;-
208 QVariant to;-
209-
210 QObject *target;-
211 QString propertyName;-
212 QString properties;-
213 QList<QObject *> targets;-
214 QList<QObject *> exclude;-
215 QString defaultProperties;-
216-
217 bool fromSourced;-
218 bool fromIsDefined:1;-
219 bool toIsDefined:1;-
220 bool defaultToInterpolatorType:1;-
221 int interpolatorType;-
222 QVariantAnimation::Interpolator interpolator;-
223 int duration;-
224 QEasingCurve easing;-
225-
226-
227 QQuickStateActions *actions;-
228-
229 static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);-
230 static void convertVariant(QVariant &variant, int type);-
231};-
232-
233class QQuickRotationAnimationPrivate : public QQuickPropertyAnimationPrivate-
234{-
235 inline QQuickRotationAnimation* q_func() { return static_cast<QQuickRotationAnimation *>(q_ptr); } inline const QQuickRotationAnimation* q_func() const { return static_cast<const QQuickRotationAnimation *>(q_ptr); } friend class QQuickRotationAnimation;-
236public:-
237 QQuickRotationAnimationPrivate() : direction(QQuickRotationAnimation::Numerical) {}
executed 14 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickbehaviors
14
238-
239 QQuickRotationAnimation::RotationDirection direction;-
240};-
241-
242class __attribute__((visibility("default"))) QQuickAnimationPropertyUpdater : public QQuickBulkValueUpdater-
243{-
244public:-
245 QQuickAnimationPropertyUpdater() : interpolatorType(0), interpolator(nullptr), prevInterpolatorType(0), reverse(false), fromSourced(false), fromDefined(false), wasDeleted(nullptr) {}
executed 34502 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpositioners
  • tst_qquickwindow
  • tst_scenegraph
34502
246 ~QQuickAnimationPropertyUpdater() override;-
247-
248 void setValue(qreal v) override;-
249-
250 void debugUpdater(QDebug d, int indentLevel) const override;-
251-
252 QQuickStateActions actions;-
253 int interpolatorType;-
254 QVariantAnimation::Interpolator interpolator;-
255 int prevInterpolatorType;-
256 bool reverse;-
257 bool fromSourced;-
258 bool fromDefined;-
259 bool *wasDeleted;-
260};-
261-
262-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0