| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickparticleaffector_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | class __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 | - | |||||||
| 25 | public: | - | ||||||
| 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: m_system;return m_system;never executed: return m_system; | 0 | ||||||
| 32 | } | - | ||||||
| 33 | - | |||||||
| 34 | QStringList groups() const | - | ||||||
| 35 | { | - | ||||||
| 36 | return never executed: m_groups;return m_groups;never executed: return m_groups; | 0 | ||||||
| 37 | } | - | ||||||
| 38 | - | |||||||
| 39 | bool enabled() const | - | ||||||
| 40 | { | - | ||||||
| 41 | return never executed: m_enabled;return m_enabled;never executed: return m_enabled; | 0 | ||||||
| 42 | } | - | ||||||
| 43 | - | |||||||
| 44 | bool onceOff() const | - | ||||||
| 45 | { | - | ||||||
| 46 | return never executed: m_onceOff;return m_onceOff;never executed: return m_onceOff; | 0 | ||||||
| 47 | } | - | ||||||
| 48 | - | |||||||
| 49 | QQuickParticleExtruder* shape() const | - | ||||||
| 50 | { | - | ||||||
| 51 | return never executed: m_shape;return m_shape;never executed: return m_shape; | 0 | ||||||
| 52 | } | - | ||||||
| 53 | - | |||||||
| 54 | QStringList whenCollidingWith() const | - | ||||||
| 55 | { | - | ||||||
| 56 | return never executed: m_whenCollidingWith;return m_whenCollidingWith;never executed: return m_whenCollidingWith; | 0 | ||||||
| 57 | } | - | ||||||
| 58 | - | |||||||
| 59 | public : | - | ||||||
| 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 | - | |||||||
| 75 | public : | - | ||||||
| 76 | void setSystem(QQuickParticleSystem* arg) | - | ||||||
| 77 | { | - | ||||||
| 78 | if (m_system != arg
| 0-94 | ||||||
| 79 | m_system = arg; | - | ||||||
| 80 | m_system->registerParticleAffector(this); | - | ||||||
| 81 | systemChanged(arg); | - | ||||||
| 82 | } executed 94 times by 11 tests: end of blockExecuted by:
| 94 | ||||||
| 83 | } executed 94 times by 11 tests: end of blockExecuted by:
| 94 | ||||||
| 84 | - | |||||||
| 85 | void setGroups(const QStringList &arg) | - | ||||||
| 86 | { | - | ||||||
| 87 | if (m_groups != arg
| 0-26 | ||||||
| 88 | m_groups = arg; | - | ||||||
| 89 | m_updateIntSet = true; | - | ||||||
| 90 | groupsChanged(arg); | - | ||||||
| 91 | } executed 26 times by 3 tests: end of blockExecuted by:
| 26 | ||||||
| 92 | } executed 26 times by 3 tests: end of blockExecuted by:
| 26 | ||||||
| 93 | - | |||||||
| 94 | void setEnabled(bool arg) | - | ||||||
| 95 | { | - | ||||||
| 96 | if (m_enabled != arg
| 4-12 | ||||||
| 97 | m_enabled = arg; | - | ||||||
| 98 | enabledChanged(arg); | - | ||||||
| 99 | } executed 12 times by 1 test: end of blockExecuted by:
| 12 | ||||||
| 100 | } executed 16 times by 1 test: end of blockExecuted by:
| 16 | ||||||
| 101 | - | |||||||
| 102 | void setOnceOff(bool arg) | - | ||||||
| 103 | { | - | ||||||
| 104 | if (m_onceOff != arg
| 4-22 | ||||||
| 105 | m_onceOff = arg; | - | ||||||
| 106 | m_needsReset = true; | - | ||||||
| 107 | onceChanged(arg); | - | ||||||
| 108 | } executed 22 times by 3 tests: end of blockExecuted by:
| 22 | ||||||
| 109 | } executed 26 times by 3 tests: end of blockExecuted by:
| 26 | ||||||
| 110 | - | |||||||
| 111 | void setShape(QQuickParticleExtruder* arg) | - | ||||||
| 112 | { | - | ||||||
| 113 | if (m_shape != arg
| 0-2 | ||||||
| 114 | m_shape = arg; | - | ||||||
| 115 | shapeChanged(arg); | - | ||||||
| 116 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||
| 117 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||
| 118 | - | |||||||
| 119 | void setWhenCollidingWith(const QStringList &arg) | - | ||||||
| 120 | { | - | ||||||
| 121 | if (m_whenCollidingWith != arg
| 0-2 | ||||||
| 122 | m_whenCollidingWith = arg; | - | ||||||
| 123 | whenCollidingWithChanged(arg); | - | ||||||
| 124 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||
| 125 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||
| 126 | public : | - | ||||||
| 127 | void updateOffsets(); | - | ||||||
| 128 | - | |||||||
| 129 | protected: | - | ||||||
| 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; | - | ||||||
| 149 | private: | - | ||||||
| 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 code | Preprocessed file |