|
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/qdeclarativeitemsmodule_p.h" |
|
43 |
|
44 #include <QtGui/qaction.h> |
|
45 #include <QtGui/qvalidator.h> |
|
46 #include <QtGui/qgraphicseffect.h> |
|
47 |
|
48 #include "private/qdeclarativeevents_p_p.h" |
|
49 #include "private/qdeclarativescalegrid_p_p.h" |
|
50 #include "private/qdeclarativeanimatedimage_p.h" |
|
51 #include "private/qdeclarativeborderimage_p.h" |
|
52 #include "private/qdeclarativepositioners_p.h" |
|
53 #include "private/qdeclarativemousearea_p.h" |
|
54 #include "private/qdeclarativeflickable_p.h" |
|
55 #include "private/qdeclarativeflickable_p_p.h" |
|
56 #include "private/qdeclarativeflipable_p.h" |
|
57 #include "private/qdeclarativefocuspanel_p.h" |
|
58 #include "private/qdeclarativefocusscope_p.h" |
|
59 #include "private/qdeclarativegridview_p.h" |
|
60 #include "private/qdeclarativeimage_p.h" |
|
61 #include "private/qdeclarativeitem_p.h" |
|
62 #include "private/qdeclarativelayoutitem_p.h" |
|
63 #include "private/qdeclarativelistview_p.h" |
|
64 #include "private/qdeclarativeloader_p.h" |
|
65 #include "private/qdeclarativemousearea_p.h" |
|
66 #include "private/qdeclarativepath_p.h" |
|
67 #include "private/qdeclarativepathview_p.h" |
|
68 #include "private/qdeclarativerectangle_p.h" |
|
69 #include "private/qdeclarativerepeater_p.h" |
|
70 #include "private/qdeclarativetranslate_p.h" |
|
71 #include "private/qdeclarativetext_p.h" |
|
72 #include "private/qdeclarativetextedit_p.h" |
|
73 #include "private/qdeclarativetextinput_p.h" |
|
74 #include "private/qdeclarativevisualitemmodel_p.h" |
|
75 #include "private/qdeclarativegraphicswidget_p.h" |
|
76 #ifdef QT_WEBKIT_LIB |
|
77 #include "private/qdeclarativewebview_p.h" |
|
78 #include "private/qdeclarativewebview_p_p.h" |
|
79 #endif |
|
80 #include "private/qdeclarativeanchors_p.h" |
|
81 |
|
82 void QDeclarativeItemModule::defineModule() |
|
83 { |
|
84 #ifdef QT_NO_MOVIE |
|
85 qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage", |
|
86 qApp->translate("QDeclarativeAnimatedImage","Qt was built without support for QMovie")); |
|
87 #else |
|
88 qmlRegisterType<QDeclarativeAnimatedImage>("Qt",4,7,"AnimatedImage"); |
|
89 #endif |
|
90 qmlRegisterType<QDeclarativeBorderImage>("Qt",4,7,"BorderImage"); |
|
91 qmlRegisterType<QDeclarativeColumn>("Qt",4,7,"Column"); |
|
92 qmlRegisterType<QDeclarativeDrag>("Qt",4,7,"Drag"); |
|
93 qmlRegisterType<QDeclarativeFlickable>("Qt",4,7,"Flickable"); |
|
94 qmlRegisterType<QDeclarativeFlipable>("Qt",4,7,"Flipable"); |
|
95 qmlRegisterType<QDeclarativeFlow>("Qt",4,7,"Flow"); |
|
96 qmlRegisterType<QDeclarativeFocusPanel>("Qt",4,7,"FocusPanel"); |
|
97 qmlRegisterType<QDeclarativeFocusScope>("Qt",4,7,"FocusScope"); |
|
98 qmlRegisterType<QDeclarativeGradient>("Qt",4,7,"Gradient"); |
|
99 qmlRegisterType<QDeclarativeGradientStop>("Qt",4,7,"GradientStop"); |
|
100 qmlRegisterType<QDeclarativeGrid>("Qt",4,7,"Grid"); |
|
101 qmlRegisterType<QDeclarativeGridView>("Qt",4,7,"GridView"); |
|
102 qmlRegisterType<QDeclarativeImage>("Qt",4,7,"Image"); |
|
103 qmlRegisterType<QDeclarativeItem>("Qt",4,7,"Item"); |
|
104 qmlRegisterType<QDeclarativeLayoutItem>("Qt",4,7,"LayoutItem"); |
|
105 qmlRegisterType<QDeclarativeListView>("Qt",4,7,"ListView"); |
|
106 qmlRegisterType<QDeclarativeLoader>("Qt",4,7,"Loader"); |
|
107 qmlRegisterType<QDeclarativeMouseArea>("Qt",4,7,"MouseArea"); |
|
108 qmlRegisterType<QDeclarativePath>("Qt",4,7,"Path"); |
|
109 qmlRegisterType<QDeclarativePathAttribute>("Qt",4,7,"PathAttribute"); |
|
110 qmlRegisterType<QDeclarativePathCubic>("Qt",4,7,"PathCubic"); |
|
111 qmlRegisterType<QDeclarativePathLine>("Qt",4,7,"PathLine"); |
|
112 qmlRegisterType<QDeclarativePathPercent>("Qt",4,7,"PathPercent"); |
|
113 qmlRegisterType<QDeclarativePathQuad>("Qt",4,7,"PathQuad"); |
|
114 qmlRegisterType<QDeclarativePathView>("Qt",4,7,"PathView"); |
|
115 qmlRegisterType<QIntValidator>("Qt",4,7,"IntValidator"); |
|
116 qmlRegisterType<QDoubleValidator>("Qt",4,7,"DoubleValidator"); |
|
117 qmlRegisterType<QRegExpValidator>("Qt",4,7,"RegExpValidator"); |
|
118 qmlRegisterType<QDeclarativeRectangle>("Qt",4,7,"Rectangle"); |
|
119 qmlRegisterType<QDeclarativeRepeater>("Qt",4,7,"Repeater"); |
|
120 qmlRegisterType<QGraphicsRotation>("Qt",4,7,"Rotation"); |
|
121 qmlRegisterType<QDeclarativeRow>("Qt",4,7,"Row"); |
|
122 qmlRegisterType<QDeclarativeTranslate>("Qt",4,7,"Translate"); |
|
123 qmlRegisterType<QGraphicsScale>("Qt",4,7,"Scale"); |
|
124 qmlRegisterType<QDeclarativeText>("Qt",4,7,"Text"); |
|
125 qmlRegisterType<QDeclarativeTextEdit>("Qt",4,7,"TextEdit"); |
|
126 qmlRegisterType<QDeclarativeTextInput>("Qt",4,7,"TextInput"); |
|
127 qmlRegisterType<QDeclarativeViewSection>("Qt",4,7,"ViewSection"); |
|
128 qmlRegisterType<QDeclarativeVisualDataModel>("Qt",4,7,"VisualDataModel"); |
|
129 qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,7,"VisualItemModel"); |
|
130 |
|
131 qmlRegisterType<QDeclarativeAnchors>(); |
|
132 qmlRegisterType<QDeclarativeKeyEvent>(); |
|
133 qmlRegisterType<QDeclarativeMouseEvent>(); |
|
134 qmlRegisterType<QGraphicsObject>(); |
|
135 qmlRegisterType<QGraphicsWidget>("Qt",4,7,"QGraphicsWidget"); |
|
136 qmlRegisterExtendedType<QGraphicsWidget,QDeclarativeGraphicsWidget>("Qt",4,7,"QGraphicsWidget"); |
|
137 qmlRegisterType<QGraphicsTransform>(); |
|
138 qmlRegisterType<QDeclarativePathElement>(); |
|
139 qmlRegisterType<QDeclarativeCurve>(); |
|
140 qmlRegisterType<QDeclarativeScaleGrid>(); |
|
141 qmlRegisterType<QValidator>(); |
|
142 qmlRegisterType<QDeclarativeVisualModel>(); |
|
143 qmlRegisterType<QAction>(); |
|
144 qmlRegisterType<QDeclarativePen>(); |
|
145 qmlRegisterType<QDeclarativeFlickableVisibleArea>(); |
|
146 #ifndef QT_NO_GRAPHICSEFFECT |
|
147 qmlRegisterType<QGraphicsEffect>(); |
|
148 #endif |
|
149 |
|
150 qmlRegisterUncreatableType<QDeclarativeKeyNavigationAttached>("Qt",4,7,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); |
|
151 qmlRegisterUncreatableType<QDeclarativeKeysAttached>("Qt",4,7,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); |
|
152 } |