From bfb3c424abc7c839dc44de0e36024ede99ece736 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 14 Oct 2011 10:51:42 +0200 Subject: Rename Qt Quick-specific classes to QQuick* The QSG (SceneGraph) prefix is too generic for Qt Quick(2)-specific classes. All the classes and files in the declarative/items directory have been renamed. In particular, for classes that are currently public, the renaming is as follows: QSGView --> QQuickView QSGCanvas --> QQuickCanvas QSGItem --> QQuickItem QSGPaintedItem --> QQuickPaintedItem The header files have been renamed accordingly (e.g. qsgview.h --> qquickview.h). Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c Reviewed-by: Kent Hansen --- src/declarative/particles/qsgage.cpp | 2 +- src/declarative/particles/qsgage_p.h | 2 +- src/declarative/particles/qsgcustomaffector.cpp | 2 +- src/declarative/particles/qsgcustomaffector_p.h | 2 +- src/declarative/particles/qsgcustomparticle.cpp | 24 ++++++------ src/declarative/particles/qsgcustomparticle_p.h | 14 +++---- src/declarative/particles/qsgfriction.cpp | 2 +- src/declarative/particles/qsgfriction_p.h | 2 +- src/declarative/particles/qsggravity.cpp | 2 +- src/declarative/particles/qsggravity_p.h | 2 +- src/declarative/particles/qsggroupgoal.cpp | 8 ++-- src/declarative/particles/qsggroupgoal_p.h | 4 +- src/declarative/particles/qsgimageparticle.cpp | 12 +++--- src/declarative/particles/qsgimageparticle_p.h | 16 ++++---- src/declarative/particles/qsgitemparticle.cpp | 46 +++++++++++------------ src/declarative/particles/qsgitemparticle_p.h | 38 +++++++++---------- src/declarative/particles/qsgmove.cpp | 2 +- src/declarative/particles/qsgmove_p.h | 2 +- src/declarative/particles/qsgparticleaffector.cpp | 6 +-- src/declarative/particles/qsgparticleaffector_p.h | 4 +- src/declarative/particles/qsgparticleemitter.cpp | 6 +-- src/declarative/particles/qsgparticleemitter_p.h | 6 +-- src/declarative/particles/qsgparticlegroup.cpp | 2 +- src/declarative/particles/qsgparticlegroup_p.h | 4 +- src/declarative/particles/qsgparticlepainter.cpp | 6 +-- src/declarative/particles/qsgparticlepainter_p.h | 4 +- src/declarative/particles/qsgparticlesmodule.cpp | 2 +- src/declarative/particles/qsgparticlesystem.cpp | 16 ++++---- src/declarative/particles/qsgparticlesystem_p.h | 16 ++++---- src/declarative/particles/qsgpointattractor.cpp | 2 +- src/declarative/particles/qsgpointattractor_p.h | 2 +- src/declarative/particles/qsgspritegoal.cpp | 10 ++--- src/declarative/particles/qsgspritegoal_p.h | 8 ++-- src/declarative/particles/qsgtargetaffector.cpp | 2 +- src/declarative/particles/qsgtargetaffector_p.h | 2 +- src/declarative/particles/qsgtargetdirection_p.h | 12 +++--- src/declarative/particles/qsgtrailemitter.cpp | 2 +- src/declarative/particles/qsgtrailemitter_p.h | 2 +- src/declarative/particles/qsgturbulence.cpp | 2 +- src/declarative/particles/qsgturbulence_p.h | 2 +- src/declarative/particles/qsgv8particledata.cpp | 2 +- src/declarative/particles/qsgwander.cpp | 2 +- src/declarative/particles/qsgwander_p.h | 2 +- 43 files changed, 153 insertions(+), 153 deletions(-) (limited to 'src/declarative/particles') diff --git a/src/declarative/particles/qsgage.cpp b/src/declarative/particles/qsgage.cpp index da7736a818..797dd14f35 100644 --- a/src/declarative/particles/qsgage.cpp +++ b/src/declarative/particles/qsgage.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE Default value is true. */ -QSGAgeAffector::QSGAgeAffector(QSGItem *parent) : +QSGAgeAffector::QSGAgeAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_lifeLeft(0), m_advancePosition(true) { } diff --git a/src/declarative/particles/qsgage_p.h b/src/declarative/particles/qsgage_p.h index 676122086c..63ec8f7592 100644 --- a/src/declarative/particles/qsgage_p.h +++ b/src/declarative/particles/qsgage_p.h @@ -57,7 +57,7 @@ class QSGAgeAffector : public QSGParticleAffector Q_PROPERTY(bool advancePosition READ advancePosition WRITE setAdvancePosition NOTIFY advancePositionChanged) public: - explicit QSGAgeAffector(QSGItem *parent = 0); + explicit QSGAgeAffector(QQuickItem *parent = 0); int lifeLeft() const { diff --git a/src/declarative/particles/qsgcustomaffector.cpp b/src/declarative/particles/qsgcustomaffector.cpp index 9f8db2c74a..ffa86aae97 100644 --- a/src/declarative/particles/qsgcustomaffector.cpp +++ b/src/declarative/particles/qsgcustomaffector.cpp @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE Note that JS is slower to execute, so it is not recommended to use this in high-volume particle systems. */ -QSGCustomAffector::QSGCustomAffector(QSGItem *parent) : +QSGCustomAffector::QSGCustomAffector(QQuickItem *parent) : QSGParticleAffector(parent) { } diff --git a/src/declarative/particles/qsgcustomaffector_p.h b/src/declarative/particles/qsgcustomaffector_p.h index fc0735e971..679034e602 100644 --- a/src/declarative/particles/qsgcustomaffector_p.h +++ b/src/declarative/particles/qsgcustomaffector_p.h @@ -58,7 +58,7 @@ class QSGCustomAffector : public QSGParticleAffector Q_OBJECT public: - explicit QSGCustomAffector(QSGItem *parent = 0); + explicit QSGCustomAffector(QQuickItem *parent = 0); virtual void affectSystem(qreal dt); signals: diff --git a/src/declarative/particles/qsgcustomparticle.cpp b/src/declarative/particles/qsgcustomparticle.cpp index 89e465b58a..d00f6bbdda 100644 --- a/src/declarative/particles/qsgcustomparticle.cpp +++ b/src/declarative/particles/qsgcustomparticle.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qsgcustomparticle_p.h" -#include +#include #include QT_BEGIN_NAMESPACE @@ -128,16 +128,16 @@ struct PlainVertices { */ -QSGCustomParticle::QSGCustomParticle(QSGItem* parent) +QSGCustomParticle::QSGCustomParticle(QQuickItem* parent) : QSGParticlePainter(parent) , m_dirtyData(true) , m_material(0) , m_rootNode(0) { - setFlag(QSGItem::ItemHasContents); + setFlag(QQuickItem::ItemHasContents); } -class QSGShaderEffectMaterialObject : public QObject, public QSGShaderEffectMaterial { }; +class QSGShaderEffectMaterialObject : public QObject, public QQuickShaderEffectMaterial { }; QSGCustomParticle::~QSGCustomParticle() { @@ -277,7 +277,7 @@ void QSGCustomParticle::setSource(const QVariant &var, int index) } QObject *obj = qVariantValue(var); - source.item = qobject_cast(obj); + source.item = qobject_cast(obj); if (!source.item || !source.item->isTextureProvider()) { qWarning("ShaderEffect: source uniform [%s] is not assigned a valid texture provider: %s [%s]", source.name.constData(), qPrintable(obj->objectName()), obj->metaObject()->className()); @@ -448,7 +448,7 @@ void QSGCustomParticle::prepareNextFrame(){ buildData(); } -QSGShaderEffectNode* QSGCustomParticle::buildCustomNodes() +QQuickShaderEffectNode* QSGCustomParticle::buildCustomNodes() { #ifdef QT_OPENGL_ES_2 if (m_count * 4 > 0xffff) { @@ -464,7 +464,7 @@ QSGShaderEffectNode* QSGCustomParticle::buildCustomNodes() updateProperties(); - QSGShaderEffectProgram s = m_source; + QQuickShaderEffectProgram s = m_source; if (s.fragmentCode.isEmpty()) s.fragmentCode = qt_particles_default_fragment_code; if (s.vertexCode.isEmpty()) @@ -480,7 +480,7 @@ QSGShaderEffectNode* QSGCustomParticle::buildCustomNodes() int gIdx = m_system->groupIds[str]; int count = m_system->groupData[gIdx]->size(); - QSGShaderEffectNode* node = new QSGShaderEffectNode(); + QQuickShaderEffectNode* node = new QQuickShaderEffectNode(); m_nodes.insert(gIdx, node); node->setMaterial(m_material); @@ -520,7 +520,7 @@ QSGShaderEffectNode* QSGCustomParticle::buildCustomNodes() indices += 6; } } - foreach (QSGShaderEffectNode* node, m_nodes){ + foreach (QQuickShaderEffectNode* node, m_nodes){ if (node == *(m_nodes.begin())) continue; (*(m_nodes.begin()))->appendChildNode(node); @@ -541,7 +541,7 @@ void QSGCustomParticle::buildData() for (int i = 0; i < oldTextures.size(); ++i) { QSGTextureProvider *t = oldTextures.at(i).second; if (t) - foreach (QSGShaderEffectNode* node, m_nodes) + foreach (QQuickShaderEffectNode* node, m_nodes) disconnect(t, SIGNAL(textureChanged()), node, SLOT(markDirtyTexture())); } for (int i = 0; i < m_sources.size(); ++i) { @@ -549,7 +549,7 @@ void QSGCustomParticle::buildData() QSGTextureProvider *t = source.item->textureProvider(); textures.append(qMakePair(source.name, t)); if (t) - foreach (QSGShaderEffectNode* node, m_nodes) + foreach (QQuickShaderEffectNode* node, m_nodes) connect(t, SIGNAL(textureChanged()), node, SLOT(markDirtyTexture()), Qt::DirectConnection); } for (QSet::const_iterator it = m_source.uniformNames.begin(); @@ -560,7 +560,7 @@ void QSGCustomParticle::buildData() m_material->setUniforms(values); m_material->setTextureProviders(textures); m_dirtyData = false; - foreach (QSGShaderEffectNode* node, m_nodes) + foreach (QQuickShaderEffectNode* node, m_nodes) node->markDirty(QSGNode::DirtyMaterial); } diff --git a/src/declarative/particles/qsgcustomparticle_p.h b/src/declarative/particles/qsgcustomparticle_p.h index 99f63d5178..271cc0a2a3 100644 --- a/src/declarative/particles/qsgcustomparticle_p.h +++ b/src/declarative/particles/qsgcustomparticle_p.h @@ -42,7 +42,7 @@ #ifndef CUSTOM_PARTICLE_H #define CUSTOM_PARTICLE_H #include "qsgparticlepainter_p.h" -#include +#include #include QT_BEGIN_HEADER @@ -64,7 +64,7 @@ class QSGCustomParticle : public QSGParticlePainter Q_PROPERTY(QByteArray vertexShader READ vertexShader WRITE setVertexShader NOTIFY vertexShaderChanged) public: - explicit QSGCustomParticle(QSGItem* parent=0); + explicit QSGCustomParticle(QQuickItem* parent=0); ~QSGCustomParticle(); QByteArray fragmentShader() const { return m_source.fragmentCode; } @@ -92,24 +92,24 @@ protected: void updateProperties(); void lookThroughShaderCode(const QByteArray &code); virtual void componentComplete(); - QSGShaderEffectNode *buildCustomNodes(); + QQuickShaderEffectNode *buildCustomNodes(); void performPendingResize(); private: void buildData(); bool m_dirtyData; - QSGShaderEffectProgram m_source; + QQuickShaderEffectProgram m_source; struct SourceData { QSignalMapper *mapper; - QPointer item; + QPointer item; QByteArray name; }; QVector m_sources; QSGShaderEffectMaterialObject *m_material; - QSGShaderEffectNode* m_rootNode; - QHash m_nodes; + QQuickShaderEffectNode* m_rootNode; + QHash m_nodes; qreal m_lastTime; }; diff --git a/src/declarative/particles/qsgfriction.cpp b/src/declarative/particles/qsgfriction.cpp index 44b08e3dc0..85a586b51c 100644 --- a/src/declarative/particles/qsgfriction.cpp +++ b/src/declarative/particles/qsgfriction.cpp @@ -59,7 +59,7 @@ static qreal sign(qreal a) return a >= 0 ? 1 : -1; } -QSGFrictionAffector::QSGFrictionAffector(QSGItem *parent) : +QSGFrictionAffector::QSGFrictionAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_factor(0.0) { } diff --git a/src/declarative/particles/qsgfriction_p.h b/src/declarative/particles/qsgfriction_p.h index 699a205b3a..e2b3a0c26d 100644 --- a/src/declarative/particles/qsgfriction_p.h +++ b/src/declarative/particles/qsgfriction_p.h @@ -55,7 +55,7 @@ class QSGFrictionAffector : public QSGParticleAffector Q_OBJECT Q_PROPERTY(qreal factor READ factor WRITE setFactor NOTIFY factorChanged) public: - explicit QSGFrictionAffector(QSGItem *parent = 0); + explicit QSGFrictionAffector(QQuickItem *parent = 0); qreal factor() const { diff --git a/src/declarative/particles/qsggravity.cpp b/src/declarative/particles/qsggravity.cpp index dd47f66443..2967f7a307 100644 --- a/src/declarative/particles/qsggravity.cpp +++ b/src/declarative/particles/qsggravity.cpp @@ -70,7 +70,7 @@ const qreal CONV = 0.017453292520444443; Angle of acceleration. */ -QSGGravityAffector::QSGGravityAffector(QSGItem *parent) : +QSGGravityAffector::QSGGravityAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_acceleration(-10), m_angle(90), m_xAcc(0), m_yAcc(0) { connect(this, SIGNAL(accelerationChanged(qreal)), diff --git a/src/declarative/particles/qsggravity_p.h b/src/declarative/particles/qsggravity_p.h index f96df1ab3a..42bf144465 100644 --- a/src/declarative/particles/qsggravity_p.h +++ b/src/declarative/particles/qsggravity_p.h @@ -56,7 +56,7 @@ class QSGGravityAffector : public QSGParticleAffector Q_PROPERTY(qreal acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged) Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) public: - explicit QSGGravityAffector(QSGItem *parent = 0); + explicit QSGGravityAffector(QQuickItem *parent = 0); qreal acceleration() const { return m_acceleration; diff --git a/src/declarative/particles/qsggroupgoal.cpp b/src/declarative/particles/qsggroupgoal.cpp index f380101bd6..78fa7866bc 100644 --- a/src/declarative/particles/qsggroupgoal.cpp +++ b/src/declarative/particles/qsggroupgoal.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include "qsggroupgoal_p.h" -#include -#include +#include +#include #include "qsgimageparticle_p.h" #include @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE Default is false. */ -QSGGroupGoalAffector::QSGGroupGoalAffector(QSGItem *parent) : +QSGGroupGoalAffector::QSGGroupGoalAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_jump(false) { } @@ -90,7 +90,7 @@ void QSGGroupGoalAffector::setGoalState(QString arg) bool QSGGroupGoalAffector::affectParticle(QSGParticleData *d, qreal dt) { Q_UNUSED(dt); - QSGStochasticEngine *engine = m_system->stateEngine; + QQuickStochasticEngine *engine = m_system->stateEngine; bool notUsingEngine = false; if (!engine) notUsingEngine = true; diff --git a/src/declarative/particles/qsggroupgoal_p.h b/src/declarative/particles/qsggroupgoal_p.h index 6357c3f13a..59ccb7a73f 100644 --- a/src/declarative/particles/qsggroupgoal_p.h +++ b/src/declarative/particles/qsggroupgoal_p.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGStochasticEngine; +class QQuickStochasticEngine; class QSGGroupGoalAffector : public QSGParticleAffector { @@ -57,7 +57,7 @@ class QSGGroupGoalAffector : public QSGParticleAffector Q_PROPERTY(QString goalState READ goalState WRITE setGoalState NOTIFY goalStateChanged) Q_PROPERTY(bool jump READ jump WRITE setJump NOTIFY jumpChanged) public: - explicit QSGGroupGoalAffector(QSGItem *parent = 0); + explicit QSGGroupGoalAffector(QQuickItem *parent = 0); QString goalState() const { diff --git a/src/declarative/particles/qsgimageparticle.cpp b/src/declarative/particles/qsgimageparticle.cpp index 02b3a7a92a..7791db6042 100644 --- a/src/declarative/particles/qsgimageparticle.cpp +++ b/src/declarative/particles/qsgimageparticle.cpp @@ -47,8 +47,8 @@ #include #include "qsgimageparticle_p.h" #include "qsgparticleemitter_p.h" -#include -#include +#include +#include #include #include #include @@ -797,7 +797,7 @@ void fillUniformArrayFromImage(float* array, const QImage& img, int size) */ -QSGImageParticle::QSGImageParticle(QSGItem* parent) +QSGImageParticle::QSGImageParticle(QQuickItem* parent) : QSGParticlePainter(parent) , m_color_variation(0.0) , m_rootNode(0) @@ -834,9 +834,9 @@ QSGImageParticle::~QSGImageParticle() { } -QDeclarativeListProperty QSGImageParticle::sprites() +QDeclarativeListProperty QSGImageParticle::sprites() { - return QDeclarativeListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); + return QDeclarativeListProperty(this, &m_sprites, spriteAppend, spriteCount, spriteAt, spriteClear); } void QSGImageParticle::setImage(const QUrl &image) @@ -1115,7 +1115,7 @@ void QSGImageParticle::createEngine() if (m_spriteEngine) delete m_spriteEngine; if (m_sprites.count()) - m_spriteEngine = new QSGSpriteEngine(m_sprites, this); + m_spriteEngine = new QQuickSpriteEngine(m_sprites, this); else m_spriteEngine = 0; m_explicitAnimation = true; diff --git a/src/declarative/particles/qsgimageparticle_p.h b/src/declarative/particles/qsgimageparticle_p.h index 89796da356..0836e3e8ec 100644 --- a/src/declarative/particles/qsgimageparticle_p.h +++ b/src/declarative/particles/qsgimageparticle_p.h @@ -56,8 +56,8 @@ QT_MODULE(Declarative) class ImageMaterialData; class QSGGeometryNode; -class QSGSprite; -class QSGStochasticEngine; +class QQuickSprite; +class QQuickStochasticEngine; struct SimpleVertex { float x; @@ -180,19 +180,19 @@ class QSGImageParticle : public QSGParticlePainter Q_PROPERTY(QSGDirection* xVector READ xVector WRITE setXVector NOTIFY xVectorChanged RESET resetDeformation) //yVector is the same, but top-left to bottom-left. The particle is always a parallelogram. Q_PROPERTY(QSGDirection* yVector READ yVector WRITE setYVector NOTIFY yVectorChanged RESET resetDeformation) - Q_PROPERTY(QDeclarativeListProperty sprites READ sprites) + Q_PROPERTY(QDeclarativeListProperty sprites READ sprites) Q_PROPERTY(bool spritesInterpolate READ spritesInterpolate WRITE setSpritesInterpolate NOTIFY spritesInterpolateChanged) Q_PROPERTY(EntryEffect entryEffect READ entryEffect WRITE setEntryEffect NOTIFY entryEffectChanged) Q_PROPERTY(bool bloat READ bloat WRITE setBloat NOTIFY bloatChanged)//Just a debugging property to bypass optimizations Q_ENUMS(EntryEffect) public: - explicit QSGImageParticle(QSGItem *parent = 0); + explicit QSGImageParticle(QQuickItem *parent = 0); virtual ~QSGImageParticle(); - QDeclarativeListProperty sprites(); - QSGStochasticEngine* spriteEngine() {return m_spriteEngine;} + QDeclarativeListProperty sprites(); + QQuickStochasticEngine* spriteEngine() {return m_spriteEngine;} enum EntryEffect { None = 0, @@ -381,8 +381,8 @@ private: QSGDirection* m_xVector; QSGDirection* m_yVector; - QList m_sprites; - QSGSpriteEngine* m_spriteEngine; + QList m_sprites; + QQuickSpriteEngine* m_spriteEngine; bool m_spritesInterpolate; bool m_explicitColor; diff --git a/src/declarative/particles/qsgitemparticle.cpp b/src/declarative/particles/qsgitemparticle.cpp index 20bd18d146..3be40dcaa1 100644 --- a/src/declarative/particles/qsgitemparticle.cpp +++ b/src/declarative/particles/qsgitemparticle.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qsgitemparticle_p.h" -#include +#include #include #include #include @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass ItemParticle QSGItemParticle + \qmlclass ItemParticle QQuickItemParticle \inqmlmodule QtQuick.Particles 2 \inherits ParticlePainter \brief The ItemParticle element allows you to specify your own delegate to paint particles. @@ -99,10 +99,10 @@ QT_BEGIN_NAMESPACE particle, and moved along with it. */ -QSGItemParticle::QSGItemParticle(QSGItem *parent) : +QQuickItemParticle::QQuickItemParticle(QQuickItem *parent) : QSGParticlePainter(parent), m_fade(true), m_delegate(0) { - setFlag(QSGItem::ItemHasContents); + setFlag(QQuickItem::ItemHasContents); QTimer* manageDelegates = new QTimer(this);//TODO: don't leak connect(manageDelegates, SIGNAL(timeout()), this, SLOT(tick())); @@ -112,18 +112,18 @@ QSGItemParticle::QSGItemParticle(QSGItem *parent) : } -void QSGItemParticle::freeze(QSGItem* item) +void QQuickItemParticle::freeze(QQuickItem* item) { m_stasis << item; } -void QSGItemParticle::unfreeze(QSGItem* item) +void QQuickItemParticle::unfreeze(QQuickItem* item) { m_stasis.remove(item); } -void QSGItemParticle::take(QSGItem *item, bool prioritize) +void QQuickItemParticle::take(QQuickItem *item, bool prioritize) { if (prioritize) m_pendingItems.push_front(item); @@ -131,28 +131,28 @@ void QSGItemParticle::take(QSGItem *item, bool prioritize) m_pendingItems.push_back(item); } -void QSGItemParticle::give(QSGItem *item) +void QQuickItemParticle::give(QQuickItem *item) { //TODO: This } -void QSGItemParticle::initialize(int gIdx, int pIdx) +void QQuickItemParticle::initialize(int gIdx, int pIdx) { m_loadables << m_system->groupData[gIdx]->data[pIdx];//defer to other thread } -void QSGItemParticle::commit(int, int) +void QQuickItemParticle::commit(int, int) { } -void QSGItemParticle::tick() +void QQuickItemParticle::tick() { - foreach (QSGItem* item, m_deletables){ + foreach (QQuickItem* item, m_deletables){ if (m_fade) item->setOpacity(0.); item->setVisible(false); - QSGItemParticleAttached* mpa; - if ((mpa = qobject_cast(qmlAttachedPropertiesObject(item)))) + QQuickItemParticleAttached* mpa; + if ((mpa = qobject_cast(qmlAttachedPropertiesObject(item)))) mpa->detach();//reparent as well? //TODO: Delete iff we created it m_activeCount--; @@ -170,12 +170,12 @@ void QSGItemParticle::tick() d->delegate = m_pendingItems.front(); m_pendingItems.pop_front(); }else if (m_delegate){ - d->delegate = qobject_cast(m_delegate->create(qmlContext(this))); + d->delegate = qobject_cast(m_delegate->create(qmlContext(this))); } if (d->delegate && d){//###Data can be zero if creating an item leads to a reset - this screws things up. d->delegate->setX(d->curX() - d->delegate->width()/2);//TODO: adjust for system? d->delegate->setY(d->curY() - d->delegate->height()/2); - QSGItemParticleAttached* mpa = qobject_cast(qmlAttachedPropertiesObject(d->delegate)); + QQuickItemParticleAttached* mpa = qobject_cast(qmlAttachedPropertiesObject(d->delegate)); if (mpa){ mpa->m_mp = this; mpa->attach(); @@ -190,7 +190,7 @@ void QSGItemParticle::tick() m_loadables.clear(); } -void QSGItemParticle::reset() +void QQuickItemParticle::reset() { QSGParticlePainter::reset(); //TODO: Cleanup items? @@ -199,7 +199,7 @@ void QSGItemParticle::reset() } -QSGNode* QSGItemParticle::updatePaintNode(QSGNode* n, UpdatePaintNodeData* d) +QSGNode* QQuickItemParticle::updatePaintNode(QSGNode* n, UpdatePaintNodeData* d) { //Dummy update just to get painting tick if (m_pleaseReset){ @@ -211,10 +211,10 @@ QSGNode* QSGItemParticle::updatePaintNode(QSGNode* n, UpdatePaintNodeData* d) update();//Get called again if (n) n->markDirty(QSGNode::DirtyMaterial); - return QSGItem::updatePaintNode(n,d); + return QQuickItem::updatePaintNode(n,d); } -void QSGItemParticle::prepareNextFrame() +void QQuickItemParticle::prepareNextFrame() { if (!m_system) return; @@ -232,7 +232,7 @@ void QSGItemParticle::prepareNextFrame() for (int i=0; igroupData[gIdx]->data[i]; - QSGItem* item = data->delegate; + QQuickItem* item = data->delegate; if (!item) continue; qreal t = ((timeStamp/1000.0) - data->t) / data->lifeSpan; @@ -260,9 +260,9 @@ void QSGItemParticle::prepareNextFrame() } } -QSGItemParticleAttached *QSGItemParticle::qmlAttachedProperties(QObject *object) +QQuickItemParticleAttached *QQuickItemParticle::qmlAttachedProperties(QObject *object) { - return new QSGItemParticleAttached(object); + return new QQuickItemParticleAttached(object); } QT_END_NAMESPACE diff --git a/src/declarative/particles/qsgitemparticle_p.h b/src/declarative/particles/qsgitemparticle_p.h index d18959525f..813f1ced79 100644 --- a/src/declarative/particles/qsgitemparticle_p.h +++ b/src/declarative/particles/qsgitemparticle_p.h @@ -49,22 +49,22 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGVisualDataModel; -class QSGItemParticleAttached; +class QQuickVisualDataModel; +class QQuickItemParticleAttached; -class QSGItemParticle : public QSGParticlePainter +class QQuickItemParticle : public QSGParticlePainter { Q_OBJECT Q_PROPERTY(bool fade READ fade WRITE setFade NOTIFY fadeChanged) Q_PROPERTY(QDeclarativeComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) public: - explicit QSGItemParticle(QSGItem *parent = 0); + explicit QQuickItemParticle(QQuickItem *parent = 0); bool fade() const { return m_fade; } virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *); - static QSGItemParticleAttached *qmlAttachedProperties(QObject *object); + static QQuickItemParticleAttached *qmlAttachedProperties(QObject *object); QDeclarativeComponent* delegate() const { return m_delegate; @@ -77,10 +77,10 @@ signals: public slots: //TODO: Add a follow mode, where moving the delegate causes the logical particle to go with it? - void freeze(QSGItem* item); - void unfreeze(QSGItem* item); - void take(QSGItem* item,bool prioritize=false);//take by modelparticle - void give(QSGItem* item);//give from modelparticle + void freeze(QQuickItem* item); + void unfreeze(QQuickItem* item); + void take(QQuickItem* item,bool prioritize=false);//take by modelparticle + void give(QQuickItem* item);//give from modelparticle void setFade(bool arg){if (arg == m_fade) return; m_fade = arg; emit fadeChanged();} void setDelegate(QDeclarativeComponent* arg) @@ -99,32 +99,32 @@ protected: private slots: void tick(); private: - QList m_deletables; + QList m_deletables; QList< QSGParticleData* > m_loadables; bool m_fade; - QList m_pendingItems; + QList m_pendingItems; QList m_available; - QSet m_stasis; + QSet m_stasis; qreal m_lastT; int m_activeCount; QDeclarativeComponent* m_delegate; }; -class QSGItemParticleAttached : public QObject +class QQuickItemParticleAttached : public QObject { Q_OBJECT - Q_PROPERTY(QSGItemParticle* particle READ particle CONSTANT); + Q_PROPERTY(QQuickItemParticle* particle READ particle CONSTANT); public: - QSGItemParticleAttached(QObject* parent) + QQuickItemParticleAttached(QObject* parent) : QObject(parent), m_mp(0) {;} - QSGItemParticle* particle() {return m_mp;} + QQuickItemParticle* particle() {return m_mp;} void detach(){emit detached();} void attach(){emit attached();} private: - QSGItemParticle* m_mp; - friend class QSGItemParticle; + QQuickItemParticle* m_mp; + friend class QQuickItemParticle; Q_SIGNALS: void detached(); void attached(); @@ -132,7 +132,7 @@ Q_SIGNALS: QT_END_NAMESPACE -QML_DECLARE_TYPEINFO(QSGItemParticle, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPEINFO(QQuickItemParticle, QML_HAS_ATTACHED_PROPERTIES) QT_END_HEADER #endif // ITEMPARTICLE_H diff --git a/src/declarative/particles/qsgmove.cpp b/src/declarative/particles/qsgmove.cpp index e885685d6d..9f13fad093 100644 --- a/src/declarative/particles/qsgmove.cpp +++ b/src/declarative/particles/qsgmove.cpp @@ -84,7 +84,7 @@ const qreal CONV = 0.017453292520444443; to the new one. */ -QSGMoveAffector::QSGMoveAffector(QSGItem *parent) +QSGMoveAffector::QSGMoveAffector(QQuickItem *parent) : QSGParticleAffector(parent) , m_position(&m_nullVector) , m_speed(&m_nullVector) diff --git a/src/declarative/particles/qsgmove_p.h b/src/declarative/particles/qsgmove_p.h index 2f7fc831f5..4ff5239357 100644 --- a/src/declarative/particles/qsgmove_p.h +++ b/src/declarative/particles/qsgmove_p.h @@ -60,7 +60,7 @@ class QSGMoveAffector : public QSGParticleAffector Q_PROPERTY(QSGDirection *acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged RESET accelerationReset) public: - explicit QSGMoveAffector(QSGItem *parent = 0); + explicit QSGMoveAffector(QQuickItem *parent = 0); QSGDirection * position() const { return m_position; diff --git a/src/declarative/particles/qsgparticleaffector.cpp b/src/declarative/particles/qsgparticleaffector.cpp index 24bddea5f7..2758e93a5f 100644 --- a/src/declarative/particles/qsgparticleaffector.cpp +++ b/src/declarative/particles/qsgparticleaffector.cpp @@ -126,8 +126,8 @@ QT_BEGIN_NAMESPACE x,y is the particles current position. */ -QSGParticleAffector::QSGParticleAffector(QSGItem *parent) : - QSGItem(parent), m_needsReset(false), m_system(0), m_enabled(true) +QSGParticleAffector::QSGParticleAffector(QQuickItem *parent) : + QQuickItem(parent), m_needsReset(false), m_system(0), m_enabled(true) , m_updateIntSet(false), m_shape(new QSGParticleExtruder(this)) { } @@ -143,7 +143,7 @@ void QSGParticleAffector::componentComplete() { if (!m_system && qobject_cast(parentItem())) setSystem(qobject_cast(parentItem())); - QSGItem::componentComplete(); + QQuickItem::componentComplete(); } bool QSGParticleAffector::activeGroup(int g) { diff --git a/src/declarative/particles/qsgparticleaffector_p.h b/src/declarative/particles/qsgparticleaffector_p.h index c46164de5c..bc6864e415 100644 --- a/src/declarative/particles/qsgparticleaffector_p.h +++ b/src/declarative/particles/qsgparticleaffector_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGParticleAffector : public QSGItem +class QSGParticleAffector : public QQuickItem { Q_OBJECT Q_PROPERTY(QSGParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) @@ -63,7 +63,7 @@ class QSGParticleAffector : public QSGItem Q_PROPERTY(QSGParticleExtruder* shape READ shape WRITE setShape NOTIFY shapeChanged) public: - explicit QSGParticleAffector(QSGItem *parent = 0); + explicit QSGParticleAffector(QQuickItem *parent = 0); virtual void affectSystem(qreal dt); virtual void reset(QSGParticleData*);//As some store their own data per particle? QSGParticleSystem* system() const diff --git a/src/declarative/particles/qsgparticleemitter.cpp b/src/declarative/particles/qsgparticleemitter.cpp index e453888b03..f9a35a1d8c 100644 --- a/src/declarative/particles/qsgparticleemitter.cpp +++ b/src/declarative/particles/qsgparticleemitter.cpp @@ -212,8 +212,8 @@ QT_BEGIN_NAMESPACE it back off. */ -QSGParticleEmitter::QSGParticleEmitter(QSGItem *parent) : - QSGItem(parent) +QSGParticleEmitter::QSGParticleEmitter(QQuickItem *parent) : + QQuickItem(parent) , m_particlesPerSecond(10) , m_particleDuration(1000) , m_particleDurationVariation(0) @@ -261,7 +261,7 @@ void QSGParticleEmitter::componentComplete() { if (!m_system && qobject_cast(parentItem())) setSystem(qobject_cast(parentItem())); - QSGItem::componentComplete(); + QQuickItem::componentComplete(); } void QSGParticleEmitter::setEnabled(bool arg) diff --git a/src/declarative/particles/qsgparticleemitter_p.h b/src/declarative/particles/qsgparticleemitter_p.h index 8a41cb607d..0099c69144 100644 --- a/src/declarative/particles/qsgparticleemitter_p.h +++ b/src/declarative/particles/qsgparticleemitter_p.h @@ -42,7 +42,7 @@ #ifndef PARTICLEEMITTER_H #define PARTICLEEMITTER_H -#include +#include #include #include "qsgparticlesystem_p.h" #include "qsgparticleextruder_p.h" @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGParticleEmitter : public QSGItem +class QSGParticleEmitter : public QQuickItem { Q_OBJECT Q_PROPERTY(QSGParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) @@ -81,7 +81,7 @@ class QSGParticleEmitter : public QSGItem Q_ENUMS(Lifetime) public: - explicit QSGParticleEmitter(QSGItem *parent = 0); + explicit QSGParticleEmitter(QQuickItem *parent = 0); virtual ~QSGParticleEmitter(); virtual void emitWindow(int timeStamp); diff --git a/src/declarative/particles/qsgparticlegroup.cpp b/src/declarative/particles/qsgparticlegroup.cpp index bcccf3c3df..c4eded93e6 100644 --- a/src/declarative/particles/qsgparticlegroup.cpp +++ b/src/declarative/particles/qsgparticlegroup.cpp @@ -90,7 +90,7 @@ */ QSGParticleGroup::QSGParticleGroup(QObject* parent) - : QSGStochasticState(parent) + : QQuickStochasticState(parent) , m_system(0) { diff --git a/src/declarative/particles/qsgparticlegroup_p.h b/src/declarative/particles/qsgparticlegroup_p.h index 26bed55785..f30539f686 100644 --- a/src/declarative/particles/qsgparticlegroup_p.h +++ b/src/declarative/particles/qsgparticlegroup_p.h @@ -40,13 +40,13 @@ ****************************************************************************/ #ifndef QSGPARTICLEGROUP #define QSGPARTICLEGROUP -#include +#include #include "qsgparticlesystem_p.h" #include "qdeclarativeparserstatus.h" QT_BEGIN_NAMESPACE -class QSGParticleGroup : public QSGStochasticState, public QDeclarativeParserStatus +class QSGParticleGroup : public QQuickStochasticState, public QDeclarativeParserStatus { Q_OBJECT //### Would setting limits per group be useful? Or clutter the API? diff --git a/src/declarative/particles/qsgparticlepainter.cpp b/src/declarative/particles/qsgparticlepainter.cpp index 4f6b18c973..c89e2ef560 100644 --- a/src/declarative/particles/qsgparticlepainter.cpp +++ b/src/declarative/particles/qsgparticlepainter.cpp @@ -63,8 +63,8 @@ QT_BEGIN_NAMESPACE If empty, it will paint the default particle group (""). */ -QSGParticlePainter::QSGParticlePainter(QSGItem *parent) : - QSGItem(parent), +QSGParticlePainter::QSGParticlePainter(QQuickItem *parent) : + QQuickItem(parent), m_system(0), m_count(0), m_pleaseReset(true), m_sentinel(new QSGParticleData(0)) { } @@ -73,7 +73,7 @@ void QSGParticlePainter::componentComplete() { if (!m_system && qobject_cast(parentItem())) setSystem(qobject_cast(parentItem())); - QSGItem::componentComplete(); + QQuickItem::componentComplete(); } diff --git a/src/declarative/particles/qsgparticlepainter_p.h b/src/declarative/particles/qsgparticlepainter_p.h index 78e0127eac..32b7224df3 100644 --- a/src/declarative/particles/qsgparticlepainter_p.h +++ b/src/declarative/particles/qsgparticlepainter_p.h @@ -54,14 +54,14 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGParticlePainter : public QSGItem +class QSGParticlePainter : public QQuickItem { Q_OBJECT Q_PROPERTY(QSGParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged) public: - explicit QSGParticlePainter(QSGItem *parent = 0); + explicit QSGParticlePainter(QQuickItem *parent = 0); //Data Interface to system void load(QSGParticleData*); void reload(QSGParticleData*); diff --git a/src/declarative/particles/qsgparticlesmodule.cpp b/src/declarative/particles/qsgparticlesmodule.cpp index fe2dec9c48..9e73b82527 100644 --- a/src/declarative/particles/qsgparticlesmodule.cpp +++ b/src/declarative/particles/qsgparticlesmodule.cpp @@ -82,7 +82,7 @@ void QSGParticlesModule::defineModule() qmlRegisterType(uri, 2, 0, "ImageParticle"); qmlRegisterType(uri, 2, 0, "CustomParticle"); - qmlRegisterType(uri, 2, 0, "ItemParticle"); + qmlRegisterType(uri, 2, 0, "ItemParticle"); qmlRegisterType(uri, 2, 0, "Emitter"); qmlRegisterType(uri, 2, 0, "TrailEmitter"); diff --git a/src/declarative/particles/qsgparticlesystem.cpp b/src/declarative/particles/qsgparticlesystem.cpp index 1b01081a67..0523563843 100644 --- a/src/declarative/particles/qsgparticlesystem.cpp +++ b/src/declarative/particles/qsgparticlesystem.cpp @@ -44,8 +44,8 @@ #include "qsgparticleemitter_p.h" #include "qsgparticleaffector_p.h" #include "qsgparticlepainter_p.h" -#include -#include +#include +#include #include "qsgv8particledata_p.h" #include "qsgparticlegroup_p.h" @@ -616,8 +616,8 @@ void QSGParticleData::extendLife(float time) vy = evy; } -QSGParticleSystem::QSGParticleSystem(QSGItem *parent) : - QSGItem(parent), +QSGParticleSystem::QSGParticleSystem(QQuickItem *parent) : + QQuickItem(parent), stateEngine(0), m_running(true), particleCount(0), @@ -756,7 +756,7 @@ void QSGParticleSystem::stateRedirect(QSGParticleGroup* group, QSGParticleSystem void QSGParticleSystem::componentComplete() { - QSGItem::componentComplete(); + QQuickItem::componentComplete(); m_componentComplete = true; m_animation = new QSGParticleSystemAnimation(this); reset();//restarts animation as well @@ -925,12 +925,12 @@ void QSGParticleSystem::createEngine() } } m_groups = newList; - QList states; + QList states; foreach (QSGParticleGroup* g, m_groups) - states << (QSGStochasticState*)g; + states << (QQuickStochasticState*)g; if (!stateEngine) - stateEngine = new QSGStochasticEngine(this); + stateEngine = new QQuickStochasticEngine(this); stateEngine->setCount(particleCount); stateEngine->m_states = states; diff --git a/src/declarative/particles/qsgparticlesystem_p.h b/src/declarative/particles/qsgparticlesystem_p.h index 37fcbac6a8..714b536e45 100644 --- a/src/declarative/particles/qsgparticlesystem_p.h +++ b/src/declarative/particles/qsgparticlesystem_p.h @@ -42,13 +42,13 @@ #ifndef PARTICLESYSTEM_H #define PARTICLESYSTEM_H -#include +#include #include #include #include #include #include -#include +#include #include #include #include //For QDeclarativeV8Handle @@ -65,8 +65,8 @@ class QSGParticleEmitter; class QSGParticlePainter; class QSGParticleData; class QSGParticleSystemAnimation; -class QSGStochasticEngine; -class QSGSprite; +class QQuickStochasticEngine; +class QQuickSprite; class QSGV8ParticleData; class QSGParticleGroup; class QSGImageParticle; @@ -208,7 +208,7 @@ public: float animWidth; float animHeight; float r; - QSGItem* delegate; + QQuickItem* delegate; int modelIndex; float update;//Used by custom affectors @@ -229,7 +229,7 @@ private: QSGV8ParticleData* v8Datum; }; -class Q_AUTOTEST_EXPORT QSGParticleSystem : public QSGItem +class Q_AUTOTEST_EXPORT QSGParticleSystem : public QQuickItem { Q_OBJECT Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) @@ -237,7 +237,7 @@ class Q_AUTOTEST_EXPORT QSGParticleSystem : public QSGItem Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged) public: - explicit QSGParticleSystem(QSGItem *parent = 0); + explicit QSGParticleSystem(QQuickItem *parent = 0); ~QSGParticleSystem(); bool isRunning() const @@ -296,7 +296,7 @@ public: QVector bySysIdx; //Another reference to the data (data owned by group), but by sysIdx QHash groupIds; QHash groupData; - QSGStochasticEngine* stateEngine; + QQuickStochasticEngine* stateEngine; //Also only here for auto-test usage void updateCurrentTime( int currentTime ); diff --git a/src/declarative/particles/qsgpointattractor.cpp b/src/declarative/particles/qsgpointattractor.cpp index 093e55b16c..8fb7551018 100644 --- a/src/declarative/particles/qsgpointattractor.cpp +++ b/src/declarative/particles/qsgpointattractor.cpp @@ -105,7 +105,7 @@ QT_BEGIN_NAMESPACE */ -QSGAttractorAffector::QSGAttractorAffector(QSGItem *parent) : +QSGAttractorAffector::QSGAttractorAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_strength(0.0), m_x(0), m_y(0) , m_physics(Velocity), m_proportionalToDistance(Linear) { diff --git a/src/declarative/particles/qsgpointattractor_p.h b/src/declarative/particles/qsgpointattractor_p.h index 75dd47e331..b7dcf62fc4 100644 --- a/src/declarative/particles/qsgpointattractor_p.h +++ b/src/declarative/particles/qsgpointattractor_p.h @@ -75,7 +75,7 @@ public: Acceleration }; - explicit QSGAttractorAffector(QSGItem *parent = 0); + explicit QSGAttractorAffector(QQuickItem *parent = 0); qreal strength() const { diff --git a/src/declarative/particles/qsgspritegoal.cpp b/src/declarative/particles/qsgspritegoal.cpp index 260929f28f..4765eb2331 100644 --- a/src/declarative/particles/qsgspritegoal.cpp +++ b/src/declarative/particles/qsgspritegoal.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include "qsgspritegoal_p.h" -#include -#include +#include +#include #include "qsgimageparticle_p.h" #include @@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE deprecated, use GroupGoal instead */ -QSGSpriteGoalAffector::QSGSpriteGoalAffector(QSGItem *parent) : +QSGSpriteGoalAffector::QSGSpriteGoalAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_goalIdx(-1), m_lastEngine(0), @@ -89,7 +89,7 @@ QSGSpriteGoalAffector::QSGSpriteGoalAffector(QSGItem *parent) : { } -void QSGSpriteGoalAffector::updateStateIndex(QSGStochasticEngine* e) +void QSGSpriteGoalAffector::updateStateIndex(QQuickStochasticEngine* e) { if (m_systemStates){ m_goalIdx = m_system->groupIds[m_goalState]; @@ -120,7 +120,7 @@ void QSGSpriteGoalAffector::setGoalState(QString arg) bool QSGSpriteGoalAffector::affectParticle(QSGParticleData *d, qreal dt) { Q_UNUSED(dt); - QSGStochasticEngine *engine = 0; + QQuickStochasticEngine *engine = 0; if (!m_systemStates){ //TODO: Affect all engines foreach (QSGParticlePainter *p, m_system->groupData[d->group]->painters) diff --git a/src/declarative/particles/qsgspritegoal_p.h b/src/declarative/particles/qsgspritegoal_p.h index 7f20b1ed8a..bdb86d7705 100644 --- a/src/declarative/particles/qsgspritegoal_p.h +++ b/src/declarative/particles/qsgspritegoal_p.h @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGStochasticEngine; +class QQuickStochasticEngine; class QSGSpriteGoalAffector : public QSGParticleAffector { @@ -59,7 +59,7 @@ class QSGSpriteGoalAffector : public QSGParticleAffector Q_PROPERTY(bool jump READ jump WRITE setJump NOTIFY jumpChanged) Q_PROPERTY(bool systemStates READ systemStates WRITE setSystemStates NOTIFY systemStatesChanged) public: - explicit QSGSpriteGoalAffector(QSGItem *parent = 0); + explicit QSGSpriteGoalAffector(QQuickItem *parent = 0); QString goalState() const { @@ -108,10 +108,10 @@ void setSystemStates(bool arg) } private: - void updateStateIndex(QSGStochasticEngine* e); + void updateStateIndex(QQuickStochasticEngine* e); QString m_goalState; int m_goalIdx; - QSGStochasticEngine* m_lastEngine; + QQuickStochasticEngine* m_lastEngine; bool m_jump; bool m_systemStates; diff --git a/src/declarative/particles/qsgtargetaffector.cpp b/src/declarative/particles/qsgtargetaffector.cpp index d84bd4dada..86f325075e 100644 --- a/src/declarative/particles/qsgtargetaffector.cpp +++ b/src/declarative/particles/qsgtargetaffector.cpp @@ -42,7 +42,7 @@ #include "qsgtargetaffector_p.h" #include -QSGTargetAffector::QSGTargetAffector(QSGItem *parent) : +QSGTargetAffector::QSGTargetAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_targetX(0), m_targetY(0), m_targetWidth(0), m_targetHeight(0), m_defaultShape(new QSGParticleExtruder(this)), m_targetShape(m_defaultShape), m_targetTime(-1) diff --git a/src/declarative/particles/qsgtargetaffector_p.h b/src/declarative/particles/qsgtargetaffector_p.h index a869fe25d4..264ba30504 100644 --- a/src/declarative/particles/qsgtargetaffector_p.h +++ b/src/declarative/particles/qsgtargetaffector_p.h @@ -55,7 +55,7 @@ class QSGTargetAffector : public QSGParticleAffector Q_PROPERTY(int targetTime READ targetTime WRITE setTargetTime NOTIFY targetTimeChanged) public: - explicit QSGTargetAffector(QSGItem *parent = 0); + explicit QSGTargetAffector(QQuickItem *parent = 0); int targetX() const { diff --git a/src/declarative/particles/qsgtargetdirection_p.h b/src/declarative/particles/qsgtargetdirection_p.h index 75c3e08cdb..5a412ee870 100644 --- a/src/declarative/particles/qsgtargetdirection_p.h +++ b/src/declarative/particles/qsgtargetdirection_p.h @@ -48,14 +48,14 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGItem; +class QQuickItem; class QSGTargetDirection : public QSGDirection { Q_OBJECT Q_PROPERTY(qreal targetX READ targetX WRITE setTargetX NOTIFY targetXChanged) Q_PROPERTY(qreal targetY READ targetY WRITE setTargetY NOTIFY targetYChanged) //If targetItem is set, X/Y are ignored. Aims at middle of item, use variation for variation - Q_PROPERTY(QSGItem* targetItem READ targetItem WRITE setTargetItem NOTIFY targetItemChanged) + Q_PROPERTY(QQuickItem* targetItem READ targetItem WRITE setTargetItem NOTIFY targetItemChanged) Q_PROPERTY(qreal targetVariation READ targetVariation WRITE setTargetVariation NOTIFY targetVariationChanged) @@ -98,7 +98,7 @@ public: return m_magnitudeVariation; } - QSGItem* targetItem() const + QQuickItem* targetItem() const { return m_targetItem; } @@ -117,7 +117,7 @@ signals: void magnitudeVariationChanged(qreal arg); - void targetItemChanged(QSGItem* arg); + void targetItemChanged(QQuickItem* arg); public slots: void setTargetX(qreal arg) @@ -168,7 +168,7 @@ public slots: } } - void setTargetItem(QSGItem* arg) + void setTargetItem(QQuickItem* arg) { if (m_targetItem != arg) { m_targetItem = arg; @@ -183,7 +183,7 @@ private: bool m_proportionalMagnitude; qreal m_magnitude; qreal m_magnitudeVariation; - QSGItem *m_targetItem; + QQuickItem *m_targetItem; }; QT_END_NAMESPACE diff --git a/src/declarative/particles/qsgtrailemitter.cpp b/src/declarative/particles/qsgtrailemitter.cpp index 4298908c89..08818ec085 100644 --- a/src/declarative/particles/qsgtrailemitter.cpp +++ b/src/declarative/particles/qsgtrailemitter.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE This element emits logical particles into the ParticleSystem, with the starting positions based on those of other logical particles. */ -QSGTrailEmitter::QSGTrailEmitter(QSGItem *parent) : +QSGTrailEmitter::QSGTrailEmitter(QQuickItem *parent) : QSGParticleEmitter(parent) , m_particlesPerParticlePerSecond(0) , m_lastTimeStamp(0) diff --git a/src/declarative/particles/qsgtrailemitter_p.h b/src/declarative/particles/qsgtrailemitter_p.h index 255dd85cef..a629f56695 100644 --- a/src/declarative/particles/qsgtrailemitter_p.h +++ b/src/declarative/particles/qsgtrailemitter_p.h @@ -66,7 +66,7 @@ public: enum EmitSize { ParticleSize = -2//Anything less than 0 will do }; - explicit QSGTrailEmitter(QSGItem *parent = 0); + explicit QSGTrailEmitter(QQuickItem *parent = 0); virtual void emitWindow(int timeStamp); virtual void reset(); diff --git a/src/declarative/particles/qsgturbulence.cpp b/src/declarative/particles/qsgturbulence.cpp index 30d36cccb9..957f6f1f62 100644 --- a/src/declarative/particles/qsgturbulence.cpp +++ b/src/declarative/particles/qsgturbulence.cpp @@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE A default image will be used if none is provided. */ -QSGTurbulenceAffector::QSGTurbulenceAffector(QSGItem *parent) : +QSGTurbulenceAffector::QSGTurbulenceAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_strength(10), m_lastT(0), m_gridSize(0), m_field(0), m_vectorField(0), m_inited(false) { diff --git a/src/declarative/particles/qsgturbulence_p.h b/src/declarative/particles/qsgturbulence_p.h index ef3e9ec678..022bf3577b 100644 --- a/src/declarative/particles/qsgturbulence_p.h +++ b/src/declarative/particles/qsgturbulence_p.h @@ -59,7 +59,7 @@ class QSGTurbulenceAffector : public QSGParticleAffector Q_PROPERTY(qreal strength READ strength WRITE setStrength NOTIFY strengthChanged) Q_PROPERTY(QUrl noiseSource READ noiseSource WRITE setNoiseSource NOTIFY noiseSourceChanged) public: - explicit QSGTurbulenceAffector(QSGItem *parent = 0); + explicit QSGTurbulenceAffector(QQuickItem *parent = 0); ~QSGTurbulenceAffector(); virtual void affectSystem(qreal dt); diff --git a/src/declarative/particles/qsgv8particledata.cpp b/src/declarative/particles/qsgv8particledata.cpp index 7e2d7ae443..a7a2e103a2 100644 --- a/src/declarative/particles/qsgv8particledata.cpp +++ b/src/declarative/particles/qsgv8particledata.cpp @@ -193,7 +193,7 @@ QT_BEGIN_NAMESPACE -//### Particle data handles are not locked to within certain scopes like QSGContext2D, but there's no way to reload either... +//### Particle data handles are not locked to within certain scopes like QQuickContext2D, but there's no way to reload either... class QV8ParticleDataResource : public QV8ObjectResource { V8_RESOURCE_TYPE(ParticleDataType) diff --git a/src/declarative/particles/qsgwander.cpp b/src/declarative/particles/qsgwander.cpp index d3e87fb241..2a861c2ce6 100644 --- a/src/declarative/particles/qsgwander.cpp +++ b/src/declarative/particles/qsgwander.cpp @@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE \endlist */ -QSGWanderAffector::QSGWanderAffector(QSGItem *parent) : +QSGWanderAffector::QSGWanderAffector(QQuickItem *parent) : QSGParticleAffector(parent), m_xVariance(0), m_yVariance(0), m_pace(0) , m_affectedParameter(Velocity) { diff --git a/src/declarative/particles/qsgwander_p.h b/src/declarative/particles/qsgwander_p.h index 46ad6ea3a2..6447e2f49e 100644 --- a/src/declarative/particles/qsgwander_p.h +++ b/src/declarative/particles/qsgwander_p.h @@ -76,7 +76,7 @@ public: Acceleration }; - explicit QSGWanderAffector(QSGItem *parent = 0); + explicit QSGWanderAffector(QQuickItem *parent = 0); ~QSGWanderAffector(); virtual void reset(int systemIdx); -- cgit v1.2.3