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 | ** Commercial Usage
|
---|
11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
13 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
14 | ** a written agreement between you and Nokia.
|
---|
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 | ** GNU General Public License Usage
|
---|
29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
30 | ** General Public License version 3.0 as published by the Free Software
|
---|
31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
32 | ** packaging of this file. Please review the following information to
|
---|
33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
35 | **
|
---|
36 | ** If you have questions regarding the use of this file, please contact
|
---|
37 | ** Nokia at qt-info@nokia.com.
|
---|
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/qdeclarativefontloader_p.h"
|
---|
50 | #include "private/qdeclarativelistaccessor_p.h"
|
---|
51 | #include "private/qdeclarativelistmodel_p.h"
|
---|
52 | #include "private/qdeclarativenullablevalue_p_p.h"
|
---|
53 | #include "private/qdeclarativeopenmetaobject_p.h"
|
---|
54 | #include "private/qdeclarativepackage_p.h"
|
---|
55 | #include "private/qdeclarativepixmapcache_p.h"
|
---|
56 | #include "private/qdeclarativepropertychanges_p.h"
|
---|
57 | #include "qdeclarativepropertymap.h"
|
---|
58 | #include "private/qdeclarativespringanimation_p.h"
|
---|
59 | #include "private/qdeclarativestategroup_p.h"
|
---|
60 | #include "private/qdeclarativestateoperations_p.h"
|
---|
61 | #include "private/qdeclarativestate_p.h"
|
---|
62 | #include "private/qdeclarativestate_p_p.h"
|
---|
63 | #include "private/qdeclarativestyledtext_p.h"
|
---|
64 | #include "private/qdeclarativesystempalette_p.h"
|
---|
65 | #include "private/qdeclarativetimeline_p_p.h"
|
---|
66 | #include "private/qdeclarativetimer_p.h"
|
---|
67 | #include "private/qdeclarativetransitionmanager_p_p.h"
|
---|
68 | #include "private/qdeclarativetransition_p.h"
|
---|
69 | #include "qdeclarativeview.h"
|
---|
70 | #include "qdeclarativeinfo.h"
|
---|
71 | #include "private/qdeclarativetypenotavailable_p.h"
|
---|
72 | #ifndef QT_NO_XMLPATTERNS
|
---|
73 | #include "private/qdeclarativexmllistmodel_p.h"
|
---|
74 | #endif
|
---|
75 |
|
---|
76 | void QDeclarativeUtilModule::defineModule()
|
---|
77 | {
|
---|
78 | qmlRegisterType<QDeclarativeAnchorAnimation>("QtQuick",1,0,"AnchorAnimation");
|
---|
79 | qmlRegisterType<QDeclarativeAnchorChanges>("QtQuick",1,0,"AnchorChanges");
|
---|
80 | qmlRegisterType<QDeclarativeBehavior>("QtQuick",1,0,"Behavior");
|
---|
81 | qmlRegisterType<QDeclarativeBind>("QtQuick",1,0,"Binding");
|
---|
82 | qmlRegisterType<QDeclarativeColorAnimation>("QtQuick",1,0,"ColorAnimation");
|
---|
83 | qmlRegisterType<QDeclarativeConnections>("QtQuick",1,0,"Connections");
|
---|
84 | qmlRegisterType<QDeclarativeSmoothedAnimation>("QtQuick",1,0,"SmoothedAnimation");
|
---|
85 | qmlRegisterType<QDeclarativeFontLoader>("QtQuick",1,0,"FontLoader");
|
---|
86 | qmlRegisterType<QDeclarativeListElement>("QtQuick",1,0,"ListElement");
|
---|
87 | qmlRegisterType<QDeclarativeNumberAnimation>("QtQuick",1,0,"NumberAnimation");
|
---|
88 | qmlRegisterType<QDeclarativePackage>("QtQuick",1,0,"Package");
|
---|
89 | qmlRegisterType<QDeclarativeParallelAnimation>("QtQuick",1,0,"ParallelAnimation");
|
---|
90 | qmlRegisterType<QDeclarativeParentAnimation>("QtQuick",1,0,"ParentAnimation");
|
---|
91 | qmlRegisterType<QDeclarativeParentChange>("QtQuick",1,0,"ParentChange");
|
---|
92 | qmlRegisterType<QDeclarativePauseAnimation>("QtQuick",1,0,"PauseAnimation");
|
---|
93 | qmlRegisterType<QDeclarativePropertyAction>("QtQuick",1,0,"PropertyAction");
|
---|
94 | qmlRegisterType<QDeclarativePropertyAnimation>("QtQuick",1,0,"PropertyAnimation");
|
---|
95 | qmlRegisterType<QDeclarativeRotationAnimation>("QtQuick",1,0,"RotationAnimation");
|
---|
96 | qmlRegisterType<QDeclarativeScriptAction>("QtQuick",1,0,"ScriptAction");
|
---|
97 | qmlRegisterType<QDeclarativeSequentialAnimation>("QtQuick",1,0,"SequentialAnimation");
|
---|
98 | qmlRegisterType<QDeclarativeSpringAnimation>("QtQuick",1,0,"SpringAnimation");
|
---|
99 | qmlRegisterType<QDeclarativeStateChangeScript>("QtQuick",1,0,"StateChangeScript");
|
---|
100 | qmlRegisterType<QDeclarativeStateGroup>("QtQuick",1,0,"StateGroup");
|
---|
101 | qmlRegisterType<QDeclarativeState>("QtQuick",1,0,"State");
|
---|
102 | qmlRegisterType<QDeclarativeSystemPalette>("QtQuick",1,0,"SystemPalette");
|
---|
103 | qmlRegisterType<QDeclarativeTimer>("QtQuick",1,0,"Timer");
|
---|
104 | qmlRegisterType<QDeclarativeTransition>("QtQuick",1,0,"Transition");
|
---|
105 | qmlRegisterType<QDeclarativeVector3dAnimation>("QtQuick",1,0,"Vector3dAnimation");
|
---|
106 | #ifdef QT_NO_XMLPATTERNS
|
---|
107 | qmlRegisterTypeNotAvailable("QtQuick",1,0,"XmlListModel",
|
---|
108 | qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns"));
|
---|
109 | qmlRegisterTypeNotAvailable("QtQuick",1,0,"XmlRole",
|
---|
110 | qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns"));
|
---|
111 | #else
|
---|
112 | qmlRegisterType<QDeclarativeXmlListModel>("QtQuick",1,0,"XmlListModel");
|
---|
113 | qmlRegisterType<QDeclarativeXmlListModelRole>("QtQuick",1,0,"XmlRole");
|
---|
114 | #endif
|
---|
115 |
|
---|
116 | qmlRegisterType<QDeclarativeAnchors>();
|
---|
117 | qmlRegisterType<QDeclarativeStateOperation>();
|
---|
118 | qmlRegisterType<QDeclarativeAnchorSet>();
|
---|
119 |
|
---|
120 | qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("QtQuick",1,0,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class"));
|
---|
121 |
|
---|
122 | qmlRegisterCustomType<QDeclarativeListModel>("QtQuick",1,0,"ListModel", new QDeclarativeListModelParser);
|
---|
123 | qmlRegisterCustomType<QDeclarativePropertyChanges>("QtQuick",1,0,"PropertyChanges", new QDeclarativePropertyChangesParser);
|
---|
124 | qmlRegisterCustomType<QDeclarativeConnections>("QtQuick",1,0,"Connections", new QDeclarativeConnectionsParser);
|
---|
125 |
|
---|
126 | #ifndef QT_NO_IMPORT_QT47_QML
|
---|
127 | qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,7,"AnchorAnimation");
|
---|
128 | qmlRegisterType<QDeclarativeAnchorChanges>("Qt",4,7,"AnchorChanges");
|
---|
129 | qmlRegisterType<QDeclarativeBehavior>("Qt",4,7,"Behavior");
|
---|
130 | qmlRegisterType<QDeclarativeBind>("Qt",4,7,"Binding");
|
---|
131 | qmlRegisterType<QDeclarativeColorAnimation>("Qt",4,7,"ColorAnimation");
|
---|
132 | qmlRegisterType<QDeclarativeConnections>("Qt",4,7,"Connections");
|
---|
133 | qmlRegisterType<QDeclarativeSmoothedAnimation>("Qt",4,7,"SmoothedAnimation");
|
---|
134 | qmlRegisterType<QDeclarativeFontLoader>("Qt",4,7,"FontLoader");
|
---|
135 | qmlRegisterType<QDeclarativeListElement>("Qt",4,7,"ListElement");
|
---|
136 | qmlRegisterType<QDeclarativeNumberAnimation>("Qt",4,7,"NumberAnimation");
|
---|
137 | qmlRegisterType<QDeclarativePackage>("Qt",4,7,"Package");
|
---|
138 | qmlRegisterType<QDeclarativeParallelAnimation>("Qt",4,7,"ParallelAnimation");
|
---|
139 | qmlRegisterType<QDeclarativeParentAnimation>("Qt",4,7,"ParentAnimation");
|
---|
140 | qmlRegisterType<QDeclarativeParentChange>("Qt",4,7,"ParentChange");
|
---|
141 | qmlRegisterType<QDeclarativePauseAnimation>("Qt",4,7,"PauseAnimation");
|
---|
142 | qmlRegisterType<QDeclarativePropertyAction>("Qt",4,7,"PropertyAction");
|
---|
143 | qmlRegisterType<QDeclarativePropertyAnimation>("Qt",4,7,"PropertyAnimation");
|
---|
144 | qmlRegisterType<QDeclarativeRotationAnimation>("Qt",4,7,"RotationAnimation");
|
---|
145 | qmlRegisterType<QDeclarativeScriptAction>("Qt",4,7,"ScriptAction");
|
---|
146 | qmlRegisterType<QDeclarativeSequentialAnimation>("Qt",4,7,"SequentialAnimation");
|
---|
147 | qmlRegisterType<QDeclarativeSpringAnimation>("Qt",4,7,"SpringAnimation");
|
---|
148 | qmlRegisterType<QDeclarativeStateChangeScript>("Qt",4,7,"StateChangeScript");
|
---|
149 | qmlRegisterType<QDeclarativeStateGroup>("Qt",4,7,"StateGroup");
|
---|
150 | qmlRegisterType<QDeclarativeState>("Qt",4,7,"State");
|
---|
151 | qmlRegisterType<QDeclarativeSystemPalette>("Qt",4,7,"SystemPalette");
|
---|
152 | qmlRegisterType<QDeclarativeTimer>("Qt",4,7,"Timer");
|
---|
153 | qmlRegisterType<QDeclarativeTransition>("Qt",4,7,"Transition");
|
---|
154 | qmlRegisterType<QDeclarativeVector3dAnimation>("Qt",4,7,"Vector3dAnimation");
|
---|
155 | #ifdef QT_NO_XMLPATTERNS
|
---|
156 | qmlRegisterTypeNotAvailable("Qt",4,7,"XmlListModel",
|
---|
157 | qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns"));
|
---|
158 | qmlRegisterTypeNotAvailable("Qt",4,7,"XmlRole",
|
---|
159 | qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns"));
|
---|
160 | #else
|
---|
161 | qmlRegisterType<QDeclarativeXmlListModel>("Qt",4,7,"XmlListModel");
|
---|
162 | qmlRegisterType<QDeclarativeXmlListModelRole>("Qt",4,7,"XmlRole");
|
---|
163 | #endif
|
---|
164 |
|
---|
165 | qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,7,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class"));
|
---|
166 |
|
---|
167 | qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,7, "ListModel", new QDeclarativeListModelParser);
|
---|
168 | qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 7, "PropertyChanges", new QDeclarativePropertyChangesParser);
|
---|
169 | qmlRegisterCustomType<QDeclarativeConnections>("Qt", 4, 7, "Connections", new QDeclarativeConnectionsParser);
|
---|
170 | #endif
|
---|
171 | }
|
---|