OpenCoverage

qquickparticleaffector_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickparticleaffector_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7class __attribute__((visibility("default"))) QQuickParticleAffector : public QQuickItem-
8{-
9 public:-
10#pragma GCC diagnostic push-
11 -
12#pragma GCC diagnostic ignored "-Wsuggest-override"-
13 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:-
14#pragma GCC diagnostic ignored "-Wattributes"-
15 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
16#pragma GCC diagnostic pop-
17 struct QPrivateSignal {};-
18 -
19 -
20 -
21 -
22 -
23 -
24-
25public:-
26 explicit QQuickParticleAffector(QQuickItem *parent = 0);-
27 virtual void affectSystem(qreal dt);-
28 virtual void reset(QQuickParticleData*);-
29 QQuickParticleSystem* system() const-
30 {-
31 return
never executed: return m_system;
m_system;
never executed: return m_system;
0
32 }-
33-
34 QStringList groups() const-
35 {-
36 return
never executed: return m_groups;
m_groups;
never executed: return m_groups;
0
37 }-
38-
39 bool enabled() const-
40 {-
41 return
never executed: return m_enabled;
m_enabled;
never executed: return m_enabled;
0
42 }-
43-
44 bool onceOff() const-
45 {-
46 return
never executed: return m_onceOff;
m_onceOff;
never executed: return m_onceOff;
0
47 }-
48-
49 QQuickParticleExtruder* shape() const-
50 {-
51 return
never executed: return m_shape;
m_shape;
never executed: return m_shape;
0
52 }-
53-
54 QStringList whenCollidingWith() const-
55 {-
56 return
never executed: return m_whenCollidingWith;
m_whenCollidingWith;
never executed: return m_whenCollidingWith;
0
57 }-
58-
59public :-
60-
61 void systemChanged(QQuickParticleSystem* arg);-
62-
63 void groupsChanged(const QStringList &arg);-
64-
65 void enabledChanged(bool arg);-
66-
67 void onceChanged(bool arg);-
68-
69 void shapeChanged(QQuickParticleExtruder* arg);-
70-
71 void affected(qreal x, qreal y);-
72-
73 void whenCollidingWithChanged(const QStringList &arg);-
74-
75public :-
76void setSystem(QQuickParticleSystem* arg)-
77{-
78 if (m_system != arg
m_system != argDescription
TRUEevaluated 94 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
) {
0-94
79 m_system = arg;-
80 m_system->registerParticleAffector(this);-
81 systemChanged(arg);-
82 }
executed 94 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
94
83}
executed 94 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
94
84-
85void setGroups(const QStringList &arg)-
86{-
87 if (m_groups != arg
m_groups != argDescription
TRUEevaluated 26 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickfriction
  • tst_qquickgroupgoal
FALSEnever evaluated
) {
0-26
88 m_groups = arg;-
89 m_updateIntSet = true;-
90 groupsChanged(arg);-
91 }
executed 26 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfriction
  • tst_qquickgroupgoal
26
92}
executed 26 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickfriction
  • tst_qquickgroupgoal
26
93-
94void setEnabled(bool arg)-
95{-
96 if (m_enabled != arg
m_enabled != argDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
) {
4-12
97 m_enabled = arg;-
98 enabledChanged(arg);-
99 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_examples
12
100}
executed 16 times by 1 test: end of block
Executed by:
  • tst_examples
16
101-
102void setOnceOff(bool arg)-
103{-
104 if (m_onceOff != arg
m_onceOff != argDescription
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
) {
4-22
105 m_onceOff = arg;-
106 m_needsReset = true;-
107 onceChanged(arg);-
108 }
executed 22 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
22
109}
executed 26 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
26
110-
111void setShape(QQuickParticleExtruder* arg)-
112{-
113 if (m_shape != arg
m_shape != argDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-2
114 m_shape = arg;-
115 shapeChanged(arg);-
116 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
117}
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
118-
119void setWhenCollidingWith(const QStringList &arg)-
120{-
121 if (m_whenCollidingWith != arg
m_whenCollidingWith != argDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-2
122 m_whenCollidingWith = arg;-
123 whenCollidingWithChanged(arg);-
124 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
125}
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
126public :-
127 void updateOffsets();-
128-
129protected:-
130 friend class QQuickParticleSystem;-
131 virtual bool affectParticle(QQuickParticleData *d, qreal dt);-
132 bool m_needsReset:1;-
133 bool m_ignoresTime:1;-
134 bool m_onceOff:1;-
135 bool m_enabled:1;-
136-
137 QQuickParticleSystem* m_system;-
138 QStringList m_groups;-
139 bool activeGroup(int g);-
140 bool shouldAffect(QQuickParticleData* datum);-
141 void postAffect(QQuickParticleData* datum);-
142 void componentComplete() override;-
143 bool isAffectedConnected();-
144 static const qreal simulationDelta;-
145 static const qreal simulationCutoff;-
146-
147 QPointF m_offset;-
148 QSet<QPair<int, int> > m_onceOffed;-
149private:-
150 QSet<int> m_groupIds;-
151 bool m_updateIntSet;-
152-
153 QQuickParticleExtruder* m_shape;-
154-
155 QStringList m_whenCollidingWith;-
156-
157 bool isColliding(QQuickParticleData* d) const;-
158};-
159-
160-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0