Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickcustomaffector_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | class QQuickCustomAffector : public QQuickParticleAffector | - | ||||||
5 | { | - | ||||||
6 | public: | - | ||||||
7 | #pragma GCC diagnostic push | - | ||||||
8 | - | |||||||
9 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||
10 | 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: | - | ||||||
11 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||
12 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||
13 | #pragma GCC diagnostic pop | - | ||||||
14 | struct QPrivateSignal {}; | - | ||||||
15 | - | |||||||
16 | - | |||||||
17 | - | |||||||
18 | - | |||||||
19 | - | |||||||
20 | public: | - | ||||||
21 | explicit QQuickCustomAffector(QQuickItem *parent = 0); | - | ||||||
22 | void affectSystem(qreal dt) override; | - | ||||||
23 | - | |||||||
24 | QQuickDirection * position() const | - | ||||||
25 | { | - | ||||||
26 | return never executed: m_position;return m_position; never executed: return m_position; | 0 | ||||||
27 | } | - | ||||||
28 | - | |||||||
29 | QQuickDirection * velocity() const | - | ||||||
30 | { | - | ||||||
31 | return never executed: m_velocity;return m_velocity; never executed: return m_velocity; | 0 | ||||||
32 | } | - | ||||||
33 | - | |||||||
34 | QQuickDirection * acceleration() const | - | ||||||
35 | { | - | ||||||
36 | return never executed: m_acceleration;return m_acceleration; never executed: return m_acceleration; | 0 | ||||||
37 | } | - | ||||||
38 | - | |||||||
39 | void positionReset() | - | ||||||
40 | { | - | ||||||
41 | m_position = &m_nullVector; | - | ||||||
42 | } never executed: end of block | 0 | ||||||
43 | - | |||||||
44 | void velocityReset() | - | ||||||
45 | { | - | ||||||
46 | m_velocity = &m_nullVector; | - | ||||||
47 | } never executed: end of block | 0 | ||||||
48 | - | |||||||
49 | void accelerationReset() | - | ||||||
50 | { | - | ||||||
51 | m_acceleration = &m_nullVector; | - | ||||||
52 | } never executed: end of block | 0 | ||||||
53 | - | |||||||
54 | bool relative() const | - | ||||||
55 | { | - | ||||||
56 | return never executed: m_relative;return m_relative; never executed: return m_relative; | 0 | ||||||
57 | } | - | ||||||
58 | - | |||||||
59 | - | |||||||
60 | public : | - | ||||||
61 | void affectParticles(QQmlV4Handle particles, qreal dt); | - | ||||||
62 | - | |||||||
63 | void positionChanged(QQuickDirection * arg); | - | ||||||
64 | - | |||||||
65 | void velocityChanged(QQuickDirection * arg); | - | ||||||
66 | - | |||||||
67 | void accelerationChanged(QQuickDirection * arg); | - | ||||||
68 | - | |||||||
69 | void relativeChanged(bool arg); | - | ||||||
70 | - | |||||||
71 | public : | - | ||||||
72 | void setPosition(QQuickDirection * arg) | - | ||||||
73 | { | - | ||||||
74 | if (m_position != arg
| 0-6 | ||||||
75 | m_position = arg; | - | ||||||
76 | positionChanged(arg); | - | ||||||
77 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
78 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
79 | - | |||||||
80 | void setVelocity(QQuickDirection * arg) | - | ||||||
81 | { | - | ||||||
82 | if (m_velocity != arg
| 0-4 | ||||||
83 | m_velocity = arg; | - | ||||||
84 | velocityChanged(arg); | - | ||||||
85 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
86 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
87 | - | |||||||
88 | void setAcceleration(QQuickDirection * arg) | - | ||||||
89 | { | - | ||||||
90 | if (m_acceleration != arg
| 0-4 | ||||||
91 | m_acceleration = arg; | - | ||||||
92 | accelerationChanged(arg); | - | ||||||
93 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
94 | } executed 4 times by 2 tests: end of block Executed by:
| 4 | ||||||
95 | - | |||||||
96 | void setRelative(bool arg) | - | ||||||
97 | { | - | ||||||
98 | if (m_relative != arg
| 0-6 | ||||||
99 | m_relative = arg; | - | ||||||
100 | relativeChanged(arg); | - | ||||||
101 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
102 | } executed 6 times by 2 tests: end of block Executed by:
| 6 | ||||||
103 | - | |||||||
104 | protected: | - | ||||||
105 | bool isAffectConnected(); | - | ||||||
106 | bool affectParticle(QQuickParticleData *d, qreal dt) override; | - | ||||||
107 | - | |||||||
108 | private: | - | ||||||
109 | void affectProperties(const QList<QQuickParticleData*> particles, qreal dt); | - | ||||||
110 | QQuickDirection * m_position; | - | ||||||
111 | QQuickDirection * m_velocity; | - | ||||||
112 | QQuickDirection * m_acceleration; | - | ||||||
113 | - | |||||||
114 | QQuickDirection m_nullVector; | - | ||||||
115 | bool m_relative; | - | ||||||
116 | }; | - | ||||||
117 | - | |||||||
118 | - | |||||||
Switch to Source code | Preprocessed file |