OpenCoverage

qquicksprite_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicksprite_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2static_assert(bool(1 == 1), "Required feature " "quick_sprite" " for file " __FILE__ " not available.");-
3-
4-
5-
6-
7-
8class __attribute__((visibility("default"))) QQuickSprite : public QQuickStochasticState-
9{-
10 public:-
11#pragma GCC diagnostic push-
12 -
13#pragma GCC diagnostic ignored "-Wsuggest-override"-
14 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:-
15#pragma GCC diagnostic ignored "-Wattributes"-
16 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
17#pragma GCC diagnostic pop-
18 struct QPrivateSignal {};-
19 -
20-
21 -
22 -
23 -
24 -
25-
26-
27 -
28 -
29 -
30 -
31-
32 -
33 -
34 -
35 -
36-
37public:-
38 explicit QQuickSprite(QObject *parent = nullptr);-
39 ~QQuickSprite() override;-
40-
41 QUrl source() const-
42 {-
43 return
never executed: return m_source;
m_source;
never executed: return m_source;
0
44 }-
45-
46 int frameHeight() const-
47 {-
48 return
executed 697 times by 4 tests: return m_frameHeight;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
m_frameHeight;
executed 697 times by 4 tests: return m_frameHeight;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
697
49 }-
50-
51 int frameWidth() const-
52 {-
53 return
executed 120 times by 4 tests: return m_frameWidth;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
m_frameWidth;
executed 120 times by 4 tests: return m_frameWidth;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
120
54 }-
55-
56 bool reverse() const-
57 {-
58 return
executed 146551 times by 4 tests: return m_reverse;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
m_reverse;
executed 146551 times by 4 tests: return m_reverse;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
146551
59 }-
60-
61 int frames() const-
62 {-
63 return
executed 5526 times by 4 tests: return m_frames;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
m_frames;
executed 5526 times by 4 tests: return m_frames;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
5526
64 }-
65-
66 int frameCount() const-
67 {-
68 return
never executed: return m_frames;
m_frames;
never executed: return m_frames;
0
69 }-
70-
71 int frameX() const-
72 {-
73 return
never executed: return m_frameX;
m_frameX;
never executed: return m_frameX;
0
74 }-
75-
76 int frameY() const-
77 {-
78 return
never executed: return m_frameY;
m_frameY;
never executed: return m_frameY;
0
79 }-
80-
81 void resetFrameRate()-
82 {-
83 setFrameRate(-1);-
84 }
never executed: end of block
0
85-
86 qreal frameRate() const-
87 {-
88 return
never executed: return m_frameRate;
m_frameRate;
never executed: return m_frameRate;
0
89 }-
90-
91 qreal frameRateVariation() const-
92 {-
93 return
never executed: return m_frameRateVariation;
m_frameRateVariation;
never executed: return m_frameRateVariation;
0
94 }-
95-
96 void resetFrameDuration()-
97 {-
98 setFrameDuration(-1);-
99 }
never executed: end of block
0
100-
101 int frameDuration() const-
102 {-
103 return
never executed: return m_frameDuration;
m_frameDuration;
never executed: return m_frameDuration;
0
104 }-
105-
106 int frameDurationVariation() const-
107 {-
108 return
never executed: return m_frameDurationVariation;
m_frameDurationVariation;
never executed: return m_frameDurationVariation;
0
109 }-
110-
111 int variedDuration() const override;-
112-
113 bool frameSync() const-
114 {-
115 return
executed 7608 times by 4 tests: return m_frameSync;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
m_frameSync;
executed 7608 times by 4 tests: return m_frameSync;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
7608
116 }-
117-
118 void setDevicePixelRatio(qreal dpr)-
119 {-
120 m_devicePixelRatio = dpr;-
121 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquickanimatedsprite
20
122-
123 qreal devicePixelRatio() const-
124 {-
125 return
executed 40 times by 4 tests: return m_devicePixelRatio;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
m_devicePixelRatio;
executed 40 times by 4 tests: return m_devicePixelRatio;
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
40
126 }-
127-
128public :-
129-
130 void sourceChanged(QUrl arg);-
131-
132 void frameHeightChanged(int arg);-
133-
134 void frameWidthChanged(int arg);-
135-
136 void reverseChanged(bool arg);-
137-
138 void frameCountChanged(int arg);-
139-
140 void frameXChanged(int arg);-
141-
142 void frameYChanged(int arg);-
143-
144 void frameRateChanged(qreal arg);-
145-
146 void frameRateVariationChanged(qreal arg);-
147-
148 void frameDurationChanged(int arg);-
149-
150 void frameDurationVariationChanged(int arg);-
151-
152 void frameSyncChanged(bool arg);-
153-
154public :-
155-
156 void setSource(QUrl arg)-
157 {-
158 if (m_source != arg
m_source != argDescription
TRUEevaluated 92 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
FALSEnever evaluated
) {
0-92
159 m_source = arg;-
160 sourceChanged(arg);-
161 startImageLoading();-
162 }
executed 92 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
92
163 }
executed 92 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
92
164-
165 void setFrameHeight(int arg)-
166 {-
167 if (m_frameHeight != arg
m_frameHeight != argDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
FALSEnever evaluated
) {
0-14
168 m_frameHeight = arg;-
169 frameHeightChanged(arg);-
170 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
14
171 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
14
172-
173 void setFrameWidth(int arg)-
174 {-
175 if (m_frameWidth != arg
m_frameWidth != argDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
FALSEnever evaluated
) {
0-14
176 m_frameWidth = arg;-
177 frameWidthChanged(arg);-
178 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
14
179 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
14
180-
181 void setReverse(bool arg)-
182 {-
183 if (m_reverse != arg
m_reverse != argDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
184 m_reverse = arg;-
185 reverseChanged(arg);-
186 }
never executed: end of block
0
187 }
never executed: end of block
0
188-
189 void setFrames(int arg)-
190 {-
191 QMessageLogger(__FILE__, 244, __PRETTY_FUNCTION__).warning() << "Sprite::frames has been renamed Sprite::frameCount";-
192 setFrameCount(arg);-
193 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qquickimageparticle
  • tst_qquickspritegoal
6
194-
195 void setFrameCount(int arg)-
196 {-
197 if (m_frames != arg
m_frames != argDescription
TRUEevaluated 54 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_examples
) {
30-54
198 m_frames = arg;-
199 frameCountChanged(arg);-
200 }
executed 54 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
54
201 }
executed 84 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
84
202-
203 void setFrameX(int arg)-
204 {-
205 if (m_frameX != arg
m_frameX != argDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
206 m_frameX = arg;-
207 frameXChanged(arg);-
208 }
never executed: end of block
0
209 }
never executed: end of block
0
210-
211 void setFrameY(int arg)-
212 {-
213 if (m_frameY != arg
m_frameY != argDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
214 m_frameY = arg;-
215 frameYChanged(arg);-
216 }
never executed: end of block
0
217 }
never executed: end of block
0
218-
219 void setFrameRate(qreal arg)-
220 {-
221 if (m_frameRate != arg
m_frameRate != argDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
222 m_frameRate = arg;-
223 frameRateChanged(arg);-
224 }
never executed: end of block
0
225 }
never executed: end of block
0
226-
227 void setFrameRateVariation(qreal arg)-
228 {-
229 if (m_frameRateVariation != arg
m_frameRateVariation != argDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
230 m_frameRateVariation = arg;-
231 frameRateVariationChanged(arg);-
232 }
never executed: end of block
0
233 }
never executed: end of block
0
234-
235 void setFrameDuration(int arg)-
236 {-
237 if (m_frameDuration != arg
m_frameDuration != argDescription
TRUEevaluated 72 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
FALSEnever evaluated
) {
0-72
238 m_frameDuration = arg;-
239 frameDurationChanged(arg);-
240 }
executed 72 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
72
241 }
executed 72 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimageparticle
  • tst_qquickspritegoal
  • tst_qquickspritesequence
72
242-
243 void setFrameDurationVariation(int arg)-
244 {-
245 if (m_frameDurationVariation != arg
m_frameDuratio...riation != argDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-4
246 m_frameDurationVariation = arg;-
247 frameDurationVariationChanged(arg);-
248 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_examples
4
249 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_examples
4
250-
251 void setFrameSync(bool arg)-
252 {-
253 if (m_frameSync != arg
m_frameSync != argDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickspritesequence
FALSEnever evaluated
) {
0-16
254 m_frameSync = arg;-
255 frameSyncChanged(arg);-
256 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickspritesequence
16
257 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickspritesequence
16
258-
259private :-
260 void startImageLoading();-
261-
262private:-
263 friend class QQuickImageParticle;-
264-
265 friend class QQuickAnimatedSprite;-
266 friend class QQuickSpriteEngine;-
267 friend class QQuickStochasticEngine;-
268-
269 int m_generatedCount;-
270 int m_framesPerRow;-
271 int m_rowY;-
272 int m_rowStartX;-
273-
274 QUrl m_source;-
275 bool m_reverse;-
276 int m_frameHeight;-
277 int m_frameWidth;-
278 int m_frames;-
279 int m_frameX;-
280 int m_frameY;-
281 qreal m_frameRate;-
282 qreal m_frameRateVariation;-
283 int m_frameDuration;-
284 int m_frameDurationVariation;-
285 bool m_frameSync;-
286 qreal m_devicePixelRatio;-
287 QQuickPixmap m_pix;-
288};-
289-
290-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0