Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickwander_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | struct WanderData{ | - | ||||||
6 | qreal x_vel; | - | ||||||
7 | qreal y_vel; | - | ||||||
8 | qreal x_peak; | - | ||||||
9 | qreal x_var; | - | ||||||
10 | qreal y_peak; | - | ||||||
11 | qreal y_var; | - | ||||||
12 | }; | - | ||||||
13 | - | |||||||
14 | class QQuickWanderAffector : public QQuickParticleAffector | - | ||||||
15 | { | - | ||||||
16 | public: | - | ||||||
17 | #pragma GCC diagnostic push | - | ||||||
18 | - | |||||||
19 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||
20 | 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: | - | ||||||
21 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||
22 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||
23 | #pragma GCC diagnostic pop | - | ||||||
24 | struct QPrivateSignal {}; | - | ||||||
25 | - | |||||||
26 | - | |||||||
27 | - | |||||||
28 | - | |||||||
29 | - | |||||||
30 | public: | - | ||||||
31 | enum AffectableParameters { | - | ||||||
32 | Position, | - | ||||||
33 | Velocity, | - | ||||||
34 | Acceleration | - | ||||||
35 | }; | - | ||||||
36 | friend constexpr const QMetaObject *qt_getEnumMetaObject(AffectableParameters) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(AffectableParameters) noexcept { return "AffectableParameters"; } | - | ||||||
37 | - | |||||||
38 | explicit QQuickWanderAffector(QQuickItem *parent = 0); | - | ||||||
39 | ~QQuickWanderAffector(); | - | ||||||
40 | - | |||||||
41 | - | |||||||
42 | qreal xVariance() const | - | ||||||
43 | { | - | ||||||
44 | return never executed: m_xVariance;return m_xVariance; never executed: return m_xVariance; | 0 | ||||||
45 | } | - | ||||||
46 | - | |||||||
47 | qreal yVariance() const | - | ||||||
48 | { | - | ||||||
49 | return never executed: m_yVariance;return m_yVariance; never executed: return m_yVariance; | 0 | ||||||
50 | } | - | ||||||
51 | - | |||||||
52 | qreal pace() const | - | ||||||
53 | { | - | ||||||
54 | return never executed: m_pace;return m_pace; never executed: return m_pace; | 0 | ||||||
55 | } | - | ||||||
56 | - | |||||||
57 | AffectableParameters affectedParameter() const | - | ||||||
58 | { | - | ||||||
59 | return executed 4 times by 1 test: m_affectedParameter;return m_affectedParameter; Executed by:
executed 4 times by 1 test: return m_affectedParameter; Executed by:
| 4 | ||||||
60 | } | - | ||||||
61 | - | |||||||
62 | protected: | - | ||||||
63 | bool affectParticle(QQuickParticleData *d, qreal dt) override; | - | ||||||
64 | - | |||||||
65 | public : | - | ||||||
66 | - | |||||||
67 | void xVarianceChanged(qreal arg); | - | ||||||
68 | - | |||||||
69 | void yVarianceChanged(qreal arg); | - | ||||||
70 | - | |||||||
71 | void paceChanged(qreal arg); | - | ||||||
72 | - | |||||||
73 | - | |||||||
74 | void affectedParameterChanged(AffectableParameters arg); | - | ||||||
75 | - | |||||||
76 | public : | - | ||||||
77 | void setXVariance(qreal arg) | - | ||||||
78 | { | - | ||||||
79 | if (m_xVariance != arg
| 0-6 | ||||||
80 | m_xVariance = arg; | - | ||||||
81 | xVarianceChanged(arg); | - | ||||||
82 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
83 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
84 | - | |||||||
85 | void setYVariance(qreal arg) | - | ||||||
86 | { | - | ||||||
87 | if (m_yVariance != arg
| 0-2 | ||||||
88 | m_yVariance = arg; | - | ||||||
89 | yVarianceChanged(arg); | - | ||||||
90 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
91 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
92 | - | |||||||
93 | void setPace(qreal arg) | - | ||||||
94 | { | - | ||||||
95 | if (m_pace != arg
| 0-6 | ||||||
96 | m_pace = arg; | - | ||||||
97 | paceChanged(arg); | - | ||||||
98 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
99 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
100 | - | |||||||
101 | - | |||||||
102 | void setAffectedParameter(AffectableParameters arg) | - | ||||||
103 | { | - | ||||||
104 | if (m_affectedParameter != arg
| 0 | ||||||
105 | m_affectedParameter = arg; | - | ||||||
106 | affectedParameterChanged(arg); | - | ||||||
107 | } never executed: end of block | 0 | ||||||
108 | } never executed: end of block | 0 | ||||||
109 | - | |||||||
110 | private: | - | ||||||
111 | WanderData* getData(int idx); | - | ||||||
112 | QHash<int, WanderData*> m_wanderData; | - | ||||||
113 | qreal m_xVariance; | - | ||||||
114 | qreal m_yVariance; | - | ||||||
115 | qreal m_pace; | - | ||||||
116 | AffectableParameters m_affectedParameter; | - | ||||||
117 | }; | - | ||||||
118 | - | |||||||
119 | - | |||||||
Switch to Source code | Preprocessed file |