OpenCoverage

qquickpointattractor_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickpointattractor_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3class QQuickAttractorAffector : public QQuickParticleAffector-
4{-
5 public:-
6#pragma GCC diagnostic push-
7 -
8#pragma GCC diagnostic ignored "-Wsuggest-override"-
9 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:-
10#pragma GCC diagnostic ignored "-Wattributes"-
11 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
12#pragma GCC diagnostic pop-
13 struct QPrivateSignal {};-
14 -
15 -
16 -
17 -
18 -
19-
20public:-
21 enum Proportion{-
22 Constant,-
23 Linear,-
24 Quadratic,-
25 InverseLinear,-
26 InverseQuadratic-
27 };-
28 friend constexpr const QMetaObject *qt_getEnumMetaObject(Proportion) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(Proportion) noexcept { return "Proportion"; }-
29-
30 enum AffectableParameters {-
31 Position,-
32 Velocity,-
33 Acceleration-
34 };-
35 friend constexpr const QMetaObject *qt_getEnumMetaObject(AffectableParameters) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(AffectableParameters) noexcept { return "AffectableParameters"; }-
36-
37 explicit QQuickAttractorAffector(QQuickItem *parent = 0);-
38-
39 qreal strength() const-
40 {-
41 return
never executed: return m_strength;
m_strength;
never executed: return m_strength;
0
42 }-
43-
44 qreal pointX() const-
45 {-
46 return
executed 4 times by 1 test: return m_x;
Executed by:
  • tst_examples
m_x;
executed 4 times by 1 test: return m_x;
Executed by:
  • tst_examples
4
47 }-
48-
49 qreal pointY() const-
50 {-
51 return
executed 4 times by 1 test: return m_y;
Executed by:
  • tst_examples
m_y;
executed 4 times by 1 test: return m_y;
Executed by:
  • tst_examples
4
52 }-
53-
54 AffectableParameters affectedParameter() const-
55 {-
56 return
never executed: return m_physics;
m_physics;
never executed: return m_physics;
0
57 }-
58-
59 Proportion proportionalToDistance() const-
60 {-
61 return
never executed: return m_proportionalToDistance;
m_proportionalToDistance;
never executed: return m_proportionalToDistance;
0
62 }-
63-
64public :-
65-
66 void strengthChanged(qreal arg);-
67-
68 void pointXChanged(qreal arg);-
69-
70 void pointYChanged(qreal arg);-
71-
72 void affectedParameterChanged(AffectableParameters arg);-
73-
74 void proportionalToDistanceChanged(Proportion arg);-
75-
76public :-
77void setStrength(qreal arg)-
78{-
79 if (m_strength != arg
m_strength != argDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpointattractor
FALSEnever evaluated
) {
0-4
80 m_strength = arg;-
81 strengthChanged(arg);-
82 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpointattractor
4
83}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpointattractor
4
84-
85void setPointX(qreal arg)-
86{-
87 if (m_x != arg
m_x != argDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-2
88 m_x = arg;-
89 pointXChanged(arg);-
90 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
91}
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
92-
93void setPointY(qreal arg)-
94{-
95 if (m_y != arg
m_y != argDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
) {
0-2
96 m_y = arg;-
97 pointYChanged(arg);-
98 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
99}
executed 2 times by 1 test: end of block
Executed by:
  • tst_examples
2
100void setAffectedParameter(AffectableParameters arg)-
101{-
102 if (m_physics != arg
m_physics != argDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpointattractor
FALSEnever evaluated
) {
0-4
103 m_physics = arg;-
104 affectedParameterChanged(arg);-
105 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpointattractor
4
106}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpointattractor
4
107-
108void setProportionalToDistance(Proportion arg)-
109{-
110 if (m_proportionalToDistance != arg
m_proportional...istance != argDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpointattractor
FALSEnever evaluated
) {
0-4
111 m_proportionalToDistance = arg;-
112 proportionalToDistanceChanged(arg);-
113 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpointattractor
4
114}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpointattractor
4
115-
116protected:-
117 bool affectParticle(QQuickParticleData *d, qreal dt) override;-
118-
119private:-
120qreal m_strength;-
121qreal m_x;-
122qreal m_y;-
123AffectableParameters m_physics;-
124Proportion m_proportionalToDistance;-
125};-
126-
127-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0