1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Data Visualization module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:GPL$
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 The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU
19** General Public License version 3 or (at your option) any later version
20** approved by the KDE Free Qt Foundation. The licenses are as published by
21** the Free Software Foundation and appearing in the file LICENSE.GPL3
22** included in the packaging of this file. Please review the following
23** information to ensure the GNU General Public License requirements will
24** be met: https://www.gnu.org/licenses/gpl-3.0.html.
25**
26** $QT_END_LICENSE$
27**
28****************************************************************************/
29
30#include "datavisualizationqml2_plugin.h"
31
32#include <QtQml>
33
34QT_BEGIN_NAMESPACE_DATAVISUALIZATION
35
36void QtDataVisualizationQml2Plugin::registerTypes(const char *uri)
37{
38 // @uri QtDataVisualization
39
40 // QtDataVisualization 1.0
41
42 qmlRegisterUncreatableType<QAbstractItemModel>(uri, versionMajor: 1, versionMinor: 0, qmlName: "AbstractItemModel",
43 reason: QLatin1String("Trying to create uncreatable: AbstractItemModel."));
44 qmlRegisterUncreatableType<QAbstract3DAxis>(uri, versionMajor: 1, versionMinor: 0, qmlName: "AbstractAxis3D",
45 reason: QLatin1String("Trying to create uncreatable: AbstractAxis."));
46 qmlRegisterUncreatableType<QAbstractDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "AbstractDataProxy",
47 reason: QLatin1String("Trying to create uncreatable: AbstractDataProxy."));
48 qmlRegisterUncreatableType<QBarDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "BarDataProxy",
49 reason: QLatin1String("Trying to create uncreatable: BarDataProxy."));
50 qmlRegisterUncreatableType<QScatterDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ScatterDataProxy",
51 reason: QLatin1String("Trying to create uncreatable: ScatterDataProxy."));
52 qmlRegisterUncreatableType<QSurfaceDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "SurfaceDataProxy",
53 reason: QLatin1String("Trying to create uncreatable: SurfaceDataProxy."));
54 qmlRegisterUncreatableType<AbstractDeclarative>(uri, versionMajor: 1, versionMinor: 0, qmlName: "AbstractGraph3D",
55 reason: QLatin1String("Trying to create uncreatable: AbstractGraph3D."));
56 qmlRegisterUncreatableType<Declarative3DScene>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Scene3D",
57 reason: QLatin1String("Trying to create uncreatable: Scene3D."));
58 qmlRegisterUncreatableType<QAbstract3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Abstract3DSeries",
59 reason: QLatin1String("Trying to create uncreatable: Abstract3DSeries."));
60 qmlRegisterUncreatableType<QBar3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "QBar3DSeries",
61 reason: QLatin1String("Trying to create uncreatable: QBar3DSeries, use Bar3DSeries instead."));
62 qmlRegisterUncreatableType<QScatter3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "QScatter3DSeries",
63 reason: QLatin1String("Trying to create uncreatable: QScatter3DSeries, use Scatter3DSeries instead."));
64 qmlRegisterUncreatableType<QSurface3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "QSurface3DSeries",
65 reason: QLatin1String("Trying to create uncreatable: QSurface3DSeries, use Surface3DSeries instead."));
66 qmlRegisterUncreatableType<Q3DTheme>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Q3DTheme",
67 reason: QLatin1String("Trying to create uncreatable: Q3DTheme, use Theme3D instead."));
68 qmlRegisterUncreatableType<QAbstract3DInputHandler>(uri, versionMajor: 1, versionMinor: 0, qmlName: "AbstractInputHandler3D",
69 reason: QLatin1String("Trying to create uncreatable: AbstractInputHandler3D."));
70 qmlRegisterUncreatableType<Q3DObject>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Object3D",
71 reason: QLatin1String("Trying to create uncreatable: Object3D."));
72
73 qmlRegisterType<DeclarativeBars>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Bars3D");
74 qmlRegisterType<DeclarativeScatter>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Scatter3D");
75 qmlRegisterType<DeclarativeSurface>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Surface3D");
76
77 qmlRegisterType<QValue3DAxis>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ValueAxis3D");
78 qmlRegisterType<QCategory3DAxis>(uri, versionMajor: 1, versionMinor: 0, qmlName: "CategoryAxis3D");
79
80 qmlRegisterType<Q3DCamera>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Camera3D");
81 qmlRegisterType<Q3DLight>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Light3D");
82
83 qmlRegisterType<QItemModelBarDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ItemModelBarDataProxy");
84 qmlRegisterType<QItemModelScatterDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ItemModelScatterDataProxy");
85 qmlRegisterType<QItemModelSurfaceDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ItemModelSurfaceDataProxy");
86 qmlRegisterType<QHeightMapSurfaceDataProxy>(uri, versionMajor: 1, versionMinor: 0, qmlName: "HeightMapSurfaceDataProxy");
87
88 qmlRegisterType<ColorGradientStop>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ColorGradientStop");
89 qmlRegisterType<ColorGradient>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ColorGradient");
90
91 qmlRegisterType<DeclarativeColor>(uri, versionMajor: 1, versionMinor: 0, qmlName: "ThemeColor");
92 qmlRegisterType<DeclarativeTheme3D>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Theme3D");
93
94 qmlRegisterType<DeclarativeBar3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Bar3DSeries");
95 qmlRegisterType<DeclarativeScatter3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Scatter3DSeries");
96 qmlRegisterType<DeclarativeSurface3DSeries>(uri, versionMajor: 1, versionMinor: 0, qmlName: "Surface3DSeries");
97
98 qRegisterMetaType<QAbstract3DGraph::ShadowQuality>(typeName: "QAbstract3DGraph::ShadowQuality");
99
100 // QtDataVisualization 1.1
101
102 // New revisions
103 qmlRegisterUncreatableType<QAbstract3DAxis, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "AbstractAxis3D",
104 reason: QLatin1String("Trying to create uncreatable: AbstractAxis."));
105 qmlRegisterUncreatableType<QAbstract3DSeries, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "Abstract3DSeries",
106 reason: QLatin1String("Trying to create uncreatable: Abstract3DSeries."));
107 qmlRegisterUncreatableType<AbstractDeclarative, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "AbstractGraph3D",
108 reason: QLatin1String("Trying to create uncreatable: AbstractGraph3D."));
109
110 qmlRegisterType<QValue3DAxis, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "ValueAxis3D");
111 qmlRegisterType<QItemModelBarDataProxy, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "ItemModelBarDataProxy");
112 qmlRegisterType<QItemModelSurfaceDataProxy, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "ItemModelSurfaceDataProxy");
113 qmlRegisterType<QItemModelScatterDataProxy, 1>(uri, versionMajor: 1, versionMinor: 1, qmlName: "ItemModelScatterDataProxy");
114
115 // New types
116 qmlRegisterType<QValue3DAxisFormatter>(uri, versionMajor: 1, versionMinor: 1, qmlName: "ValueAxis3DFormatter");
117 qmlRegisterType<QLogValue3DAxisFormatter>(uri, versionMajor: 1, versionMinor: 1, qmlName: "LogValueAxis3DFormatter");
118 qmlRegisterType<QCustom3DItem>(uri, versionMajor: 1, versionMinor: 1, qmlName: "Custom3DItem");
119 qmlRegisterType<QCustom3DLabel>(uri, versionMajor: 1, versionMinor: 1, qmlName: "Custom3DLabel");
120
121 // New metatypes
122 qRegisterMetaType<QAbstract3DGraph::ElementType>(typeName: "QAbstract3DGraph::ElementType");
123
124 // QtDataVisualization 1.2
125
126 // New revisions
127 qmlRegisterUncreatableType<AbstractDeclarative, 2>(uri, versionMajor: 1, versionMinor: 2, qmlName: "AbstractGraph3D",
128 reason: QLatin1String("Trying to create uncreatable: AbstractGraph3D."));
129 qmlRegisterRevision<Q3DScene, 1>(uri, versionMajor: 1, versionMinor: 2);
130 qmlRegisterUncreatableType<Declarative3DScene, 1>(uri, versionMajor: 1, versionMinor: 2, qmlName: "Scene3D",
131 reason: QLatin1String("Trying to create uncreatable: Scene3D."));
132 qmlRegisterType<DeclarativeSurface, 1>(uri, versionMajor: 1, versionMinor: 2, qmlName: "Surface3D");
133 qmlRegisterType<Q3DCamera, 1>(uri, versionMajor: 1, versionMinor: 2, qmlName: "Camera3D");
134 qmlRegisterType<QCustom3DItem, 1>(uri, versionMajor: 1, versionMinor: 2, qmlName: "Custom3DItem");
135 qmlRegisterType<DeclarativeBars, 1>(uri, versionMajor: 1, versionMinor: 2, qmlName: "Bars3D");
136
137 // New types
138 qmlRegisterType<Q3DInputHandler>(uri, versionMajor: 1, versionMinor: 2, qmlName: "InputHandler3D");
139 qmlRegisterType<QTouch3DInputHandler>(uri, versionMajor: 1, versionMinor: 2, qmlName: "TouchInputHandler3D");
140 qmlRegisterType<QCustom3DVolume>(uri, versionMajor: 1, versionMinor: 2, qmlName: "Custom3DVolume");
141
142 // QtDataVisualization 1.3
143
144 // New revisions
145 qmlRegisterType<Q3DLight, 1>(uri, versionMajor: 1, versionMinor: 3, qmlName: "Light3D");
146
147 qmlRegisterModule(uri, versionMajor: 1, QT_VERSION_MINOR);
148}
149
150QT_END_NAMESPACE_DATAVISUALIZATION
151
152

source code of qtdatavis3d/src/datavisualizationqml2/datavisualizationqml2_plugin.cpp