Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickanimatorjob_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | - | |
5 | - | |
6 | class QQuickAnimator; | - |
7 | class QQuickWindow; | - |
8 | class QQuickItem; | - |
9 | class QQuickAbstractAnimation; | - |
10 | - | |
11 | class QQuickAnimatorController; | - |
12 | class QQuickAnimatorProxyJobPrivate; | - |
13 | class QQuickOpenGLShaderEffectNode; | - |
14 | - | |
15 | class QSGOpacityNode; | - |
16 | - | |
17 | class __attribute__((visibility("default"))) QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob | - |
18 | { | - |
19 | public: | - |
20 | #pragma GCC diagnostic push | - |
21 | - | |
22 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
23 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - |
24 | #pragma GCC diagnostic ignored "-Wattributes" | - |
25 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
26 | #pragma GCC diagnostic pop | - |
27 | struct QPrivateSignal {}; | - |
28 | - | |
29 | public: | - |
30 | QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QObject *item); | - |
31 | ~QQuickAnimatorProxyJob(); | - |
32 | - | |
33 | int duration() const override { return executed 705 times by 2 tests: m_duration;return m_duration; Executed by:
executed 705 times by 2 tests: }return m_duration; Executed by:
| 705 |
34 | - | |
35 | const QSharedPointer<QAbstractAnimationJob> &job() const { return executed 2 times by 1 test: m_job;return m_job; Executed by:
executed 2 times by 1 test: }return m_job; Executed by:
| 2 |
36 | - | |
37 | protected: | - |
38 | void updateCurrentTime(int) override; | - |
39 | void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override; | - |
40 | void debugAnimation(QDebug d) const override; | - |
41 | - | |
42 | public : | - |
43 | void windowChanged(QQuickWindow *window); | - |
44 | void sceneGraphInitialized(); | - |
45 | - | |
46 | private: | - |
47 | void syncBackCurrentValues(); | - |
48 | void readyToAnimate(); | - |
49 | void setWindow(QQuickWindow *window); | - |
50 | static QObject *findAnimationContext(QQuickAbstractAnimation *); | - |
51 | - | |
52 | QPointer<QQuickAnimatorController> m_controller; | - |
53 | QQuickAbstractAnimation *m_animation; | - |
54 | QSharedPointer<QAbstractAnimationJob> m_job; | - |
55 | int m_duration; | - |
56 | - | |
57 | enum InternalState { | - |
58 | State_Starting, | - |
59 | State_Running, | - |
60 | State_Paused, | - |
61 | State_Stopped | - |
62 | }; | - |
63 | - | |
64 | InternalState m_internalState; | - |
65 | }; | - |
66 | - | |
67 | class __attribute__((visibility("default"))) QQuickAnimatorJob : public QAbstractAnimationJob | - |
68 | { | - |
69 | public: | - |
70 | virtual void setTarget(QQuickItem *target); | - |
71 | QQuickItem *target() const { return executed 72 times by 2 tests: m_target;return m_target; Executed by:
executed 72 times by 2 tests: }return m_target; Executed by:
| 72 |
72 | - | |
73 | void setFrom(qreal from) { m_from = from; } executed 36 times by 2 tests: end of block Executed by:
| 36 |
74 | qreal from() const { return never executed: m_from;return m_from; never executed: }return m_from; | 0 |
75 | - | |
76 | void setTo(qreal to) { m_to = to; } executed 36 times by 2 tests: end of block Executed by:
| 36 |
77 | qreal to() const { return never executed: m_to;return m_to; never executed: }return m_to; | 0 |
78 | - | |
79 | void setDuration(int duration) { m_duration = duration; } executed 36 times by 2 tests: end of block Executed by:
| 36 |
80 | int duration() const override { return executed 730 times by 2 tests: m_duration;return m_duration; Executed by:
executed 730 times by 2 tests: }return m_duration; Executed by:
| 730 |
81 | - | |
82 | QEasingCurve easingCurve() const { return never executed: m_easing;return m_easing; never executed: }return m_easing; | 0 |
83 | void setEasingCurve(const QEasingCurve &curve) { m_easing = curve; } executed 36 times by 2 tests: end of block Executed by:
| 36 |
84 | - | |
85 | - | |
86 | - | |
87 | virtual void initialize(QQuickAnimatorController *controller); | - |
88 | - | |
89 | - | |
90 | virtual void invalidate() = 0; | - |
91 | - | |
92 | - | |
93 | - | |
94 | - | |
95 | virtual void writeBack() = 0; | - |
96 | - | |
97 | - | |
98 | - | |
99 | virtual void preSync() { } | - |
100 | - | |
101 | - | |
102 | - | |
103 | virtual void postSync() { } | - |
104 | - | |
105 | - | |
106 | - | |
107 | - | |
108 | virtual void commit() { } | - |
109 | - | |
110 | bool isTransform() const { return never executed: m_isTransform;return m_isTransform; never executed: }return m_isTransform; | 0 |
111 | bool isUniform() const { return never executed: m_isUniform;return m_isUniform; never executed: }return m_isUniform; | 0 |
112 | - | |
113 | qreal value() const; | - |
114 | - | |
115 | QQuickAnimatorController *controller() const { return never executed: m_controller;return m_controller; never executed: }return m_controller; | 0 |
116 | - | |
117 | protected: | - |
118 | QQuickAnimatorJob(); | - |
119 | void debugAnimation(QDebug d) const override; | - |
120 | - | |
121 | qreal progress(int time) const; | - |
122 | - | |
123 | QPointer<QQuickItem> m_target; | - |
124 | QQuickAnimatorController *m_controller; | - |
125 | - | |
126 | qreal m_from; | - |
127 | qreal m_to; | - |
128 | qreal m_value; | - |
129 | - | |
130 | QEasingCurve m_easing; | - |
131 | - | |
132 | int m_duration; | - |
133 | - | |
134 | uint m_isTransform : 1; | - |
135 | uint m_isUniform : 1; | - |
136 | }; | - |
137 | - | |
138 | class QQuickTransformAnimatorJob : public QQuickAnimatorJob | - |
139 | { | - |
140 | public: | - |
141 | - | |
142 | struct Helper | - |
143 | { | - |
144 | Helper() | - |
145 | : ref(1) | - |
146 | , node(nullptr) | - |
147 | , ox(0) | - |
148 | , oy(0) | - |
149 | , dx(0) | - |
150 | , dy(0) | - |
151 | , scale(1) | - |
152 | , rotation(0) | - |
153 | , wasSynced(false) | - |
154 | , wasChanged(false) | - |
155 | { | - |
156 | } executed 22 times by 1 test: end of block Executed by:
| 22 |
157 | - | |
158 | void sync(); | - |
159 | void commit(); | - |
160 | - | |
161 | int ref; | - |
162 | QQuickItem *item; | - |
163 | QSGTransformNode *node; | - |
164 | - | |
165 | - | |
166 | float ox; | - |
167 | float oy; | - |
168 | - | |
169 | float dx; | - |
170 | float dy; | - |
171 | float scale; | - |
172 | float rotation; | - |
173 | - | |
174 | uint wasSynced : 1; | - |
175 | uint wasChanged : 1; | - |
176 | }; | - |
177 | - | |
178 | ~QQuickTransformAnimatorJob(); | - |
179 | - | |
180 | void commit() override; | - |
181 | void preSync() override; | - |
182 | - | |
183 | void setTarget(QQuickItem *item) override; | - |
184 | - | |
185 | protected: | - |
186 | QQuickTransformAnimatorJob(); | - |
187 | void invalidate() override; | - |
188 | - | |
189 | Helper *m_helper; | - |
190 | }; | - |
191 | - | |
192 | class __attribute__((visibility("default"))) QQuickScaleAnimatorJob : public QQuickTransformAnimatorJob | - |
193 | { | - |
194 | public: | - |
195 | void updateCurrentTime(int time) override; | - |
196 | void writeBack() override; | - |
197 | }; | - |
198 | - | |
199 | class __attribute__((visibility("default"))) QQuickXAnimatorJob : public QQuickTransformAnimatorJob | - |
200 | { | - |
201 | public: | - |
202 | void updateCurrentTime(int time) override; | - |
203 | void writeBack() override; | - |
204 | }; | - |
205 | - | |
206 | class __attribute__((visibility("default"))) QQuickYAnimatorJob : public QQuickTransformAnimatorJob | - |
207 | { | - |
208 | public: | - |
209 | void updateCurrentTime(int time) override; | - |
210 | void writeBack() override; | - |
211 | }; | - |
212 | - | |
213 | class __attribute__((visibility("default"))) QQuickRotationAnimatorJob : public QQuickTransformAnimatorJob | - |
214 | { | - |
215 | public: | - |
216 | QQuickRotationAnimatorJob(); | - |
217 | - | |
218 | void updateCurrentTime(int time) override; | - |
219 | void writeBack() override; | - |
220 | - | |
221 | void setDirection(QQuickRotationAnimator::RotationDirection direction) { m_direction = direction; } executed 4 times by 1 test: end of block Executed by:
| 4 |
222 | QQuickRotationAnimator::RotationDirection direction() const { return never executed: m_direction;return m_direction; never executed: }return m_direction; | 0 |
223 | - | |
224 | private: | - |
225 | QQuickRotationAnimator::RotationDirection m_direction; | - |
226 | }; | - |
227 | - | |
228 | class __attribute__((visibility("default"))) QQuickOpacityAnimatorJob : public QQuickAnimatorJob | - |
229 | { | - |
230 | public: | - |
231 | QQuickOpacityAnimatorJob(); | - |
232 | - | |
233 | void invalidate() override; | - |
234 | void updateCurrentTime(int time) override; | - |
235 | void writeBack() override; | - |
236 | void postSync() override; | - |
237 | - | |
238 | private: | - |
239 | QSGOpacityNode *m_opacityNode; | - |
240 | }; | - |
241 | - | |
242 | class __attribute__((visibility("default"))) QQuickUniformAnimatorJob : public QQuickAnimatorJob | - |
243 | { | - |
244 | public: | - |
245 | QQuickUniformAnimatorJob(); | - |
246 | - | |
247 | void setTarget(QQuickItem *target) override; | - |
248 | - | |
249 | void setUniform(const QByteArray &uniform) { m_uniform = uniform; } executed 4 times by 1 test: end of block Executed by:
| 4 |
250 | QByteArray uniform() const { return never executed: m_uniform;return m_uniform; never executed: }return m_uniform; | 0 |
251 | - | |
252 | void postSync() override; | - |
253 | - | |
254 | void updateCurrentTime(int time) override; | - |
255 | void writeBack() override; | - |
256 | - | |
257 | void invalidate() override; | - |
258 | - | |
259 | private: | - |
260 | QByteArray m_uniform; | - |
261 | QQuickOpenGLShaderEffectNode *m_node; | - |
262 | - | |
263 | int m_uniformIndex : 8; | - |
264 | int m_uniformType : 8; | - |
265 | }; | - |
266 | - | |
267 | - | |
268 | - | |
Switch to Source code | Preprocessed file |