diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-08-11 19:36:07 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-15 05:16:45 +0200 |
commit | 5db92f1f1cacd25791abe6a4e6c6509fdd329e06 (patch) | |
tree | 77e56afe1e042fc9e4c7555cd72bdf60869f826b /src/declarative/particles/qsgfollowemitter.cpp | |
parent | 4796c4d9550166500d54b829fa97541e4de6e929 (diff) |
Refactor BasicEmitter into Emitter
No real point having a separate class, and it makes the docs more
complex.
Change-Id: I48aa7bafce541b0b5b792351adb5edf77fc67de2
Reviewed-on: http://codereview.qt.nokia.com/2853
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/declarative/particles/qsgfollowemitter.cpp')
-rw-r--r-- | src/declarative/particles/qsgfollowemitter.cpp | 65 |
1 files changed, 11 insertions, 54 deletions
diff --git a/src/declarative/particles/qsgfollowemitter.cpp b/src/declarative/particles/qsgfollowemitter.cpp index 0d4e7f73fd..a074f4456f 100644 --- a/src/declarative/particles/qsgfollowemitter.cpp +++ b/src/declarative/particles/qsgfollowemitter.cpp @@ -45,21 +45,14 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass Emitter QSGBasicEmitter + \qmlclass FollowEmitter QSGFollowEmitter \inqmlmodule QtQuick.Particles 2 + \inherits QSGParticleEmitter \since QtQuick.Particles 2.0 - \brief The Emitter element allows you to emit logical particles. + \brief The FollowEmitter element allows you to emit logical particles from other logical particles. This element emits logical particles into the ParticleSystem, with the - given starting attributes. - - Note that logical particles are not - automatically rendered, you will need to have one or more - ParticlePainter elements visualizing them. - - Note that the given starting attributes can be modified at any point - in the particle's lifetime by any Affector element in the same - ParticleSystem. This includes attributes like lifespan. + starting positions based on those of other logical particles. */ QSGFollowEmitter::QSGFollowEmitter(QSGItem *parent) : QSGParticleEmitter(parent) @@ -80,24 +73,17 @@ QSGFollowEmitter::QSGFollowEmitter(QSGItem *parent) : this, SLOT(recalcParticlesPerSecond())); } - -/*! - \qmlproperty ParticleSystem QtQuick.Particles2::FollowEmitter::system - - This is the Particle system that the FollowEmitter will emit into. - This can be omitted if the FollowEmitter is a direct child of the ParticleSystem -*/ -/*! - \qmlproperty string QtQuick.Particles2::FollowEmitter::particle -*/ /*! \qmlproperty string QtQuick.Particles2::FollowEmitter::follow + + The type of logical particle which this is emitting from. */ -/*! - \qmlproperty Shape QtQuick.Particles2::FollowEmitter::shape -*/ + /*! \qmlproperty Shape QtQuick.Particles2::FollowEmitter::emitShape + + As the area of a FollowEmitter is the area it follows, a separate shape can be provided + to be the shape it emits out of. */ /*! \qmlproperty real QtQuick.Particles2::FollowEmitter::emitWidth @@ -106,38 +92,9 @@ QSGFollowEmitter::QSGFollowEmitter(QSGItem *parent) : \qmlproperty real QtQuick.Particles2::FollowEmitter::emitHeight */ /*! - \qmlproperty bool QtQuick.Particles2::FollowEmitter::emitting -*/ -/*! \qmlproperty real QtQuick.Particles2::FollowEmitter::emitRatePerParticle */ -/*! - \qmlproperty int QtQuick.Particles2::FollowEmitter::lifeSpan -*/ -/*! - \qmlproperty int QtQuick.Particles2::FollowEmitter::lifeSpanVariation -*/ -/*! - \qmlproperty int QtQuick.Particles2::FollowEmitter::emitCap -*/ -/*! - \qmlproperty real QtQuick.Particles2::FollowEmitter::size -*/ -/*! - \qmlproperty real QtQuick.Particles2::FollowEmitter::endSize -*/ -/*! - \qmlproperty real QtQuick.Particles2::FollowEmitter::sizeVariation -*/ -/*! - \qmlproperty StochasticDirection QtQuick.Particles2::FollowEmitter::speed -*/ -/*! - \qmlproperty StochasticDirection QtQuick.Particles2::FollowEmitter::acceleration -*/ -/*! - \qmlproperty qreal QtQuick.Particles2::FollowEmitter::speedFromMovement -*/ + void QSGFollowEmitter::recalcParticlesPerSecond(){ if (!m_system) |