Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickpointattractor_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | class 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 | - | |||||||
20 | public: | - | ||||||
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: m_strength;return m_strength; never executed: return m_strength; | 0 | ||||||
42 | } | - | ||||||
43 | - | |||||||
44 | qreal pointX() const | - | ||||||
45 | { | - | ||||||
46 | return executed 4 times by 1 test: m_x;return m_x; Executed by:
executed 4 times by 1 test: return m_x; Executed by:
| 4 | ||||||
47 | } | - | ||||||
48 | - | |||||||
49 | qreal pointY() const | - | ||||||
50 | { | - | ||||||
51 | return executed 4 times by 1 test: m_y;return m_y; Executed by:
executed 4 times by 1 test: return m_y; Executed by:
| 4 | ||||||
52 | } | - | ||||||
53 | - | |||||||
54 | AffectableParameters affectedParameter() const | - | ||||||
55 | { | - | ||||||
56 | return never executed: m_physics;return m_physics; never executed: return m_physics; | 0 | ||||||
57 | } | - | ||||||
58 | - | |||||||
59 | Proportion proportionalToDistance() const | - | ||||||
60 | { | - | ||||||
61 | return never executed: m_proportionalToDistance;return m_proportionalToDistance; never executed: return m_proportionalToDistance; | 0 | ||||||
62 | } | - | ||||||
63 | - | |||||||
64 | public : | - | ||||||
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 | - | |||||||
76 | public : | - | ||||||
77 | void setStrength(qreal arg) | - | ||||||
78 | { | - | ||||||
79 | if (m_strength != arg
| 0-4 | ||||||
80 | m_strength = arg; | - | ||||||
81 | strengthChanged(arg); | - | ||||||
82 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
83 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
84 | - | |||||||
85 | void setPointX(qreal arg) | - | ||||||
86 | { | - | ||||||
87 | if (m_x != arg
| 0-2 | ||||||
88 | m_x = arg; | - | ||||||
89 | pointXChanged(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 setPointY(qreal arg) | - | ||||||
94 | { | - | ||||||
95 | if (m_y != arg
| 0-2 | ||||||
96 | m_y = arg; | - | ||||||
97 | pointYChanged(arg); | - | ||||||
98 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
99 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
100 | void setAffectedParameter(AffectableParameters arg) | - | ||||||
101 | { | - | ||||||
102 | if (m_physics != arg
| 0-4 | ||||||
103 | m_physics = arg; | - | ||||||
104 | affectedParameterChanged(arg); | - | ||||||
105 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
106 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
107 | - | |||||||
108 | void setProportionalToDistance(Proportion arg) | - | ||||||
109 | { | - | ||||||
110 | if (m_proportionalToDistance != arg
| 0-4 | ||||||
111 | m_proportionalToDistance = arg; | - | ||||||
112 | proportionalToDistanceChanged(arg); | - | ||||||
113 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
114 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
115 | - | |||||||
116 | protected: | - | ||||||
117 | bool affectParticle(QQuickParticleData *d, qreal dt) override; | - | ||||||
118 | - | |||||||
119 | private: | - | ||||||
120 | qreal m_strength; | - | ||||||
121 | qreal m_x; | - | ||||||
122 | qreal m_y; | - | ||||||
123 | AffectableParameters m_physics; | - | ||||||
124 | Proportion m_proportionalToDistance; | - | ||||||
125 | }; | - | ||||||
126 | - | |||||||
127 | - | |||||||
Switch to Source code | Preprocessed file |