OpenCoverage

qquickwander_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickwander_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5struct 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-
14class 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-
30public:-
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: return m_xVariance;
m_xVariance;
never executed: return m_xVariance;
0
45 }-
46-
47 qreal yVariance() const-
48 {-
49 return
never executed: return m_yVariance;
m_yVariance;
never executed: return m_yVariance;
0
50 }-
51-
52 qreal pace() const-
53 {-
54 return
never executed: return m_pace;
m_pace;
never executed: return m_pace;
0
55 }-
56-
57 AffectableParameters affectedParameter() const-
58 {-
59 return
executed 4 times by 1 test: return m_affectedParameter;
Executed by:
  • tst_examples
m_affectedParameter;
executed 4 times by 1 test: return m_affectedParameter;
Executed by:
  • tst_examples
4
60 }-
61-
62protected:-
63 bool affectParticle(QQuickParticleData *d, qreal dt) override;-
64-
65public :-
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-
76public :-
77void setXVariance(qreal arg)-
78{-
79 if (m_xVariance != arg
m_xVariance != argDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickwander
FALSEnever evaluated
) {
0-6
80 m_xVariance = arg;-
81 xVarianceChanged(arg);-
82 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickwander
6
83}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickwander
6
84-
85void setYVariance(qreal arg)-
86{-
87 if (m_yVariance != arg
m_yVariance != argDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickwander
FALSEnever evaluated
) {
0-2
88 m_yVariance = arg;-
89 yVarianceChanged(arg);-
90 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickwander
2
91}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickwander
2
92-
93void setPace(qreal arg)-
94{-
95 if (m_pace != arg
m_pace != argDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickwander
FALSEnever evaluated
) {
0-6
96 m_pace = arg;-
97 paceChanged(arg);-
98 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickwander
6
99}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickwander
6
100-
101-
102void setAffectedParameter(AffectableParameters arg)-
103{-
104 if (m_affectedParameter != arg
m_affectedParameter != argDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
105 m_affectedParameter = arg;-
106 affectedParameterChanged(arg);-
107 }
never executed: end of block
0
108}
never executed: end of block
0
109-
110private:-
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 codePreprocessed file

Generated by Squish Coco 4.2.0