diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-04 10:21:47 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-05-04 10:21:47 +0200 |
commit | 16f58282bc5a1f81f7346ac6560df68761ad277d (patch) | |
tree | 38cc24d17ea4d868ee3cffd8ca99e96ac08e76dd /src/imports/particles/particleaffector.h | |
parent | 280242a5a14a99cc10857e35da61ac5b894d5f6b (diff) | |
parent | 1b7c1b6ef86d3d56ff01b2eab118062a229b0d19 (diff) |
Merge branch 'qtquick2' of scm.dev.nokia.troll.no:qt/qtdeclarative-staging into qtquick2
Diffstat (limited to 'src/imports/particles/particleaffector.h')
-rw-r--r-- | src/imports/particles/particleaffector.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/imports/particles/particleaffector.h b/src/imports/particles/particleaffector.h index 1acb405f3e..3a92263092 100644 --- a/src/imports/particles/particleaffector.h +++ b/src/imports/particles/particleaffector.h @@ -44,6 +44,7 @@ #include <QObject> #include "particlesystem.h" +#include "particleextruder.h" QT_BEGIN_HEADER @@ -59,6 +60,8 @@ class ParticleAffector : public QSGItem Q_PROPERTY(QStringList particles READ particles WRITE setParticles NOTIFY particlesChanged) Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) Q_PROPERTY(bool onceOff READ onceOff WRITE setOnceOff NOTIFY onceOffChanged) + Q_PROPERTY(ParticleExtruder* shape READ shape WRITE setShape NOTIFY shapeChanged) + Q_PROPERTY(bool signal READ signal WRITE setSignal NOTIFY signalChanged) public: explicit ParticleAffector(QSGItem *parent = 0); @@ -84,6 +87,16 @@ public: return m_onceOff; } + ParticleExtruder* shape() const + { + return m_shape; + } + + bool signal() const + { + return m_signal; + } + signals: void systemChanged(ParticleSystem* arg); @@ -94,6 +107,11 @@ signals: void onceOffChanged(bool arg); + void shapeChanged(ParticleExtruder* arg); + + void affected(qreal x, qreal y);//###Idx too? + void signalChanged(bool arg); + public slots: void setSystem(ParticleSystem* arg) { @@ -129,6 +147,22 @@ void setOnceOff(bool arg) } } +void setShape(ParticleExtruder* arg) +{ + if (m_shape != arg) { + m_shape = arg; + emit shapeChanged(arg); + } +} + +void setSignal(bool arg) +{ + if (m_signal != arg) { + m_signal = arg; + emit signalChanged(arg); + } +} + protected: friend class ParticleSystem; virtual bool affectParticle(ParticleData *d, qreal dt); @@ -146,6 +180,10 @@ private: bool m_onceOff; + ParticleExtruder* m_shape; + + bool m_signal; + private slots: void updateOffsets(); }; |