1 /****************************************************************************
3 ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
6 ** This file is part of the QtQuick module of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
40 ****************************************************************************/
42 #include "qquickangledirection_p.h"
43 #include "qquickcustomparticle_p.h"
44 #include "qquickellipseextruder_p.h"
45 #include "qquicktrailemitter_p.h"
46 #include "qquickfriction_p.h"
47 #include "qquickgravity_p.h"
48 #include "qquickimageparticle_p.h"
49 #include "qquickitemparticle_p.h"
50 #include "qquickage_p.h"
51 #include "qquicklineextruder_p.h"
52 #include "qquickmaskextruder_p.h"
53 #include "qquickparticleaffector_p.h"
54 #include "qquickparticleemitter_p.h"
55 #include "qquickparticleextruder_p.h"
56 #include "qquickparticlepainter_p.h"
57 #include "qquickparticlesmodule_p.h"
58 #include "qquickparticlesystem_p.h"
59 #include "qquickpointattractor_p.h"
60 #include "qquickpointdirection_p.h"
61 #include "qquickspritegoal_p.h"
62 #include "qquickdirection_p.h"
63 #include "qquicktargetdirection_p.h"
64 #include "qquickturbulence_p.h"
65 #include "qquickwander_p.h"
66 #include "qquickcumulativedirection_p.h"
67 #include "qquickcustomaffector_p.h"
68 #include "qquickrectangleextruder_p.h"
69 #include "qquickparticlegroup_p.h"
70 #include "qquickgroupgoal_p.h"
74 void QQuickParticlesModule::defineModule()
76 const char* uri = "QtQuick.Particles";
78 qmlRegisterType<QQuickParticleSystem>(uri, 2, 0, "ParticleSystem");
79 qmlRegisterType<QQuickParticleGroup>(uri, 2, 0, "ParticleGroup");
81 qmlRegisterType<QQuickImageParticle>(uri, 2, 0, "ImageParticle");
82 qmlRegisterType<QQuickCustomParticle>(uri, 2, 0, "CustomParticle");
83 qmlRegisterType<QQuickItemParticle>(uri, 2, 0, "ItemParticle");
85 qmlRegisterType<QQuickParticleEmitter>(uri, 2, 0, "Emitter");
86 qmlRegisterType<QQuickTrailEmitter>(uri, 2, 0, "TrailEmitter");
88 qmlRegisterType<QQuickEllipseExtruder>(uri, 2, 0, "EllipseShape");
89 qmlRegisterType<QQuickRectangleExtruder>(uri, 2, 0, "RectangleShape");
90 qmlRegisterType<QQuickLineExtruder>(uri, 2, 0, "LineShape");
91 qmlRegisterType<QQuickMaskExtruder>(uri, 2, 0, "MaskShape");
93 qmlRegisterType<QQuickPointDirection>(uri, 2, 0, "PointDirection");
94 qmlRegisterType<QQuickAngleDirection>(uri, 2, 0, "AngleDirection");
95 qmlRegisterType<QQuickTargetDirection>(uri, 2, 0, "TargetDirection");
96 qmlRegisterType<QQuickCumulativeDirection>(uri, 2, 0, "CumulativeDirection");
98 qmlRegisterType<QQuickCustomAffector>(uri, 2, 0, "Affector");
99 qmlRegisterType<QQuickWanderAffector>(uri, 2, 0, "Wander");
100 qmlRegisterType<QQuickFrictionAffector>(uri, 2, 0, "Friction");
101 qmlRegisterType<QQuickAttractorAffector>(uri, 2, 0, "Attractor");
102 qmlRegisterType<QQuickGravityAffector>(uri, 2, 0, "Gravity");
103 qmlRegisterType<QQuickAgeAffector>(uri, 2, 0, "Age");
104 qmlRegisterType<QQuickSpriteGoalAffector>(uri, 2, 0, "SpriteGoal");
105 qmlRegisterType<QQuickGroupGoalAffector>(uri, 2, 0, "GroupGoal");
106 qmlRegisterType<QQuickTurbulenceAffector>(uri, 2, 0 , "Turbulence");
108 //Exposed just for completeness
109 qmlRegisterUncreatableType<QQuickParticleAffector>(uri, 2, 0, "ParticleAffector",
110 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
111 qmlRegisterUncreatableType<QQuickParticlePainter>(uri, 2, 0, "ParticlePainter",
112 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
113 qmlRegisterUncreatableType<QQuickParticleExtruder>(uri, 2, 0, "ParticleExtruder",
114 QStringLiteral("Abstract type. Use one of the inheriting types instead."));
115 qmlRegisterUncreatableType<QQuickDirection>(uri, 2, 0, "NullVector",
116 QStringLiteral("Abstract type. Use one of the inheriting types instead."));