0ca48b8f61c19be8a1d5f074fd2a0a1ca9f905fc
[profile/ivi/qtdeclarative.git] / src / quick / particles / qquickparticlesmodule.cpp
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: http://www.qt-project.org/
6 **
7 ** This file is part of the Declarative module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 **
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 **
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
29 **
30 ** Other Usage
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
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"
71
72 QT_BEGIN_NAMESPACE
73
74 void QQuickParticlesModule::defineModule()
75 {
76     const char* uri = "QtQuick.Particles";
77
78     qmlRegisterType<QQuickParticleSystem>(uri, 2, 0, "ParticleSystem");
79     qmlRegisterType<QQuickParticleGroup>(uri, 2, 0, "ParticleGroup");
80
81     qmlRegisterType<QQuickImageParticle>(uri, 2, 0, "ImageParticle");
82     qmlRegisterType<QQuickCustomParticle>(uri, 2, 0, "CustomParticle");
83     qmlRegisterType<QQuickItemParticle>(uri, 2, 0, "ItemParticle");
84
85     qmlRegisterType<QQuickParticleEmitter>(uri, 2, 0, "Emitter");
86     qmlRegisterType<QQuickTrailEmitter>(uri, 2, 0, "TrailEmitter");
87
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");
92
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");
97
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");
107
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."));
117 }
118
119 QT_END_NAMESPACE
120