|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the QtDeclarative module of the Qt Toolkit. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #include "private/qdeclarativeutilmodule_p.h" |
|
43 #include "private/qdeclarativeanimation_p.h" |
|
44 #include "private/qdeclarativeanimation_p_p.h" |
|
45 #include "private/qdeclarativebehavior_p.h" |
|
46 #include "private/qdeclarativebind_p.h" |
|
47 #include "private/qdeclarativeconnections_p.h" |
|
48 #include "private/qdeclarativesmoothedanimation_p.h" |
|
49 #include "private/qdeclarativesmoothedfollow_p.h" |
|
50 #include "private/qdeclarativefontloader_p.h" |
|
51 #include "private/qdeclarativelistaccessor_p.h" |
|
52 #include "private/qdeclarativelistmodel_p.h" |
|
53 #include "private/qdeclarativenullablevalue_p_p.h" |
|
54 #include "private/qdeclarativeopenmetaobject_p.h" |
|
55 #include "private/qdeclarativepackage_p.h" |
|
56 #include "private/qdeclarativepixmapcache_p.h" |
|
57 #include "private/qdeclarativepropertychanges_p.h" |
|
58 #include "qdeclarativepropertymap.h" |
|
59 #include "private/qdeclarativespringfollow_p.h" |
|
60 #include "private/qdeclarativestategroup_p.h" |
|
61 #include "private/qdeclarativestateoperations_p.h" |
|
62 #include "private/qdeclarativestate_p.h" |
|
63 #include "private/qdeclarativestate_p_p.h" |
|
64 #include "private/qdeclarativestyledtext_p.h" |
|
65 #include "private/qdeclarativesystempalette_p.h" |
|
66 #include "private/qdeclarativetimeline_p_p.h" |
|
67 #include "private/qdeclarativetimer_p.h" |
|
68 #include "private/qdeclarativetransitionmanager_p_p.h" |
|
69 #include "private/qdeclarativetransition_p.h" |
|
70 #include "qdeclarativeview.h" |
|
71 #include "qdeclarativeinfo.h" |
|
72 #include "private/qdeclarativetypenotavailable_p.h" |
|
73 #ifndef QT_NO_XMLPATTERNS |
|
74 #include "private/qdeclarativexmllistmodel_p.h" |
|
75 #endif |
|
76 |
|
77 void QDeclarativeUtilModule::defineModule() |
|
78 { |
|
79 qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,7,"AnchorAnimation"); |
|
80 qmlRegisterType<QDeclarativeAnchorChanges>("Qt",4,7,"AnchorChanges"); |
|
81 qmlRegisterType<QDeclarativeBehavior>("Qt",4,7,"Behavior"); |
|
82 qmlRegisterType<QDeclarativeBind>("Qt",4,7,"Binding"); |
|
83 qmlRegisterType<QDeclarativeColorAnimation>("Qt",4,7,"ColorAnimation"); |
|
84 qmlRegisterType<QDeclarativeConnections>("Qt",4,7,"Connections"); |
|
85 qmlRegisterType<QDeclarativeSmoothedAnimation>("Qt",4,7,"SmoothedAnimation"); |
|
86 qmlRegisterType<QDeclarativeSmoothedFollow>("Qt",4,7,"SmoothedFollow"); |
|
87 qmlRegisterType<QDeclarativeFontLoader>("Qt",4,7,"FontLoader"); |
|
88 qmlRegisterType<QDeclarativeListElement>("Qt",4,7,"ListElement"); |
|
89 qmlRegisterType<QDeclarativeNumberAnimation>("Qt",4,7,"NumberAnimation"); |
|
90 qmlRegisterType<QDeclarativePackage>("Qt",4,7,"Package"); |
|
91 qmlRegisterType<QDeclarativeParallelAnimation>("Qt",4,7,"ParallelAnimation"); |
|
92 qmlRegisterType<QDeclarativeParentAnimation>("Qt",4,7,"ParentAnimation"); |
|
93 qmlRegisterType<QDeclarativeParentChange>("Qt",4,7,"ParentChange"); |
|
94 qmlRegisterType<QDeclarativePauseAnimation>("Qt",4,7,"PauseAnimation"); |
|
95 qmlRegisterType<QDeclarativePropertyAction>("Qt",4,7,"PropertyAction"); |
|
96 qmlRegisterType<QDeclarativePropertyAnimation>("Qt",4,7,"PropertyAnimation"); |
|
97 qmlRegisterType<QDeclarativeRotationAnimation>("Qt",4,7,"RotationAnimation"); |
|
98 qmlRegisterType<QDeclarativeScriptAction>("Qt",4,7,"ScriptAction"); |
|
99 qmlRegisterType<QDeclarativeSequentialAnimation>("Qt",4,7,"SequentialAnimation"); |
|
100 qmlRegisterType<QDeclarativeSpringFollow>("Qt",4,7,"SpringFollow"); |
|
101 qmlRegisterType<QDeclarativeStateChangeScript>("Qt",4,7,"StateChangeScript"); |
|
102 qmlRegisterType<QDeclarativeStateGroup>("Qt",4,7,"StateGroup"); |
|
103 qmlRegisterType<QDeclarativeState>("Qt",4,7,"State"); |
|
104 qmlRegisterType<QDeclarativeSystemPalette>("Qt",4,7,"SystemPalette"); |
|
105 qmlRegisterType<QDeclarativeTimer>("Qt",4,7,"Timer"); |
|
106 qmlRegisterType<QDeclarativeTransition>("Qt",4,7,"Transition"); |
|
107 qmlRegisterType<QDeclarativeVector3dAnimation>("Qt",4,7,"Vector3dAnimation"); |
|
108 #ifdef QT_NO_XMLPATTERNS |
|
109 qmlRegisterTypeNotAvailable("Qt",4,7,"XmlListModel", |
|
110 qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns")); |
|
111 qmlRegisterTypeNotAvailable("Qt",4,7,"XmlRole", |
|
112 qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns")); |
|
113 #else |
|
114 qmlRegisterType<QDeclarativeXmlListModel>("Qt",4,7,"XmlListModel"); |
|
115 qmlRegisterType<QDeclarativeXmlListModelRole>("Qt",4,7,"XmlRole"); |
|
116 #endif |
|
117 |
|
118 qmlRegisterType<QDeclarativeAnchors>(); |
|
119 qmlRegisterType<QDeclarativeStateOperation>(); |
|
120 qmlRegisterType<QDeclarativeAnchorSet>(); |
|
121 |
|
122 qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,7,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class")); |
|
123 |
|
124 qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,7, "ListModel", new QDeclarativeListModelParser); |
|
125 qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 7, "PropertyChanges", new QDeclarativePropertyChangesParser); |
|
126 qmlRegisterCustomType<QDeclarativeConnections>("Qt", 4, 7, "Connections", new QDeclarativeConnectionsParser); |
|
127 } |