@@ -1,186 +1,189 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #ifdef QT5_QUICK_1 |
|
21 | #ifdef QT5_QUICK_1 | |
22 | #include <QtQuick1/qdeclarativeextensionplugin.h> |
|
22 | #include <QtQuick1/qdeclarativeextensionplugin.h> | |
23 | #include <QtQuick1/qdeclarative.h> |
|
23 | #include <QtQuick1/qdeclarative.h> | |
24 | #else |
|
24 | #else | |
25 | #include <QtDeclarative/qdeclarativeextensionplugin.h> |
|
25 | #include <QtDeclarative/qdeclarativeextensionplugin.h> | |
26 | #include <QtDeclarative/qdeclarative.h> |
|
26 | #include <QtDeclarative/qdeclarative.h> | |
27 | #endif |
|
27 | #endif | |
28 | #include "qchart.h" |
|
28 | #include "qchart.h" | |
29 | #include "qabstractaxis.h" |
|
29 | #include "qabstractaxis.h" | |
30 | #include "qvalueaxis.h" |
|
30 | #include "qvalueaxis.h" | |
31 | #include "declarativecategoryaxis.h" |
|
31 | #include "declarativecategoryaxis.h" | |
32 | #include "qbarcategoryaxis.h" |
|
32 | #include "qbarcategoryaxis.h" | |
33 | #include "declarativechart.h" |
|
33 | #include "declarativechart.h" | |
34 | #include "declarativexypoint.h" |
|
34 | #include "declarativexypoint.h" | |
35 | #include "declarativelineseries.h" |
|
35 | #include "declarativelineseries.h" | |
36 | #include "declarativesplineseries.h" |
|
36 | #include "declarativesplineseries.h" | |
37 | #include "declarativeareaseries.h" |
|
37 | #include "declarativeareaseries.h" | |
38 | #include "declarativescatterseries.h" |
|
38 | #include "declarativescatterseries.h" | |
39 | #include "declarativebarseries.h" |
|
39 | #include "declarativebarseries.h" | |
40 | #include "declarativepieseries.h" |
|
40 | #include "declarativepieseries.h" | |
41 | #include "qvxymodelmapper.h" |
|
41 | #include "qvxymodelmapper.h" | |
42 | #include "qhxymodelmapper.h" |
|
42 | #include "qhxymodelmapper.h" | |
43 | #include "qhpiemodelmapper.h" |
|
43 | #include "qhpiemodelmapper.h" | |
44 | #include "qvpiemodelmapper.h" |
|
44 | #include "qvpiemodelmapper.h" | |
45 | #include "qhbarmodelmapper.h" |
|
45 | #include "qhbarmodelmapper.h" | |
46 | #include "qvbarmodelmapper.h" |
|
46 | #include "qvbarmodelmapper.h" | |
47 | #include "declarativemargins.h" |
|
47 | #include "declarativemargins.h" | |
48 | #include <QAbstractItemModel> |
|
48 | #include <QAbstractItemModel> | |
49 |
|
49 | |||
50 | #ifndef QT_ON_ARM |
|
50 | #ifndef QT_ON_ARM | |
51 | #include "qdatetimeaxis.h" |
|
51 | #include "qdatetimeaxis.h" | |
52 | #endif |
|
52 | #endif | |
53 |
|
53 | |||
54 |
QTCOMMERCIALCHART_ |
|
54 | QTCOMMERCIALCHART_USE_NAMESPACE | |
|
55 | ||||
55 | Q_DECLARE_METATYPE(QList<QPieSlice *>) |
|
56 | Q_DECLARE_METATYPE(QList<QPieSlice *>) | |
56 | Q_DECLARE_METATYPE(QList<QBarSet *>) |
|
57 | Q_DECLARE_METATYPE(QList<QBarSet *>) | |
57 |
|
58 | |||
|
59 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
60 | ||||
58 | class ChartQmlPlugin : public QDeclarativeExtensionPlugin |
|
61 | class ChartQmlPlugin : public QDeclarativeExtensionPlugin | |
59 | { |
|
62 | { | |
60 | Q_OBJECT |
|
63 | Q_OBJECT | |
61 |
|
64 | |||
62 | #ifdef QT5_QUICK_1 |
|
65 | #ifdef QT5_QUICK_1 | |
63 | // TODO: fix the metadata |
|
66 | // TODO: fix the metadata | |
64 | Q_PLUGIN_METADATA(IID "org.qt-project.foo") |
|
67 | Q_PLUGIN_METADATA(IID "org.qt-project.foo") | |
65 | #endif |
|
68 | #endif | |
66 |
|
69 | |||
67 | public: |
|
70 | public: | |
68 | virtual void registerTypes(const char *uri) |
|
71 | virtual void registerTypes(const char *uri) | |
69 | { |
|
72 | { | |
70 | Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart")); |
|
73 | Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart")); | |
71 |
|
74 | |||
72 | qRegisterMetaType<QList<QPieSlice *> >(); |
|
75 | qRegisterMetaType<QList<QPieSlice *> >(); | |
73 | qRegisterMetaType<QList<QBarSet *> >(); |
|
76 | qRegisterMetaType<QList<QBarSet *> >(); | |
74 |
|
77 | |||
75 | // QtCommercial.Chart 1.0 |
|
78 | // QtCommercial.Chart 1.0 | |
76 | qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView"); |
|
79 | qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView"); | |
77 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint"); |
|
80 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint"); | |
78 | qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries"); |
|
81 | qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries"); | |
79 | qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries"); |
|
82 | qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries"); | |
80 | qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries"); |
|
83 | qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries"); | |
81 | qmlRegisterType<DeclarativeAreaSeries>(uri, 1, 0, "AreaSeries"); |
|
84 | qmlRegisterType<DeclarativeAreaSeries>(uri, 1, 0, "AreaSeries"); | |
82 | qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries"); |
|
85 | qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries"); | |
83 | qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries"); |
|
86 | qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries"); | |
84 | qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries"); |
|
87 | qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries"); | |
85 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries"); |
|
88 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries"); | |
86 | qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice"); |
|
89 | qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice"); | |
87 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet"); |
|
90 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet"); | |
88 | qmlRegisterType<QHXYModelMapper>(uri, 1, 0, "HXYModelMapper"); |
|
91 | qmlRegisterType<QHXYModelMapper>(uri, 1, 0, "HXYModelMapper"); | |
89 | qmlRegisterType<QVXYModelMapper>(uri, 1, 0, "VXYModelMapper"); |
|
92 | qmlRegisterType<QVXYModelMapper>(uri, 1, 0, "VXYModelMapper"); | |
90 | qmlRegisterType<QHPieModelMapper>(uri, 1, 0, "HPieModelMapper"); |
|
93 | qmlRegisterType<QHPieModelMapper>(uri, 1, 0, "HPieModelMapper"); | |
91 | qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper"); |
|
94 | qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper"); | |
92 | qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper"); |
|
95 | qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper"); | |
93 | qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper"); |
|
96 | qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper"); | |
94 | qmlRegisterType<QValueAxis>(uri, 1, 0, "ValuesAxis"); |
|
97 | qmlRegisterType<QValueAxis>(uri, 1, 0, "ValuesAxis"); | |
95 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis"); |
|
98 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis"); | |
96 | qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend", |
|
99 | qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend", | |
97 | QLatin1String("Trying to create uncreatable: Legend.")); |
|
100 | QLatin1String("Trying to create uncreatable: Legend.")); | |
98 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries", |
|
101 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries", | |
99 | QLatin1String("Trying to create uncreatable: XYSeries.")); |
|
102 | QLatin1String("Trying to create uncreatable: XYSeries.")); | |
100 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel", |
|
103 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel", | |
101 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); |
|
104 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); | |
102 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 0, "XYModelMapper", |
|
105 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 0, "XYModelMapper", | |
103 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); |
|
106 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); | |
104 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 0, "PieModelMapper", |
|
107 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 0, "PieModelMapper", | |
105 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); |
|
108 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); | |
106 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 0, "BarModelMapper", |
|
109 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 0, "BarModelMapper", | |
107 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); |
|
110 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); | |
108 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 0, "AbstractSeries", |
|
111 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 0, "AbstractSeries", | |
109 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); |
|
112 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); | |
110 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 0, "AbstractBarSeries", |
|
113 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 0, "AbstractBarSeries", | |
111 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); |
|
114 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); | |
112 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis", |
|
115 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis", | |
113 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); |
|
116 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); | |
114 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 0, "BarSetBase", |
|
117 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 0, "BarSetBase", | |
115 | QLatin1String("Trying to create uncreatable: BarsetBase.")); |
|
118 | QLatin1String("Trying to create uncreatable: BarsetBase.")); | |
116 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries", |
|
119 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries", | |
117 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); |
|
120 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); | |
118 |
|
121 | |||
119 | // QtCommercial.Chart 1.1 |
|
122 | // QtCommercial.Chart 1.1 | |
120 | qmlRegisterType<DeclarativeChart, 1>(uri, 1, 1, "ChartView"); |
|
123 | qmlRegisterType<DeclarativeChart, 1>(uri, 1, 1, "ChartView"); | |
121 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 1, "XYPoint"); |
|
124 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 1, "XYPoint"); | |
122 | qmlRegisterType<DeclarativeScatterSeries, 1>(uri, 1, 1, "ScatterSeries"); |
|
125 | qmlRegisterType<DeclarativeScatterSeries, 1>(uri, 1, 1, "ScatterSeries"); | |
123 | qmlRegisterType<DeclarativeLineSeries, 1>(uri, 1, 1, "LineSeries"); |
|
126 | qmlRegisterType<DeclarativeLineSeries, 1>(uri, 1, 1, "LineSeries"); | |
124 | qmlRegisterType<DeclarativeSplineSeries, 1>(uri, 1, 1, "SplineSeries"); |
|
127 | qmlRegisterType<DeclarativeSplineSeries, 1>(uri, 1, 1, "SplineSeries"); | |
125 | qmlRegisterType<DeclarativeAreaSeries, 1>(uri, 1, 1, "AreaSeries"); |
|
128 | qmlRegisterType<DeclarativeAreaSeries, 1>(uri, 1, 1, "AreaSeries"); | |
126 | qmlRegisterType<DeclarativeBarSeries, 1>(uri, 1, 1, "BarSeries"); |
|
129 | qmlRegisterType<DeclarativeBarSeries, 1>(uri, 1, 1, "BarSeries"); | |
127 | qmlRegisterType<DeclarativeStackedBarSeries, 1>(uri, 1, 1, "StackedBarSeries"); |
|
130 | qmlRegisterType<DeclarativeStackedBarSeries, 1>(uri, 1, 1, "StackedBarSeries"); | |
128 | qmlRegisterType<DeclarativePercentBarSeries, 1>(uri, 1, 1, "PercentBarSeries"); |
|
131 | qmlRegisterType<DeclarativePercentBarSeries, 1>(uri, 1, 1, "PercentBarSeries"); | |
129 | qmlRegisterType<DeclarativeHorizontalBarSeries, 1>(uri, 1, 1, "HorizontalBarSeries"); |
|
132 | qmlRegisterType<DeclarativeHorizontalBarSeries, 1>(uri, 1, 1, "HorizontalBarSeries"); | |
130 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 1>(uri, 1, 1, "HorizontalStackedBarSeries"); |
|
133 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 1>(uri, 1, 1, "HorizontalStackedBarSeries"); | |
131 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 1>(uri, 1, 1, "HorizontalPercentBarSeries"); |
|
134 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 1>(uri, 1, 1, "HorizontalPercentBarSeries"); | |
132 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries"); |
|
135 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries"); | |
133 | qmlRegisterType<QPieSlice>(uri, 1, 1, "PieSlice"); |
|
136 | qmlRegisterType<QPieSlice>(uri, 1, 1, "PieSlice"); | |
134 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet"); |
|
137 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet"); | |
135 | qmlRegisterType<QHXYModelMapper>(uri, 1, 1, "HXYModelMapper"); |
|
138 | qmlRegisterType<QHXYModelMapper>(uri, 1, 1, "HXYModelMapper"); | |
136 | qmlRegisterType<QVXYModelMapper>(uri, 1, 1, "VXYModelMapper"); |
|
139 | qmlRegisterType<QVXYModelMapper>(uri, 1, 1, "VXYModelMapper"); | |
137 | qmlRegisterType<QHPieModelMapper>(uri, 1, 1, "HPieModelMapper"); |
|
140 | qmlRegisterType<QHPieModelMapper>(uri, 1, 1, "HPieModelMapper"); | |
138 | qmlRegisterType<QVPieModelMapper>(uri, 1, 1, "VPieModelMapper"); |
|
141 | qmlRegisterType<QVPieModelMapper>(uri, 1, 1, "VPieModelMapper"); | |
139 | qmlRegisterType<QHBarModelMapper>(uri, 1, 1, "HBarModelMapper"); |
|
142 | qmlRegisterType<QHBarModelMapper>(uri, 1, 1, "HBarModelMapper"); | |
140 | qmlRegisterType<QVBarModelMapper>(uri, 1, 1, "VBarModelMapper"); |
|
143 | qmlRegisterType<QVBarModelMapper>(uri, 1, 1, "VBarModelMapper"); | |
141 | qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis"); |
|
144 | qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis"); | |
142 | #ifndef QT_ON_ARM |
|
145 | #ifndef QT_ON_ARM | |
143 | qmlRegisterType<QDateTimeAxis>(uri, 1, 1, "DateTimeAxis"); |
|
146 | qmlRegisterType<QDateTimeAxis>(uri, 1, 1, "DateTimeAxis"); | |
144 | #endif |
|
147 | #endif | |
145 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 1, 1, "CategoryAxis"); |
|
148 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 1, 1, "CategoryAxis"); | |
146 | qmlRegisterType<DeclarativeCategoryRange>(uri, 1, 1, "CategoryRange"); |
|
149 | qmlRegisterType<DeclarativeCategoryRange>(uri, 1, 1, "CategoryRange"); | |
147 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 1, "BarCategoryAxis"); |
|
150 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 1, "BarCategoryAxis"); | |
148 | qmlRegisterUncreatableType<QLegend>(uri, 1, 1, "Legend", |
|
151 | qmlRegisterUncreatableType<QLegend>(uri, 1, 1, "Legend", | |
149 | QLatin1String("Trying to create uncreatable: Legend.")); |
|
152 | QLatin1String("Trying to create uncreatable: Legend.")); | |
150 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 1, "XYSeries", |
|
153 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 1, "XYSeries", | |
151 | QLatin1String("Trying to create uncreatable: XYSeries.")); |
|
154 | QLatin1String("Trying to create uncreatable: XYSeries.")); | |
152 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 1, "AbstractItemModel", |
|
155 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 1, "AbstractItemModel", | |
153 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); |
|
156 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); | |
154 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 1, "XYModelMapper", |
|
157 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 1, "XYModelMapper", | |
155 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); |
|
158 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); | |
156 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 1, "PieModelMapper", |
|
159 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 1, "PieModelMapper", | |
157 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); |
|
160 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); | |
158 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 1, "BarModelMapper", |
|
161 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 1, "BarModelMapper", | |
159 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); |
|
162 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); | |
160 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 1, "AbstractSeries", |
|
163 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 1, "AbstractSeries", | |
161 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); |
|
164 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); | |
162 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 1, "AbstractBarSeries", |
|
165 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 1, "AbstractBarSeries", | |
163 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); |
|
166 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); | |
164 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 1, "AbstractAxis", |
|
167 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 1, "AbstractAxis", | |
165 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); |
|
168 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); | |
166 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 1, "BarSetBase", |
|
169 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 1, "BarSetBase", | |
167 | QLatin1String("Trying to create uncreatable: BarsetBase.")); |
|
170 | QLatin1String("Trying to create uncreatable: BarsetBase.")); | |
168 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 1, "QPieSeries", |
|
171 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 1, "QPieSeries", | |
169 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); |
|
172 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); | |
170 | qmlRegisterUncreatableType<DeclarativeMargins>(uri, 1, 1, "Margins", |
|
173 | qmlRegisterUncreatableType<DeclarativeMargins>(uri, 1, 1, "Margins", | |
171 | QLatin1String("Trying to create uncreatable: Margins.")); |
|
174 | QLatin1String("Trying to create uncreatable: Margins.")); | |
172 |
|
175 | |||
173 | // QtCommercial.Chart 1.2 |
|
176 | // QtCommercial.Chart 1.2 | |
174 | qmlRegisterType<DeclarativeChart, 2>(uri, 1, 2, "ChartView"); |
|
177 | qmlRegisterType<DeclarativeChart, 2>(uri, 1, 2, "ChartView"); | |
175 | } |
|
178 | } | |
176 | }; |
|
179 | }; | |
177 |
|
180 | |||
178 | #include "plugin.moc" |
|
181 | #include "plugin.moc" | |
179 |
|
182 | |||
180 | QTCOMMERCIALCHART_END_NAMESPACE |
|
183 | QTCOMMERCIALCHART_END_NAMESPACE | |
181 |
|
184 | |||
182 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
185 | QTCOMMERCIALCHART_USE_NAMESPACE | |
183 |
|
186 | |||
184 | #ifndef QT5_QUICK_1 |
|
187 | #ifndef QT5_QUICK_1 | |
185 | Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin)) |
|
188 | Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin)) | |
186 | #endif |
|
189 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now