diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-07-04 18:15:28 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-06 10:09:09 +0200 |
commit | 29c4b643272a43022081cce063394bac823ab529 (patch) | |
tree | 10e4fe15bdf68dec90edac0d67b949a92d9204d5 /src/declarative/particles/qsgcumulativedirection_p.h | |
parent | 87822d24df32311a50dc87ded55ad4d17e8226f0 (diff) |
Squashed Particle System Stateful Rewrite
Add TargetAffector
Fix for ParticlePainter offsets
Adds a particleStates property to ParticleSystem
Augment SpriteGoal to change system states as well
Also add 'collidingParticles' list to affector.
Particle Stochastic States Now actually working, and you can put
emitters, affectors and painters inside their targeted state.
Fireworks example uses states instead of delegates.
Replaced the delegate example with a text thing.
The examples launcher now also contains all the custom examples.
Adds CumulativeDirection and working null Affector (for affected
signal).
Add spaces after all flow control keywords.
Change-Id: I77b7e3044a9800dbfff6db833914d63127602cf5
Reviewed-on: http://codereview.qt.nokia.com/968
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/declarative/particles/qsgcumulativedirection_p.h')
-rw-r--r-- | src/declarative/particles/qsgcumulativedirection_p.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/declarative/particles/qsgcumulativedirection_p.h b/src/declarative/particles/qsgcumulativedirection_p.h new file mode 100644 index 0000000000..aad003a7ce --- /dev/null +++ b/src/declarative/particles/qsgcumulativedirection_p.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Declarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSGCUMULATIVEDIRECTION_P_H +#define QSGCUMULATIVEDIRECTION_P_H +#include "qsgstochasticdirection_p.h" +#include <QDeclarativeListProperty> +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QSGCumulativeDirection : public QSGStochasticDirection +{ + Q_OBJECT + Q_PROPERTY(QDeclarativeListProperty<QSGStochasticDirection> directions READ directions) + Q_CLASSINFO("DefaultProperty", "directions") +public: + explicit QSGCumulativeDirection(QObject *parent = 0); + QDeclarativeListProperty<QSGStochasticDirection> directions(); + const QPointF &sample(const QPointF &from); +private: + QList<QSGStochasticDirection*> m_directions; +}; +#endif // QSGCUMULATIVEDIRECTION_P_H |