Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicksprite_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | static_assert(bool(1 == 1), "Required feature " "quick_sprite" " for file " __FILE__ " not available."); | - | ||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | class __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 | - | |||||||
37 | public: | - | ||||||
38 | explicit QQuickSprite(QObject *parent = nullptr); | - | ||||||
39 | ~QQuickSprite() override; | - | ||||||
40 | - | |||||||
41 | QUrl source() const | - | ||||||
42 | { | - | ||||||
43 | return never executed: m_source;return m_source; never executed: return m_source; | 0 | ||||||
44 | } | - | ||||||
45 | - | |||||||
46 | int frameHeight() const | - | ||||||
47 | { | - | ||||||
48 | return executed 697 times by 4 tests: m_frameHeight;return m_frameHeight; Executed by:
executed 697 times by 4 tests: return m_frameHeight; Executed by:
| 697 | ||||||
49 | } | - | ||||||
50 | - | |||||||
51 | int frameWidth() const | - | ||||||
52 | { | - | ||||||
53 | return executed 120 times by 4 tests: m_frameWidth;return m_frameWidth; Executed by:
executed 120 times by 4 tests: return m_frameWidth; Executed by:
| 120 | ||||||
54 | } | - | ||||||
55 | - | |||||||
56 | bool reverse() const | - | ||||||
57 | { | - | ||||||
58 | return executed 146551 times by 4 tests: m_reverse;return m_reverse; Executed by:
executed 146551 times by 4 tests: return m_reverse; Executed by:
| 146551 | ||||||
59 | } | - | ||||||
60 | - | |||||||
61 | int frames() const | - | ||||||
62 | { | - | ||||||
63 | return executed 5526 times by 4 tests: m_frames;return m_frames; Executed by:
executed 5526 times by 4 tests: return m_frames; Executed by:
| 5526 | ||||||
64 | } | - | ||||||
65 | - | |||||||
66 | int frameCount() const | - | ||||||
67 | { | - | ||||||
68 | return never executed: m_frames;return m_frames; never executed: return m_frames; | 0 | ||||||
69 | } | - | ||||||
70 | - | |||||||
71 | int frameX() const | - | ||||||
72 | { | - | ||||||
73 | return never executed: m_frameX;return m_frameX; never executed: return m_frameX; | 0 | ||||||
74 | } | - | ||||||
75 | - | |||||||
76 | int frameY() const | - | ||||||
77 | { | - | ||||||
78 | return never executed: m_frameY;return 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: m_frameRate;return m_frameRate; never executed: return m_frameRate; | 0 | ||||||
89 | } | - | ||||||
90 | - | |||||||
91 | qreal frameRateVariation() const | - | ||||||
92 | { | - | ||||||
93 | return never executed: m_frameRateVariation;return 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: m_frameDuration;return m_frameDuration; never executed: return m_frameDuration; | 0 | ||||||
104 | } | - | ||||||
105 | - | |||||||
106 | int frameDurationVariation() const | - | ||||||
107 | { | - | ||||||
108 | return never executed: m_frameDurationVariation;return 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: m_frameSync;return m_frameSync; Executed by:
executed 7608 times by 4 tests: return m_frameSync; Executed by:
| 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:
| 20 | ||||||
122 | - | |||||||
123 | qreal devicePixelRatio() const | - | ||||||
124 | { | - | ||||||
125 | return executed 40 times by 4 tests: m_devicePixelRatio;return m_devicePixelRatio; Executed by:
executed 40 times by 4 tests: return m_devicePixelRatio; Executed by:
| 40 | ||||||
126 | } | - | ||||||
127 | - | |||||||
128 | public : | - | ||||||
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 | - | |||||||
154 | public : | - | ||||||
155 | - | |||||||
156 | void setSource(QUrl arg) | - | ||||||
157 | { | - | ||||||
158 | if (m_source != arg
| 0-92 | ||||||
159 | m_source = arg; | - | ||||||
160 | sourceChanged(arg); | - | ||||||
161 | startImageLoading(); | - | ||||||
162 | } executed 92 times by 5 tests: end of block Executed by:
| 92 | ||||||
163 | } executed 92 times by 5 tests: end of block Executed by:
| 92 | ||||||
164 | - | |||||||
165 | void setFrameHeight(int arg) | - | ||||||
166 | { | - | ||||||
167 | if (m_frameHeight != arg
| 0-14 | ||||||
168 | m_frameHeight = arg; | - | ||||||
169 | frameHeightChanged(arg); | - | ||||||
170 | } executed 14 times by 2 tests: end of block Executed by:
| 14 | ||||||
171 | } executed 14 times by 2 tests: end of block Executed by:
| 14 | ||||||
172 | - | |||||||
173 | void setFrameWidth(int arg) | - | ||||||
174 | { | - | ||||||
175 | if (m_frameWidth != arg
| 0-14 | ||||||
176 | m_frameWidth = arg; | - | ||||||
177 | frameWidthChanged(arg); | - | ||||||
178 | } executed 14 times by 2 tests: end of block Executed by:
| 14 | ||||||
179 | } executed 14 times by 2 tests: end of block Executed by:
| 14 | ||||||
180 | - | |||||||
181 | void setReverse(bool arg) | - | ||||||
182 | { | - | ||||||
183 | if (m_reverse != arg
| 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:
| 6 | ||||||
194 | - | |||||||
195 | void setFrameCount(int arg) | - | ||||||
196 | { | - | ||||||
197 | if (m_frames != arg
| 30-54 | ||||||
198 | m_frames = arg; | - | ||||||
199 | frameCountChanged(arg); | - | ||||||
200 | } executed 54 times by 5 tests: end of block Executed by:
| 54 | ||||||
201 | } executed 84 times by 5 tests: end of block Executed by:
| 84 | ||||||
202 | - | |||||||
203 | void setFrameX(int arg) | - | ||||||
204 | { | - | ||||||
205 | if (m_frameX != arg
| 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
| 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
| 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
| 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
| 0-72 | ||||||
238 | m_frameDuration = arg; | - | ||||||
239 | frameDurationChanged(arg); | - | ||||||
240 | } executed 72 times by 5 tests: end of block Executed by:
| 72 | ||||||
241 | } executed 72 times by 5 tests: end of block Executed by:
| 72 | ||||||
242 | - | |||||||
243 | void setFrameDurationVariation(int arg) | - | ||||||
244 | { | - | ||||||
245 | if (m_frameDurationVariation != arg
| 0-4 | ||||||
246 | m_frameDurationVariation = arg; | - | ||||||
247 | frameDurationVariationChanged(arg); | - | ||||||
248 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||
249 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||
250 | - | |||||||
251 | void setFrameSync(bool arg) | - | ||||||
252 | { | - | ||||||
253 | if (m_frameSync != arg
| 0-16 | ||||||
254 | m_frameSync = arg; | - | ||||||
255 | frameSyncChanged(arg); | - | ||||||
256 | } executed 16 times by 2 tests: end of block Executed by:
| 16 | ||||||
257 | } executed 16 times by 2 tests: end of block Executed by:
| 16 | ||||||
258 | - | |||||||
259 | private : | - | ||||||
260 | void startImageLoading(); | - | ||||||
261 | - | |||||||
262 | private: | - | ||||||
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 code | Preprocessed file |