@@ -0,0 +1,158 | |||
|
1 | /**************************************************************************** | |
|
2 | ** | |
|
3 | ** Copyright (C) 2015 The Qt Company Ltd | |
|
4 | ** All rights reserved. | |
|
5 | ** For any questions to The Qt Company, please use contact form at http://qt.io | |
|
6 | ** | |
|
7 | ** This file is part of the Qt Charts module. | |
|
8 | ** | |
|
9 | ** Licensees holding valid commercial license for Qt may use this file in | |
|
10 | ** accordance with the Qt License Agreement provided with the Software | |
|
11 | ** or, alternatively, in accordance with the terms contained in a written | |
|
12 | ** agreement between you and The Qt Company. | |
|
13 | ** | |
|
14 | ** If you have questions regarding the use of this file, please use | |
|
15 | ** contact form at http://qt.io | |
|
16 | ** | |
|
17 | ****************************************************************************/ | |
|
18 | ||
|
19 | import QtQuick 2.0 | |
|
20 | import QtTest 1.0 | |
|
21 | import QtCharts 2.0 | |
|
22 | ||
|
23 | Rectangle { | |
|
24 | width: 400 | |
|
25 | height: 300 | |
|
26 | ||
|
27 | TestCase { | |
|
28 | id: tc1 | |
|
29 | name: "tst_qml-qtquicktest ChartView Functions" | |
|
30 | when: windowShown | |
|
31 | ||
|
32 | function test_chartViewSeriesAndAxes() { | |
|
33 | // Create XY series | |
|
34 | var line = chartView.createSeries(ChartView.SeriesTypeLine, "line"); | |
|
35 | verify(line != null && line != undefined); | |
|
36 | var spline = chartView.createSeries(ChartView.SeriesTypeSpline, "spline"); | |
|
37 | verify(spline != null && spline != undefined); | |
|
38 | var scatter = chartView.createSeries(ChartView.SeriesTypeScatter, "scatter"); | |
|
39 | verify(scatter != null && scatter != undefined); | |
|
40 | ||
|
41 | // Create a series with specific axes | |
|
42 | var line2 = chartView.createSeries(ChartView.SeriesTypeLine, "line2", chartView.axisX(line), chartView.axisY(line)); | |
|
43 | ||
|
44 | // Check that all the XY series use the same axes | |
|
45 | verify(chartView.axisX(line) != null); | |
|
46 | verify(chartView.axisY(line) != null); | |
|
47 | compare(chartView.axisX(line), chartView.axisX(line2)); | |
|
48 | compare(chartView.axisY(line), chartView.axisY(line2)); | |
|
49 | compare(chartView.axisX(line), chartView.axisX(spline)); | |
|
50 | compare(chartView.axisY(line), chartView.axisY(spline)); | |
|
51 | compare(chartView.axisX(line), chartView.axisX(scatter)); | |
|
52 | compare(chartView.axisY(line), chartView.axisY(scatter)); | |
|
53 | ||
|
54 | var bar = chartView.createSeries(ChartView.SeriesTypeBar, "bar"); | |
|
55 | verify(bar != null && bar != undefined); | |
|
56 | var stackedbar = chartView.createSeries(ChartView.SeriesTypeStackedBar, "stackedbar"); | |
|
57 | verify(stackedbar != null && stackedbar != undefined); | |
|
58 | var percentbar = chartView.createSeries(ChartView.SeriesTypePercentBar, "percentbar"); | |
|
59 | verify(percentbar != null && percentbar != undefined); | |
|
60 | var horizontalbar = chartView.createSeries(ChartView.SeriesTypeHorizontalBar, "horizontalbar"); | |
|
61 | verify(horizontalbar != null && horizontalbar != undefined); | |
|
62 | var horizontalstackedbar = chartView.createSeries(ChartView.SeriesTypeHorizontalStackedBar, "horizontalstackedbar"); | |
|
63 | verify(horizontalstackedbar != null && horizontalstackedbar != undefined); | |
|
64 | var horizontalpercentbar = chartView.createSeries(ChartView.SeriesTypeHorizontalPercentBar, "horizontalpercentbar"); | |
|
65 | verify(horizontalpercentbar != null && horizontalpercentbar != undefined); | |
|
66 | var area = chartView.createSeries(ChartView.SeriesTypeArea, "area"); | |
|
67 | verify(area != null && area != undefined); | |
|
68 | ||
|
69 | // Remove all series | |
|
70 | chartView.removeAllSeries(); | |
|
71 | compare(chartView.count, 0); | |
|
72 | } | |
|
73 | ||
|
74 | function test_chartViewRange() { | |
|
75 | // Set initial values | |
|
76 | chartView.createSeries(ChartView.SeriesTypeLine, "line"); | |
|
77 | verify(chartView.axisX() != null); | |
|
78 | verify(chartView.axisY() != null); | |
|
79 | chartView.axisX().min = 1.0; | |
|
80 | chartView.axisX().max = 2.0; | |
|
81 | chartView.axisY().min = 1.0; | |
|
82 | chartView.axisY().max = 2.0; | |
|
83 | ||
|
84 | var xMax = chartView.axisX().max; | |
|
85 | var xMin = chartView.axisX().min; | |
|
86 | var yMax = chartView.axisY().max; | |
|
87 | var yMin = chartView.axisY().min; | |
|
88 | ||
|
89 | // zoom x 2.5 | |
|
90 | chartView.zoom(1.5); | |
|
91 | verify(chartView.axisX().max < xMax); | |
|
92 | verify(chartView.axisX().min > xMin); | |
|
93 | verify(chartView.axisY().max < yMax); | |
|
94 | verify(chartView.axisY().min > yMin); | |
|
95 | xMax = chartView.axisX().max; | |
|
96 | xMin = chartView.axisX().min; | |
|
97 | yMax = chartView.axisY().max; | |
|
98 | yMin = chartView.axisY().min; | |
|
99 | ||
|
100 | // zoom x 0.5 | |
|
101 | chartView.zoom(0.5); | |
|
102 | verify(chartView.axisX().max > xMax); | |
|
103 | verify(chartView.axisX().min < xMin); | |
|
104 | verify(chartView.axisY().max > yMax); | |
|
105 | verify(chartView.axisY().min < yMin); | |
|
106 | xMax = chartView.axisX().max; | |
|
107 | xMin = chartView.axisX().min; | |
|
108 | yMax = chartView.axisY().max; | |
|
109 | yMin = chartView.axisY().min; | |
|
110 | ||
|
111 | // Scroll up | |
|
112 | chartView.scrollUp(10); | |
|
113 | compare(chartView.axisX().max, xMax); | |
|
114 | compare(chartView.axisX().min, xMin); | |
|
115 | verify(chartView.axisY().max > yMax); | |
|
116 | verify(chartView.axisY().min > yMin); | |
|
117 | xMax = chartView.axisX().max; | |
|
118 | xMin = chartView.axisX().min; | |
|
119 | yMax = chartView.axisY().max; | |
|
120 | yMin = chartView.axisY().min; | |
|
121 | ||
|
122 | // Scroll down | |
|
123 | chartView.scrollDown(10); | |
|
124 | compare(chartView.axisX().max, xMax); | |
|
125 | compare(chartView.axisX().min, xMin); | |
|
126 | verify(chartView.axisY().max < yMax); | |
|
127 | verify(chartView.axisY().min < yMin); | |
|
128 | xMax = chartView.axisX().max; | |
|
129 | xMin = chartView.axisX().min; | |
|
130 | yMax = chartView.axisY().max; | |
|
131 | yMin = chartView.axisY().min; | |
|
132 | ||
|
133 | // Scroll left | |
|
134 | chartView.scrollLeft(10); | |
|
135 | verify(chartView.axisX().max < xMax); | |
|
136 | verify(chartView.axisX().min < xMin); | |
|
137 | compare(chartView.axisY().max, yMax); | |
|
138 | compare(chartView.axisY().min, yMin); | |
|
139 | xMax = chartView.axisX().max; | |
|
140 | xMin = chartView.axisX().min; | |
|
141 | yMax = chartView.axisY().max; | |
|
142 | yMin = chartView.axisY().min; | |
|
143 | ||
|
144 | // Scroll right | |
|
145 | chartView.scrollRight(10); | |
|
146 | verify(chartView.axisX().max > xMax); | |
|
147 | verify(chartView.axisX().min > xMin); | |
|
148 | compare(chartView.axisY().max, yMax); | |
|
149 | compare(chartView.axisY().min, yMin); | |
|
150 | } | |
|
151 | } | |
|
152 | ||
|
153 | ChartView { | |
|
154 | id: chartView | |
|
155 | anchors.fill: parent | |
|
156 | title: "Chart" | |
|
157 | } | |
|
158 | } |
@@ -1,316 +1,317 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2015 The Qt Company Ltd |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to The Qt Company, please use contact form at http://qt.io |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Charts module. |
|
8 | 8 | ** |
|
9 | 9 | ** Licensees holding valid commercial license for Qt may use this file in |
|
10 | 10 | ** accordance with the Qt License Agreement provided with the Software |
|
11 | 11 | ** or, alternatively, in accordance with the terms contained in a written |
|
12 | 12 | ** agreement between you and The Qt Company. |
|
13 | 13 | ** |
|
14 | 14 | ** If you have questions regarding the use of this file, please use |
|
15 | 15 | ** contact form at http://qt.io |
|
16 | 16 | ** |
|
17 | 17 | ****************************************************************************/ |
|
18 | 18 | |
|
19 | 19 | #include <QtCharts/QChart> |
|
20 | 20 | #include <QtCharts/QAbstractAxis> |
|
21 | 21 | #include <QtCharts/QValueAxis> |
|
22 | 22 | #include <QtCharts/QLogValueAxis> |
|
23 | 23 | #include "declarativecategoryaxis.h" |
|
24 | 24 | #include <QtCharts/QBarCategoryAxis> |
|
25 | 25 | #include "declarativechart.h" |
|
26 | 26 | #include "declarativepolarchart.h" |
|
27 | 27 | #include "declarativexypoint.h" |
|
28 | 28 | #include "declarativelineseries.h" |
|
29 | 29 | #include "declarativesplineseries.h" |
|
30 | 30 | #include "declarativeareaseries.h" |
|
31 | 31 | #include "declarativescatterseries.h" |
|
32 | 32 | #include "declarativebarseries.h" |
|
33 | 33 | #include "declarativeboxplotseries.h" |
|
34 | 34 | #include "declarativepieseries.h" |
|
35 | 35 | #include "declarativeaxes.h" |
|
36 | 36 | #include <QtCharts/QVXYModelMapper> |
|
37 | 37 | #include <QtCharts/QHXYModelMapper> |
|
38 | 38 | #include <QtCharts/QHPieModelMapper> |
|
39 | 39 | #include <QtCharts/QVPieModelMapper> |
|
40 | 40 | #include <QtCharts/QHBarModelMapper> |
|
41 | 41 | #include <QtCharts/QVBarModelMapper> |
|
42 | 42 | #include "declarativemargins.h" |
|
43 | 43 | #include <QtCharts/QAreaLegendMarker> |
|
44 | 44 | #include <QtCharts/QBarLegendMarker> |
|
45 | 45 | #include <QtCharts/QPieLegendMarker> |
|
46 | 46 | #include <QtCharts/QXYLegendMarker> |
|
47 | 47 | #include <QtCharts/QBoxPlotModelMapper> |
|
48 | 48 | #include <QtCharts/QVBoxPlotModelMapper> |
|
49 | 49 | #ifndef QT_ON_ARM |
|
50 | 50 | #include <QtCharts/QDateTimeAxis> |
|
51 | 51 | #endif |
|
52 | 52 | #include <QtCore/QAbstractItemModel> |
|
53 | 53 | #include <QtQml> |
|
54 | 54 | |
|
55 | 55 | QT_CHARTS_USE_NAMESPACE |
|
56 | 56 | |
|
57 | 57 | QML_DECLARE_TYPE(QList<QPieSlice *>) |
|
58 | 58 | QML_DECLARE_TYPE(QList<QBarSet *>) |
|
59 | 59 | QML_DECLARE_TYPE(QList<QAbstractAxis *>) |
|
60 | 60 | |
|
61 | 61 | QML_DECLARE_TYPE(DeclarativeChart) |
|
62 | 62 | QML_DECLARE_TYPE(DeclarativePolarChart) |
|
63 | 63 | QML_DECLARE_TYPE(DeclarativeMargins) |
|
64 | 64 | QML_DECLARE_TYPE(DeclarativeAreaSeries) |
|
65 | 65 | QML_DECLARE_TYPE(DeclarativeBarSeries) |
|
66 | 66 | QML_DECLARE_TYPE(DeclarativeBarSet) |
|
67 | 67 | QML_DECLARE_TYPE(DeclarativeBoxPlotSeries) |
|
68 | 68 | QML_DECLARE_TYPE(DeclarativeBoxSet) |
|
69 | 69 | QML_DECLARE_TYPE(DeclarativeLineSeries) |
|
70 | 70 | QML_DECLARE_TYPE(DeclarativePieSeries) |
|
71 | 71 | QML_DECLARE_TYPE(DeclarativePieSlice) |
|
72 | 72 | QML_DECLARE_TYPE(DeclarativeScatterSeries) |
|
73 | 73 | QML_DECLARE_TYPE(DeclarativeSplineSeries) |
|
74 | 74 | |
|
75 | 75 | QML_DECLARE_TYPE(QAbstractAxis) |
|
76 | 76 | QML_DECLARE_TYPE(QValueAxis) |
|
77 | 77 | QML_DECLARE_TYPE(QBarCategoryAxis) |
|
78 | 78 | QML_DECLARE_TYPE(QCategoryAxis) |
|
79 | 79 | QML_DECLARE_TYPE(QDateTimeAxis) |
|
80 | 80 | QML_DECLARE_TYPE(QLogValueAxis) |
|
81 | 81 | |
|
82 | 82 | QML_DECLARE_TYPE(QLegend) |
|
83 | 83 | QML_DECLARE_TYPE(QLegendMarker) |
|
84 | 84 | QML_DECLARE_TYPE(QAreaLegendMarker) |
|
85 | 85 | QML_DECLARE_TYPE(QBarLegendMarker) |
|
86 | 86 | QML_DECLARE_TYPE(QPieLegendMarker) |
|
87 | 87 | |
|
88 | 88 | QML_DECLARE_TYPE(QHPieModelMapper) |
|
89 | 89 | QML_DECLARE_TYPE(QHXYModelMapper) |
|
90 | 90 | QML_DECLARE_TYPE(QPieModelMapper) |
|
91 | 91 | QML_DECLARE_TYPE(QHBarModelMapper) |
|
92 | 92 | QML_DECLARE_TYPE(QBarModelMapper) |
|
93 | 93 | QML_DECLARE_TYPE(QVBarModelMapper) |
|
94 | 94 | QML_DECLARE_TYPE(QVPieModelMapper) |
|
95 | 95 | QML_DECLARE_TYPE(QVXYModelMapper) |
|
96 | 96 | QML_DECLARE_TYPE(QXYLegendMarker) |
|
97 | 97 | QML_DECLARE_TYPE(QXYModelMapper) |
|
98 | 98 | QML_DECLARE_TYPE(QBoxPlotModelMapper) |
|
99 | 99 | QML_DECLARE_TYPE(QVBoxPlotModelMapper) |
|
100 | 100 | |
|
101 | 101 | QML_DECLARE_TYPE(QAbstractSeries) |
|
102 | 102 | QML_DECLARE_TYPE(QXYSeries) |
|
103 | 103 | QML_DECLARE_TYPE(QAbstractBarSeries) |
|
104 | 104 | QML_DECLARE_TYPE(QBarSeries) |
|
105 | 105 | QML_DECLARE_TYPE(QBarSet) |
|
106 | 106 | QML_DECLARE_TYPE(QAreaSeries) |
|
107 | 107 | QML_DECLARE_TYPE(QHorizontalBarSeries) |
|
108 | 108 | QML_DECLARE_TYPE(QHorizontalPercentBarSeries) |
|
109 | 109 | QML_DECLARE_TYPE(QHorizontalStackedBarSeries) |
|
110 | 110 | QML_DECLARE_TYPE(QLineSeries) |
|
111 | 111 | QML_DECLARE_TYPE(QPercentBarSeries) |
|
112 | 112 | QML_DECLARE_TYPE(QPieSeries) |
|
113 | 113 | QML_DECLARE_TYPE(QPieSlice) |
|
114 | 114 | QML_DECLARE_TYPE(QScatterSeries) |
|
115 | 115 | QML_DECLARE_TYPE(QSplineSeries) |
|
116 | 116 | QML_DECLARE_TYPE(QStackedBarSeries) |
|
117 | 117 | |
|
118 | 118 | QT_CHARTS_BEGIN_NAMESPACE |
|
119 | 119 | |
|
120 | 120 | class QtChartsQml2Plugin : public QQmlExtensionPlugin |
|
121 | 121 | { |
|
122 | 122 | Q_OBJECT |
|
123 | 123 | |
|
124 | 124 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") |
|
125 | 125 | |
|
126 | 126 | public: |
|
127 | 127 | virtual void registerTypes(const char *uri) |
|
128 | 128 | { |
|
129 | 129 | Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCharts")); |
|
130 | 130 | |
|
131 | 131 | // @uri QtCharts |
|
132 | 132 | |
|
133 | 133 | qRegisterMetaType<QList<QPieSlice *> >(); |
|
134 | 134 | qRegisterMetaType<QList<QBarSet *> >(); |
|
135 | 135 | qRegisterMetaType<QList<QAbstractAxis *> >(); |
|
136 | 136 | |
|
137 | 137 | // QtCharts 1.0 |
|
138 | 138 | qmlRegisterType<DeclarativeChart>(uri, 1, 0, "ChartView"); |
|
139 | 139 | qmlRegisterType<DeclarativeXYPoint>(uri, 1, 0, "XYPoint"); |
|
140 | 140 | qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries"); |
|
141 | 141 | qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries"); |
|
142 | 142 | qmlRegisterType<DeclarativeSplineSeries>(uri, 1, 0, "SplineSeries"); |
|
143 | 143 | qmlRegisterType<DeclarativeAreaSeries>(uri, 1, 0, "AreaSeries"); |
|
144 | 144 | qmlRegisterType<DeclarativeBarSeries>(uri, 1, 0, "BarSeries"); |
|
145 | 145 | qmlRegisterType<DeclarativeStackedBarSeries>(uri, 1, 0, "StackedBarSeries"); |
|
146 | 146 | qmlRegisterType<DeclarativePercentBarSeries>(uri, 1, 0, "PercentBarSeries"); |
|
147 | 147 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries"); |
|
148 | 148 | qmlRegisterType<QPieSlice>(uri, 1, 0, "PieSlice"); |
|
149 | 149 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 0, "BarSet"); |
|
150 | 150 | qmlRegisterType<QHXYModelMapper>(uri, 1, 0, "HXYModelMapper"); |
|
151 | 151 | qmlRegisterType<QVXYModelMapper>(uri, 1, 0, "VXYModelMapper"); |
|
152 | 152 | qmlRegisterType<QHPieModelMapper>(uri, 1, 0, "HPieModelMapper"); |
|
153 | 153 | qmlRegisterType<QVPieModelMapper>(uri, 1, 0, "VPieModelMapper"); |
|
154 | 154 | qmlRegisterType<QHBarModelMapper>(uri, 1, 0, "HBarModelMapper"); |
|
155 | 155 | qmlRegisterType<QVBarModelMapper>(uri, 1, 0, "VBarModelMapper"); |
|
156 | 156 | |
|
157 | 157 | qmlRegisterType<QValueAxis>(uri, 1, 0, "ValuesAxis"); |
|
158 | 158 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 0, "BarCategoriesAxis"); |
|
159 | 159 | qmlRegisterUncreatableType<QLegend>(uri, 1, 0, "Legend", |
|
160 | 160 | QLatin1String("Trying to create uncreatable: Legend.")); |
|
161 | 161 | qmlRegisterUncreatableType<QXYSeries>(uri, 1, 0, "XYSeries", |
|
162 | 162 | QLatin1String("Trying to create uncreatable: XYSeries.")); |
|
163 | 163 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel", |
|
164 | 164 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); |
|
165 | 165 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 1, 0, "XYModelMapper", |
|
166 | 166 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); |
|
167 | 167 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 1, 0, "PieModelMapper", |
|
168 | 168 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); |
|
169 | 169 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 1, 0, "BarModelMapper", |
|
170 | 170 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); |
|
171 | 171 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 1, 0, "AbstractSeries", |
|
172 | 172 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); |
|
173 | 173 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 1, 0, "AbstractBarSeries", |
|
174 | 174 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); |
|
175 | 175 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 1, 0, "AbstractAxis", |
|
176 | 176 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); |
|
177 | 177 | qmlRegisterUncreatableType<QBarSet>(uri, 1, 0, "BarSetBase", |
|
178 | 178 | QLatin1String("Trying to create uncreatable: BarsetBase.")); |
|
179 | 179 | qmlRegisterUncreatableType<QPieSeries>(uri, 1, 0, "QPieSeries", |
|
180 | 180 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); |
|
181 | 181 | qmlRegisterUncreatableType<DeclarativeAxes>(uri, 1, 0, "DeclarativeAxes", |
|
182 | 182 | QLatin1String("Trying to create uncreatable: DeclarativeAxes.")); |
|
183 | 183 | |
|
184 | 184 | // QtCharts 1.1 |
|
185 | 185 | qmlRegisterType<DeclarativeChart, 1>(uri, 1, 1, "ChartView"); |
|
186 | 186 | qmlRegisterType<DeclarativeScatterSeries, 1>(uri, 1, 1, "ScatterSeries"); |
|
187 | 187 | qmlRegisterType<DeclarativeLineSeries, 1>(uri, 1, 1, "LineSeries"); |
|
188 | 188 | qmlRegisterType<DeclarativeSplineSeries, 1>(uri, 1, 1, "SplineSeries"); |
|
189 | 189 | qmlRegisterType<DeclarativeAreaSeries, 1>(uri, 1, 1, "AreaSeries"); |
|
190 | 190 | qmlRegisterType<DeclarativeBarSeries, 1>(uri, 1, 1, "BarSeries"); |
|
191 | 191 | qmlRegisterType<DeclarativeStackedBarSeries, 1>(uri, 1, 1, "StackedBarSeries"); |
|
192 | 192 | qmlRegisterType<DeclarativePercentBarSeries, 1>(uri, 1, 1, "PercentBarSeries"); |
|
193 | 193 | qmlRegisterType<DeclarativeHorizontalBarSeries, 1>(uri, 1, 1, "HorizontalBarSeries"); |
|
194 | 194 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 1>(uri, 1, 1, "HorizontalStackedBarSeries"); |
|
195 | 195 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 1>(uri, 1, 1, "HorizontalPercentBarSeries"); |
|
196 | 196 | qmlRegisterType<DeclarativePieSeries>(uri, 1, 1, "PieSeries"); |
|
197 | 197 | qmlRegisterType<DeclarativeBarSet>(uri, 1, 1, "BarSet"); |
|
198 | 198 | qmlRegisterType<QValueAxis>(uri, 1, 1, "ValueAxis"); |
|
199 | 199 | #ifndef QT_ON_ARM |
|
200 | 200 | qmlRegisterType<QDateTimeAxis>(uri, 1, 1, "DateTimeAxis"); |
|
201 | 201 | #endif |
|
202 | 202 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 1, 1, "CategoryAxis"); |
|
203 | 203 | qmlRegisterType<DeclarativeCategoryRange>(uri, 1, 1, "CategoryRange"); |
|
204 | 204 | qmlRegisterType<QBarCategoryAxis>(uri, 1, 1, "BarCategoryAxis"); |
|
205 | 205 | qmlRegisterUncreatableType<DeclarativeMargins>(uri, 1, 1, "Margins", |
|
206 | 206 | QLatin1String("Trying to create uncreatable: Margins.")); |
|
207 | 207 | |
|
208 | 208 | // QtCharts 1.2 |
|
209 | 209 | qmlRegisterType<DeclarativeChart, 2>(uri, 1, 2, "ChartView"); |
|
210 | 210 | qmlRegisterType<DeclarativeScatterSeries, 2>(uri, 1, 2, "ScatterSeries"); |
|
211 | 211 | qmlRegisterType<DeclarativeLineSeries, 2>(uri, 1, 2, "LineSeries"); |
|
212 | 212 | qmlRegisterType<DeclarativeSplineSeries, 2>(uri, 1, 2, "SplineSeries"); |
|
213 | 213 | qmlRegisterType<DeclarativeAreaSeries, 2>(uri, 1, 2, "AreaSeries"); |
|
214 | 214 | qmlRegisterType<DeclarativeBarSeries, 2>(uri, 1, 2, "BarSeries"); |
|
215 | 215 | qmlRegisterType<DeclarativeStackedBarSeries, 2>(uri, 1, 2, "StackedBarSeries"); |
|
216 | 216 | qmlRegisterType<DeclarativePercentBarSeries, 2>(uri, 1, 2, "PercentBarSeries"); |
|
217 | 217 | qmlRegisterType<DeclarativeHorizontalBarSeries, 2>(uri, 1, 2, "HorizontalBarSeries"); |
|
218 | 218 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 2>(uri, 1, 2, "HorizontalStackedBarSeries"); |
|
219 | 219 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 2>(uri, 1, 2, "HorizontalPercentBarSeries"); |
|
220 | 220 | |
|
221 | 221 | // QtCharts 1.3 |
|
222 | 222 | qmlRegisterType<DeclarativeChart, 3>(uri, 1, 3, "ChartView"); |
|
223 | 223 | qmlRegisterType<DeclarativePolarChart, 1>(uri, 1, 3, "PolarChartView"); |
|
224 | 224 | qmlRegisterType<DeclarativeSplineSeries, 3>(uri, 1, 3, "SplineSeries"); |
|
225 | 225 | qmlRegisterType<DeclarativeScatterSeries, 3>(uri, 1, 3, "ScatterSeries"); |
|
226 | 226 | qmlRegisterType<DeclarativeLineSeries, 3>(uri, 1, 3, "LineSeries"); |
|
227 | 227 | qmlRegisterType<DeclarativeAreaSeries, 3>(uri, 1, 3, "AreaSeries"); |
|
228 | 228 | qmlRegisterType<QLogValueAxis>(uri, 1, 3, "LogValueAxis"); |
|
229 | 229 | qmlRegisterType<DeclarativeBoxPlotSeries>(uri, 1, 3, "BoxPlotSeries"); |
|
230 | 230 | qmlRegisterType<DeclarativeBoxSet>(uri, 1, 3, "BoxSet"); |
|
231 | 231 | |
|
232 | 232 | // QtCharts 1.4 |
|
233 | 233 | qmlRegisterType<DeclarativeAreaSeries, 4>(uri, 1, 4, "AreaSeries"); |
|
234 | 234 | qmlRegisterType<DeclarativeBarSet, 2>(uri, 1, 4, "BarSet"); |
|
235 | 235 | qmlRegisterType<DeclarativeBoxPlotSeries, 1>(uri, 1, 4, "BoxPlotSeries"); |
|
236 | 236 | qmlRegisterType<DeclarativeBoxSet, 1>(uri, 1, 4, "BoxSet"); |
|
237 | 237 | qmlRegisterType<DeclarativePieSlice>(uri, 1, 4, "PieSlice"); |
|
238 | 238 | qmlRegisterType<DeclarativeScatterSeries, 4>(uri, 1, 4, "ScatterSeries"); |
|
239 | 239 | |
|
240 | 240 | // QtCharts 2.0 |
|
241 | 241 | qmlRegisterType<QVBoxPlotModelMapper>(uri, 2, 0, "VBoxPlotModelMapper"); |
|
242 | 242 | qmlRegisterUncreatableType<QBoxPlotModelMapper>(uri, 2, 0, "BoxPlotModelMapper", |
|
243 | 243 | QLatin1String("Trying to create uncreatable: BoxPlotModelMapper.")); |
|
244 | 244 | qmlRegisterType<DeclarativeChart, 4>(uri, 2, 0, "ChartView"); |
|
245 | 245 | qmlRegisterType<DeclarativeXYPoint>(uri, 2, 0, "XYPoint"); |
|
246 | 246 | qmlRegisterType<DeclarativeScatterSeries, 4>(uri, 2, 0, "ScatterSeries"); |
|
247 | 247 | qmlRegisterType<DeclarativeLineSeries, 3>(uri, 2, 0, "LineSeries"); |
|
248 | 248 | qmlRegisterType<DeclarativeSplineSeries, 3>(uri, 2, 0, "SplineSeries"); |
|
249 | 249 | qmlRegisterType<DeclarativeAreaSeries, 4>(uri, 2, 0, "AreaSeries"); |
|
250 | 250 | qmlRegisterType<DeclarativeBarSeries, 2>(uri, 2, 0, "BarSeries"); |
|
251 | 251 | qmlRegisterType<DeclarativeStackedBarSeries, 2>(uri, 2, 0, "StackedBarSeries"); |
|
252 | 252 | qmlRegisterType<DeclarativePercentBarSeries, 2>(uri, 2, 0, "PercentBarSeries"); |
|
253 | 253 | qmlRegisterType<DeclarativePieSeries>(uri, 2, 0, "PieSeries"); |
|
254 | 254 | qmlRegisterType<QPieSlice>(uri, 2, 0, "PieSlice"); |
|
255 | 255 | qmlRegisterType<DeclarativeBarSet, 2>(uri, 2, 0, "BarSet"); |
|
256 | 256 | qmlRegisterType<QHXYModelMapper>(uri, 2, 0, "HXYModelMapper"); |
|
257 | 257 | qmlRegisterType<QVXYModelMapper>(uri, 2, 0, "VXYModelMapper"); |
|
258 | 258 | qmlRegisterType<QHPieModelMapper>(uri, 2, 0, "HPieModelMapper"); |
|
259 | 259 | qmlRegisterType<QVPieModelMapper>(uri, 2, 0, "VPieModelMapper"); |
|
260 | 260 | qmlRegisterType<QHBarModelMapper>(uri, 2, 0, "HBarModelMapper"); |
|
261 | 261 | qmlRegisterType<QVBarModelMapper>(uri, 2, 0, "VBarModelMapper"); |
|
262 | 262 | qmlRegisterType<QValueAxis>(uri, 2, 0, "ValueAxis"); |
|
263 | 263 | #ifndef QT_ON_ARM |
|
264 | 264 | qmlRegisterType<QDateTimeAxis>(uri, 2, 0, "DateTimeAxis"); |
|
265 | 265 | #endif |
|
266 | 266 | qmlRegisterType<DeclarativeCategoryAxis>(uri, 2, 0, "CategoryAxis"); |
|
267 | 267 | qmlRegisterType<DeclarativeCategoryRange>(uri, 2, 0, "CategoryRange"); |
|
268 | 268 | qmlRegisterType<QBarCategoryAxis>(uri, 2, 0, "BarCategoryAxis"); |
|
269 | 269 | qmlRegisterType<DeclarativePolarChart, 1>(uri, 2, 0, "PolarChartView"); |
|
270 | 270 | qmlRegisterType<QLogValueAxis, 1>(uri, 2, 0, "LogValueAxis"); |
|
271 | 271 | qmlRegisterType<DeclarativeBoxPlotSeries, 1>(uri, 2, 0, "BoxPlotSeries"); |
|
272 | 272 | qmlRegisterType<DeclarativeBoxSet, 1>(uri, 2, 0, "BoxSet"); |
|
273 | 273 | qmlRegisterType<DeclarativeHorizontalBarSeries, 2>(uri, 2, 0, "HorizontalBarSeries"); |
|
274 | 274 | qmlRegisterType<DeclarativeHorizontalStackedBarSeries, 2>(uri, 2, 0, "HorizontalStackedBarSeries"); |
|
275 | 275 | qmlRegisterType<DeclarativeHorizontalPercentBarSeries, 2>(uri, 2, 0, "HorizontalPercentBarSeries"); |
|
276 | 276 | qmlRegisterType<DeclarativePieSlice>(uri, 2, 0, "PieSlice"); |
|
277 | 277 | qmlRegisterUncreatableType<QLegend>(uri, 2, 0, "Legend", |
|
278 | 278 | QLatin1String("Trying to create uncreatable: Legend.")); |
|
279 | 279 | qmlRegisterUncreatableType<QXYSeries>(uri, 2, 0, "XYSeries", |
|
280 | 280 | QLatin1String("Trying to create uncreatable: XYSeries.")); |
|
281 | 281 | qmlRegisterUncreatableType<QAbstractItemModel>(uri, 2, 0, "AbstractItemModel", |
|
282 | 282 | QLatin1String("Trying to create uncreatable: AbstractItemModel.")); |
|
283 | 283 | qmlRegisterUncreatableType<QXYModelMapper>(uri, 2, 0, "XYModelMapper", |
|
284 | 284 | QLatin1String("Trying to create uncreatable: XYModelMapper.")); |
|
285 | 285 | qmlRegisterUncreatableType<QPieModelMapper>(uri, 2, 0, "PieModelMapper", |
|
286 | 286 | QLatin1String("Trying to create uncreatable: PieModelMapper.")); |
|
287 | 287 | qmlRegisterUncreatableType<QBarModelMapper>(uri, 2, 0, "BarModelMapper", |
|
288 | 288 | QLatin1String("Trying to create uncreatable: BarModelMapper.")); |
|
289 | 289 | qmlRegisterUncreatableType<QAbstractSeries>(uri, 2, 0, "AbstractSeries", |
|
290 | 290 | QLatin1String("Trying to create uncreatable: AbstractSeries.")); |
|
291 | 291 | qmlRegisterUncreatableType<QAbstractBarSeries>(uri, 2, 0, "AbstractBarSeries", |
|
292 | 292 | QLatin1String("Trying to create uncreatable: AbstractBarSeries.")); |
|
293 | 293 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 2, 0, "AbstractAxis", |
|
294 | 294 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); |
|
295 | 295 | qmlRegisterUncreatableType<QBarSet>(uri, 2, 0, "BarSetBase", |
|
296 | 296 | QLatin1String("Trying to create uncreatable: BarsetBase.")); |
|
297 | 297 | qmlRegisterUncreatableType<QPieSeries>(uri, 2, 0, "QPieSeries", |
|
298 | 298 | QLatin1String("Trying to create uncreatable: QPieSeries. Use PieSeries instead.")); |
|
299 | 299 | qmlRegisterUncreatableType<DeclarativeAxes>(uri, 2, 0, "DeclarativeAxes", |
|
300 | 300 | QLatin1String("Trying to create uncreatable: DeclarativeAxes.")); |
|
301 | 301 | qmlRegisterUncreatableType<DeclarativeMargins>(uri, 2, 0, "Margins", |
|
302 | 302 | QLatin1String("Trying to create uncreatable: Margins.")); |
|
303 | 303 | |
|
304 | 304 | // QtCharts 2.1 |
|
305 | 305 | qmlRegisterType<DeclarativeCategoryAxis, 1>(uri, 2, 1, "CategoryAxis"); |
|
306 | 306 | qmlRegisterUncreatableType<QAbstractAxis>(uri, 2, 1, "AbstractAxis", |
|
307 | 307 | QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead.")); |
|
308 | qmlRegisterType<DeclarativeChart, 5>(uri, 2, 1, "ChartView"); | |
|
308 | 309 | } |
|
309 | 310 | |
|
310 | 311 | }; |
|
311 | 312 | |
|
312 | 313 | QT_CHARTS_END_NAMESPACE |
|
313 | 314 | |
|
314 | 315 | #include "chartsqml2_plugin.moc" |
|
315 | 316 | |
|
316 | 317 | QT_CHARTS_USE_NAMESPACE |
@@ -1,1063 +1,1109 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2015 The Qt Company Ltd |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to The Qt Company, please use contact form at http://qt.io |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Charts module. |
|
8 | 8 | ** |
|
9 | 9 | ** Licensees holding valid commercial license for Qt may use this file in |
|
10 | 10 | ** accordance with the Qt License Agreement provided with the Software |
|
11 | 11 | ** or, alternatively, in accordance with the terms contained in a written |
|
12 | 12 | ** agreement between you and The Qt Company. |
|
13 | 13 | ** |
|
14 | 14 | ** If you have questions regarding the use of this file, please use |
|
15 | 15 | ** contact form at http://qt.io |
|
16 | 16 | ** |
|
17 | 17 | ****************************************************************************/ |
|
18 | 18 | |
|
19 | 19 | #include "declarativechart.h" |
|
20 | 20 | #include <QtGui/QPainter> |
|
21 | 21 | #include "declarativelineseries.h" |
|
22 | 22 | #include "declarativeareaseries.h" |
|
23 | 23 | #include "declarativebarseries.h" |
|
24 | 24 | #include "declarativepieseries.h" |
|
25 | 25 | #include "declarativesplineseries.h" |
|
26 | 26 | #include "declarativeboxplotseries.h" |
|
27 | 27 | #include "declarativescatterseries.h" |
|
28 | 28 | #include <QtCharts/QBarCategoryAxis> |
|
29 | 29 | #include <QtCharts/QValueAxis> |
|
30 | 30 | #include <QtCharts/QLogValueAxis> |
|
31 | 31 | #include <QtCharts/QCategoryAxis> |
|
32 | 32 | #include <private/qabstractseries_p.h> |
|
33 | 33 | #include "declarativemargins.h" |
|
34 | 34 | #include <private/chartdataset_p.h> |
|
35 | 35 | #include "declarativeaxes.h" |
|
36 | 36 | #include <private/qchart_p.h> |
|
37 | 37 | #include <QtCharts/QPolarChart> |
|
38 | 38 | |
|
39 | 39 | #ifndef QT_ON_ARM |
|
40 | 40 | #include <QtCharts/QDateTimeAxis> |
|
41 | 41 | #endif |
|
42 | 42 | |
|
43 | 43 | #include <QtWidgets/QGraphicsSceneMouseEvent> |
|
44 | 44 | #include <QtWidgets/QGraphicsSceneHoverEvent> |
|
45 | 45 | #include <QtWidgets/QApplication> |
|
46 | 46 | #include <QtCore/QTimer> |
|
47 | 47 | #include <QtCore/QThread> |
|
48 | 48 | |
|
49 | 49 | QT_CHARTS_BEGIN_NAMESPACE |
|
50 | 50 | |
|
51 | 51 | /*! |
|
52 | 52 | \qmltype ChartView |
|
53 | 53 | \instantiates DeclarativeChart |
|
54 | 54 | \inqmlmodule QtCharts |
|
55 | 55 | |
|
56 | 56 | \brief Chart element. |
|
57 | 57 | |
|
58 | 58 | ChartView element is the parent that is responsible for showing different chart series types. |
|
59 | 59 | |
|
60 | 60 | The following QML shows how to create a simple chart with one pie series: |
|
61 | 61 | \snippet qmlpiechart/qml/qmlpiechart/main.qml 1 |
|
62 | 62 | \snippet qmlpiechart/qml/qmlpiechart/main.qml 2 |
|
63 | 63 | \snippet qmlpiechart/qml/qmlpiechart/main.qml 3 |
|
64 | 64 | |
|
65 | 65 | \beginfloatleft |
|
66 | 66 | \image examples_qmlpiechart.png |
|
67 | 67 | \endfloat |
|
68 | 68 | \clearfloat |
|
69 | 69 | */ |
|
70 | 70 | |
|
71 | 71 | /*! |
|
72 | 72 | \qmlproperty Theme ChartView::theme |
|
73 | 73 | Theme defines the visual appearance of the chart, including for example colors, fonts, line |
|
74 | 74 | widths and chart background. |
|
75 | 75 | */ |
|
76 | 76 | |
|
77 | 77 | /*! |
|
78 | 78 | \qmlproperty Animation ChartView::animationOptions |
|
79 | 79 | Animation configuration of the chart. One of ChartView.NoAnimation, ChartView.GridAxisAnimations, |
|
80 | 80 | ChartView.SeriesAnimations or ChartView.AllAnimations. |
|
81 | 81 | */ |
|
82 | 82 | |
|
83 | 83 | /*! |
|
84 | 84 | \qmlproperty Font ChartView::titleFont |
|
85 | 85 | The title font of the chart. |
|
86 | 86 | |
|
87 | 87 | See the Qt documentation for more details of Font. |
|
88 | 88 | */ |
|
89 | 89 | |
|
90 | 90 | /*! |
|
91 | 91 | \qmlproperty string ChartView::title |
|
92 | 92 | The title of the chart, shown on top of the chart. |
|
93 | 93 | \sa ChartView::titleColor |
|
94 | 94 | */ |
|
95 | 95 | |
|
96 | 96 | /*! |
|
97 | 97 | \qmlproperty color ChartView::titleColor |
|
98 | 98 | The color of the title text. |
|
99 | 99 | */ |
|
100 | 100 | |
|
101 | 101 | /*! |
|
102 | 102 | \qmlproperty Legend ChartView::legend |
|
103 | 103 | The legend of the chart. Legend lists all the series, pie slices and bar sets added on the chart. |
|
104 | 104 | */ |
|
105 | 105 | |
|
106 | 106 | /*! |
|
107 | 107 | \qmlproperty int ChartView::count |
|
108 | 108 | The count of series added to the chart. |
|
109 | 109 | */ |
|
110 | 110 | |
|
111 | 111 | /*! |
|
112 | 112 | \qmlproperty color ChartView::backgroundColor |
|
113 | 113 | The color of the chart's background. By default background color is defined by chart theme. |
|
114 | 114 | \sa ChartView::theme |
|
115 | 115 | */ |
|
116 | 116 | |
|
117 | 117 | /*! |
|
118 | 118 | \qmlproperty real ChartView::backgroundRoundness |
|
119 | 119 | The diameter of the rounding circle at the corners of the chart background. |
|
120 | 120 | */ |
|
121 | 121 | |
|
122 | 122 | /*! |
|
123 | 123 | \qmlproperty color ChartView::plotAreaColor |
|
124 | 124 | The color of the background of the chart's plot area. By default plot area background uses chart's |
|
125 | 125 | background color. |
|
126 | 126 | \sa ChartView::backgroundColor |
|
127 | 127 | */ |
|
128 | 128 | |
|
129 | 129 | /*! |
|
130 | 130 | \qmlproperty list<AbstractAxis> ChartView::axes |
|
131 | 131 | The axes of the ChartView. |
|
132 | 132 | */ |
|
133 | 133 | |
|
134 | 134 | /*! |
|
135 | 135 | \qmlproperty bool ChartView::dropShadowEnabled |
|
136 | 136 | The chart's border drop shadow. Set to true to enable drop shadow. |
|
137 | 137 | */ |
|
138 | 138 | |
|
139 | 139 | /*! |
|
140 | 140 | \qmlproperty rect ChartView::plotArea |
|
141 | 141 | The area on the ChartView that is used for drawing series. This is the ChartView rect without the |
|
142 | 142 | margins. |
|
143 | 143 | \sa ChartView::margins |
|
144 | 144 | */ |
|
145 | 145 | |
|
146 | 146 | /*! |
|
147 | 147 | \qmlproperty Margins ChartView::margins |
|
148 | 148 | The minimum margins allowed between the outer bounds and the plotArea of the ChartView. Margins |
|
149 | 149 | area of ChartView is used for drawing title, axes and legend. |
|
150 | 150 | */ |
|
151 | 151 | |
|
152 | 152 | /*! |
|
153 | 153 | \qmlproperty bool ChartView::localizeNumbers |
|
154 | 154 | \since QtCharts 2.0 |
|
155 | 155 | When \c{true}, all generated numbers appearing in various series and axis labels will be |
|
156 | 156 | localized using the default QLocale of the application, which defaults to the system locale. |
|
157 | 157 | When \c{false}, the "C" locale is always used. |
|
158 | 158 | Defaults to \c{false}. |
|
159 | 159 | |
|
160 | 160 | \sa locale |
|
161 | 161 | */ |
|
162 | 162 | |
|
163 | 163 | /*! |
|
164 | 164 | \qmlproperty locale ChartView::locale |
|
165 | 165 | \since QtCharts 2.0 |
|
166 | 166 | Sets the locale used to format various chart labels when localizeNumbers is \c{true}. |
|
167 | 167 | This also determines the locale used to format DateTimeAxis labels regardless of |
|
168 | 168 | localizeNumbers property. |
|
169 | 169 | Defaults to application default locale at the time the chart is constructed. |
|
170 | 170 | |
|
171 | 171 | \sa localizeNumbers |
|
172 | 172 | */ |
|
173 | 173 | |
|
174 | 174 | /*! |
|
175 | 175 | \qmlmethod AbstractSeries ChartView::series(int index) |
|
176 | 176 | Returns the series with \a index on the chart. This allows you to loop through the series of a chart together with |
|
177 | 177 | the count property of the chart. |
|
178 | 178 | */ |
|
179 | 179 | |
|
180 | 180 | /*! |
|
181 | 181 | \qmlmethod AbstractSeries ChartView::series(string name) |
|
182 | 182 | Returns the first series on the chart with \a name. If there is no series with that name, returns null. |
|
183 | 183 | */ |
|
184 | 184 | |
|
185 | 185 | /*! |
|
186 | 186 | \qmlmethod AbstractSeries ChartView::createSeries(SeriesType type, string name, AbstractAxis axisX, AbstractAxis axisY) |
|
187 | 187 | Creates a series object of \a type to the chart with name \a name, optional axis \a axisX and |
|
188 | 188 | optional axis \a axisY. For example: |
|
189 | 189 | \code |
|
190 | 190 | // lineSeries is a LineSeries object that has already been added to the ChartView; re-use it's axes |
|
191 | 191 | var myAxisX = chartView.axisX(lineSeries); |
|
192 | 192 | var myAxisY = chartView.axisY(lineSeries); |
|
193 | 193 | var scatter = chartView.createSeries(ChartView.SeriesTypeScatter, "scatter series", myAxisX, myAxisY); |
|
194 | 194 | \endcode |
|
195 | 195 | */ |
|
196 | 196 | |
|
197 | 197 | /*! |
|
198 | 198 | \qmlmethod ChartView::removeSeries(AbstractSeries series) |
|
199 | 199 | Removes the \a series from the chart. The series object is also destroyed. |
|
200 | 200 | */ |
|
201 | 201 | |
|
202 | 202 | /*! |
|
203 | 203 | \qmlmethod ChartView::removeAllSeries() |
|
204 | 204 | Removes all series from the chart. All the series objects are also destroyed. |
|
205 | 205 | */ |
|
206 | 206 | |
|
207 | 207 | /*! |
|
208 | 208 | \qmlmethod Axis ChartView::axisX(AbstractSeries series) |
|
209 | 209 | The x-axis of the series. |
|
210 | 210 | */ |
|
211 | 211 | |
|
212 | 212 | /*! |
|
213 | 213 | \qmlmethod ChartView::setAxisX(AbstractAxis axis, AbstractSeries series) |
|
214 | 214 | Set the x-axis of the series. |
|
215 | 215 | */ |
|
216 | 216 | |
|
217 | 217 | /*! |
|
218 | 218 | \qmlmethod Axis ChartView::axisY(AbstractSeries series) |
|
219 | 219 | The y-axis of the series. |
|
220 | 220 | */ |
|
221 | 221 | |
|
222 | 222 | /*! |
|
223 | 223 | \qmlmethod ChartView::setAxisY(AbstractAxis axis, AbstractSeries series) |
|
224 | 224 | Set the y-axis of the series. |
|
225 | 225 | */ |
|
226 | 226 | |
|
227 | 227 | /*! |
|
228 | 228 | \qmlmethod ChartView::zoom(real factor) |
|
229 | 229 | Zooms in by \a factor on the center of the chart. |
|
230 | ||
|
231 | A factor over 1.0 zooms the view in and factor between 0.0 and 1.0 zooms out. | |
|
232 | */ | |
|
233 | ||
|
234 | /*! | |
|
235 | \qmlmethod ChartView::zoomIn() | |
|
236 | Zooms in the view by a factor of two. | |
|
237 | */ | |
|
238 | ||
|
239 | /*! | |
|
240 | \qmlmethod ChartView::zoomIn(rect rectangle) | |
|
241 | Zooms in the view to a maximum level at which \a rectangle is still fully visible. | |
|
242 | \note This is not supported for polar charts. | |
|
243 | */ | |
|
244 | ||
|
245 | /*! | |
|
246 | \qmlmethod ChartView::zoomOut() | |
|
247 | Zooms out the view by a factor of two. | |
|
248 | */ | |
|
249 | ||
|
250 | /*! | |
|
251 | \qmlmethod ChartView::zoomReset() | |
|
252 | Resets the series domains to what they were before any zoom method was called. | |
|
253 | Note that this will also reset any scrolls and explicit axis range settings done between | |
|
254 | the first zoom operation and calling this method. If no zoom operation has been | |
|
255 | done, this method does nothing. | |
|
230 | 256 | */ |
|
231 | 257 | |
|
232 | 258 | /*! |
|
233 | 259 | \qmlmethod ChartView::scrollLeft(real pixels) |
|
234 | 260 | Scrolls to left by \a pixels. This is a convenience function that suits for example for key navigation. |
|
235 | 261 | */ |
|
236 | 262 | |
|
237 | 263 | /*! |
|
238 | 264 | \qmlmethod ChartView::scrollRight(real pixels) |
|
239 | 265 | Scrolls to right by \a pixels. This is a convenience function that suits for example for key navigation. |
|
240 | 266 | */ |
|
241 | 267 | |
|
242 | 268 | /*! |
|
243 | 269 | \qmlmethod ChartView::scrollUp(real pixels) |
|
244 | 270 | Scrolls up by \a pixels. This is a convenience function that suits for example for key navigation. |
|
245 | 271 | */ |
|
246 | 272 | |
|
247 | 273 | /*! |
|
248 | 274 | \qmlmethod ChartView::scrollDown(real pixels) |
|
249 | 275 | Scrolls down by \a pixels. This is a convenience function that suits for example for key navigation. |
|
250 | 276 | */ |
|
251 | 277 | |
|
252 | 278 | /*! |
|
253 | 279 | \qmlmethod point ChartView::mapToValue(point position, AbstractSeries series) |
|
254 | 280 | Returns the value in the \a series domain that corresponds to the \a position relative to the |
|
255 | 281 | chart. |
|
256 | 282 | */ |
|
257 | 283 | |
|
258 | 284 | /*! |
|
259 | 285 | \qmlmethod point ChartView::mapToPosition(point value, AbstractSeries series) |
|
260 | 286 | Returns the position on the chart that corresponds to the \a value in the \a series domain. |
|
261 | 287 | */ |
|
262 | 288 | |
|
263 | 289 | /*! |
|
264 | 290 | \qmlsignal ChartView::seriesAdded(AbstractSeries series) |
|
265 | 291 | The \a series has been added to the chart. |
|
266 | 292 | */ |
|
267 | 293 | |
|
268 | 294 | /*! |
|
269 | 295 | \qmlsignal ChartView::seriesRemoved(AbstractSeries series) |
|
270 | 296 | The \a series has been removed from the chart. Please note that \a series is no longer a valid |
|
271 | 297 | object after the signal handler has completed. |
|
272 | 298 | */ |
|
273 | 299 | |
|
274 | 300 | DeclarativeChart::DeclarativeChart(QQuickItem *parent) |
|
275 | 301 | : QQuickPaintedItem(parent) |
|
276 | 302 | { |
|
277 | 303 | initChart(QChart::ChartTypeCartesian); |
|
278 | 304 | } |
|
279 | 305 | |
|
280 | 306 | DeclarativeChart::DeclarativeChart(QChart::ChartType type, QQuickItem *parent) |
|
281 | 307 | : QQuickPaintedItem(parent) |
|
282 | 308 | { |
|
283 | 309 | initChart(type); |
|
284 | 310 | } |
|
285 | 311 | |
|
286 | 312 | void DeclarativeChart::initChart(QChart::ChartType type) |
|
287 | 313 | { |
|
288 | 314 | m_currentSceneImage = 0; |
|
289 | 315 | m_guiThreadId = QThread::currentThreadId(); |
|
290 | 316 | m_paintThreadId = 0; |
|
291 | 317 | m_updatePending = false; |
|
292 | 318 | |
|
293 | 319 | if (type == QChart::ChartTypePolar) |
|
294 | 320 | m_chart = new QPolarChart(); |
|
295 | 321 | else |
|
296 | 322 | m_chart = new QChart(); |
|
297 | 323 | |
|
298 | 324 | m_scene = new QGraphicsScene(this); |
|
299 | 325 | m_scene->addItem(m_chart); |
|
300 | 326 | |
|
301 | 327 | setAntialiasing(QQuickItem::antialiasing()); |
|
302 | 328 | connect(m_scene, SIGNAL(changed(QList<QRectF>)), this, SLOT(sceneChanged(QList<QRectF>))); |
|
303 | 329 | connect(this, SIGNAL(antialiasingChanged(bool)), this, SLOT(handleAntialiasingChanged(bool))); |
|
304 | 330 | |
|
305 | 331 | setAcceptedMouseButtons(Qt::AllButtons); |
|
306 | 332 | setAcceptHoverEvents(true); |
|
307 | 333 | |
|
308 | 334 | m_margins = new DeclarativeMargins(this); |
|
309 | 335 | m_margins->setTop(m_chart->margins().top()); |
|
310 | 336 | m_margins->setLeft(m_chart->margins().left()); |
|
311 | 337 | m_margins->setRight(m_chart->margins().right()); |
|
312 | 338 | m_margins->setBottom(m_chart->margins().bottom()); |
|
313 | 339 | connect(m_margins, SIGNAL(topChanged(int,int,int,int)), |
|
314 | 340 | this, SLOT(changeMargins(int,int,int,int))); |
|
315 | 341 | connect(m_margins, SIGNAL(bottomChanged(int,int,int,int)), |
|
316 | 342 | this, SLOT(changeMargins(int,int,int,int))); |
|
317 | 343 | connect(m_margins, SIGNAL(leftChanged(int,int,int,int)), |
|
318 | 344 | this, SLOT(changeMargins(int,int,int,int))); |
|
319 | 345 | connect(m_margins, SIGNAL(rightChanged(int,int,int,int)), |
|
320 | 346 | this, SLOT(changeMargins(int,int,int,int))); |
|
321 | 347 | connect(m_chart->d_ptr->m_dataset, SIGNAL(seriesAdded(QAbstractSeries*)), this, SLOT(handleSeriesAdded(QAbstractSeries*))); |
|
322 | 348 | connect(m_chart->d_ptr->m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*)), this, SIGNAL(seriesRemoved(QAbstractSeries*))); |
|
323 | 349 | connect(m_chart, &QChart::plotAreaChanged, this, &DeclarativeChart::plotAreaChanged); |
|
324 | 350 | } |
|
325 | 351 | |
|
326 | 352 | void DeclarativeChart::handleSeriesAdded(QAbstractSeries *series) |
|
327 | 353 | { |
|
328 | 354 | emit seriesAdded(series); |
|
329 | 355 | } |
|
330 | 356 | |
|
331 | 357 | void DeclarativeChart::changeMargins(int top, int bottom, int left, int right) |
|
332 | 358 | { |
|
333 | 359 | m_chart->setMargins(QMargins(left, top, right, bottom)); |
|
334 | 360 | emit marginsChanged(); |
|
335 | 361 | } |
|
336 | 362 | |
|
337 | 363 | DeclarativeChart::~DeclarativeChart() |
|
338 | 364 | { |
|
339 | 365 | delete m_chart; |
|
340 | 366 | m_sceneImageLock.lock(); |
|
341 | 367 | delete m_currentSceneImage; |
|
342 | 368 | m_currentSceneImage = 0; |
|
343 | 369 | m_sceneImageLock.unlock(); |
|
344 | 370 | } |
|
345 | 371 | |
|
346 | 372 | void DeclarativeChart::childEvent(QChildEvent *event) |
|
347 | 373 | { |
|
348 | 374 | if (event->type() == QEvent::ChildAdded) { |
|
349 | 375 | if (qobject_cast<QAbstractSeries *>(event->child())) { |
|
350 | 376 | m_chart->addSeries(qobject_cast<QAbstractSeries *>(event->child())); |
|
351 | 377 | } |
|
352 | 378 | } |
|
353 | 379 | } |
|
354 | 380 | |
|
355 | 381 | void DeclarativeChart::componentComplete() |
|
356 | 382 | { |
|
357 | 383 | foreach (QObject *child, children()) { |
|
358 | 384 | if (qobject_cast<QAbstractSeries *>(child)) { |
|
359 | 385 | // Add series to the chart |
|
360 | 386 | QAbstractSeries *series = qobject_cast<QAbstractSeries *>(child); |
|
361 | 387 | m_chart->addSeries(series); |
|
362 | 388 | |
|
363 | 389 | // Connect to axis changed signals (unless this is a pie series) |
|
364 | 390 | if (!qobject_cast<DeclarativePieSeries *>(series)) { |
|
365 | 391 | connect(series, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*))); |
|
366 | 392 | connect(series, SIGNAL(axisXTopChanged(QAbstractAxis*)), this, SLOT(handleAxisXTopSet(QAbstractAxis*))); |
|
367 | 393 | connect(series, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*))); |
|
368 | 394 | connect(series, SIGNAL(axisYRightChanged(QAbstractAxis*)), this, SLOT(handleAxisYRightSet(QAbstractAxis*))); |
|
369 | 395 | } |
|
370 | 396 | |
|
371 | 397 | initializeAxes(series); |
|
372 | 398 | } |
|
373 | 399 | } |
|
374 | 400 | |
|
375 | 401 | QQuickItem::componentComplete(); |
|
376 | 402 | } |
|
377 | 403 | |
|
378 | 404 | void DeclarativeChart::seriesAxisAttachHelper(QAbstractSeries *series, QAbstractAxis *axis, |
|
379 | 405 | Qt::Orientations orientation, |
|
380 | 406 | Qt::Alignment alignment) |
|
381 | 407 | { |
|
382 | 408 | if (!series->attachedAxes().contains(axis)) { |
|
383 | 409 | // Remove & delete old axes that are not attached to any other series |
|
384 | 410 | foreach (QAbstractAxis* oldAxis, m_chart->axes(orientation, series)) { |
|
385 | 411 | bool otherAttachments = false; |
|
386 | 412 | if (oldAxis != axis) { |
|
387 | 413 | foreach (QAbstractSeries *oldSeries, m_chart->series()) { |
|
388 | 414 | if (oldSeries != series && oldSeries->attachedAxes().contains(oldAxis)) { |
|
389 | 415 | otherAttachments = true; |
|
390 | 416 | break; |
|
391 | 417 | } |
|
392 | 418 | } |
|
393 | 419 | if (!otherAttachments) { |
|
394 | 420 | m_chart->removeAxis(oldAxis); |
|
395 | 421 | delete oldAxis; |
|
396 | 422 | } |
|
397 | 423 | } |
|
398 | 424 | } |
|
399 | 425 | if (!m_chart->axes(orientation).contains(axis)) |
|
400 | 426 | m_chart->addAxis(axis, alignment); |
|
401 | 427 | |
|
402 | 428 | series->attachAxis(axis); |
|
403 | 429 | } |
|
404 | 430 | } |
|
405 | 431 | |
|
406 | 432 | void DeclarativeChart::handleAxisXSet(QAbstractAxis *axis) |
|
407 | 433 | { |
|
408 | 434 | QAbstractSeries *s = qobject_cast<QAbstractSeries *>(sender()); |
|
409 | 435 | if (axis && s) { |
|
410 | 436 | seriesAxisAttachHelper(s, axis, Qt::Horizontal, Qt::AlignBottom); |
|
411 | 437 | } else { |
|
412 | 438 | qWarning() << "Trying to set axisX to null."; |
|
413 | 439 | } |
|
414 | 440 | } |
|
415 | 441 | |
|
416 | 442 | void DeclarativeChart::handleAxisXTopSet(QAbstractAxis *axis) |
|
417 | 443 | { |
|
418 | 444 | QAbstractSeries *s = qobject_cast<QAbstractSeries *>(sender()); |
|
419 | 445 | if (axis && s) { |
|
420 | 446 | seriesAxisAttachHelper(s, axis, Qt::Horizontal, Qt::AlignTop); |
|
421 | 447 | } else { |
|
422 | 448 | qWarning() << "Trying to set axisXTop to null."; |
|
423 | 449 | } |
|
424 | 450 | } |
|
425 | 451 | |
|
426 | 452 | void DeclarativeChart::handleAxisYSet(QAbstractAxis *axis) |
|
427 | 453 | { |
|
428 | 454 | QAbstractSeries *s = qobject_cast<QAbstractSeries *>(sender()); |
|
429 | 455 | if (axis && s) { |
|
430 | 456 | seriesAxisAttachHelper(s, axis, Qt::Vertical, Qt::AlignLeft); |
|
431 | 457 | } else { |
|
432 | 458 | qWarning() << "Trying to set axisY to null."; |
|
433 | 459 | } |
|
434 | 460 | } |
|
435 | 461 | |
|
436 | 462 | void DeclarativeChart::handleAxisYRightSet(QAbstractAxis *axis) |
|
437 | 463 | { |
|
438 | 464 | QAbstractSeries *s = qobject_cast<QAbstractSeries *>(sender()); |
|
439 | 465 | if (axis && s) { |
|
440 | 466 | seriesAxisAttachHelper(s, axis, Qt::Vertical, Qt::AlignRight); |
|
441 | 467 | } else { |
|
442 | 468 | qWarning() << "Trying to set axisYRight to null."; |
|
443 | 469 | } |
|
444 | 470 | } |
|
445 | 471 | |
|
446 | 472 | void DeclarativeChart::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) |
|
447 | 473 | { |
|
448 | 474 | if (newGeometry.isValid()) { |
|
449 | 475 | if (newGeometry.width() > 0 && newGeometry.height() > 0) { |
|
450 | 476 | m_chart->resize(newGeometry.width(), newGeometry.height()); |
|
451 | 477 | } |
|
452 | 478 | } |
|
453 | 479 | QQuickItem::geometryChanged(newGeometry, oldGeometry); |
|
454 | 480 | } |
|
455 | 481 | |
|
456 | 482 | void DeclarativeChart::sceneChanged(QList<QRectF> region) |
|
457 | 483 | { |
|
458 | 484 | Q_UNUSED(region); |
|
459 | 485 | |
|
460 | 486 | if (m_guiThreadId == m_paintThreadId) { |
|
461 | 487 | // Rendering in gui thread, no need for shenannigans, just update |
|
462 | 488 | update(); |
|
463 | 489 | } else { |
|
464 | 490 | // Multi-threaded rendering, need to ensure scene is actually rendered in gui thread |
|
465 | 491 | if (!m_updatePending) { |
|
466 | 492 | m_updatePending = true; |
|
467 | 493 | // Do async render to avoid some unnecessary renders. |
|
468 | 494 | QTimer::singleShot(0, this, SLOT(renderScene())); |
|
469 | 495 | } |
|
470 | 496 | } |
|
471 | 497 | } |
|
472 | 498 | |
|
473 | 499 | void DeclarativeChart::renderScene() |
|
474 | 500 | { |
|
475 | 501 | m_updatePending = false; |
|
476 | 502 | m_sceneImageLock.lock(); |
|
477 | 503 | delete m_currentSceneImage; |
|
478 | 504 | m_currentSceneImage = new QImage(m_chart->size().toSize(), QImage::Format_ARGB32); |
|
479 | 505 | m_currentSceneImage->fill(Qt::transparent); |
|
480 | 506 | QPainter painter(m_currentSceneImage); |
|
481 | 507 | if (antialiasing()) |
|
482 | 508 | painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform); |
|
483 | 509 | QRect renderRect(QPoint(0, 0), m_chart->size().toSize()); |
|
484 | 510 | m_scene->render(&painter, renderRect, renderRect); |
|
485 | 511 | m_sceneImageLock.unlock(); |
|
486 | 512 | |
|
487 | 513 | update(); |
|
488 | 514 | } |
|
489 | 515 | |
|
490 | 516 | void DeclarativeChart::paint(QPainter *painter) |
|
491 | 517 | { |
|
492 | 518 | if (!m_paintThreadId) { |
|
493 | 519 | m_paintThreadId = QThread::currentThreadId(); |
|
494 | 520 | if (m_guiThreadId == m_paintThreadId) { |
|
495 | 521 | // No need for scene image in single threaded rendering, so delete |
|
496 | 522 | // the one that got made by default before the rendering type was |
|
497 | 523 | // detected. |
|
498 | 524 | delete m_currentSceneImage; |
|
499 | 525 | m_currentSceneImage = 0; |
|
500 | 526 | } |
|
501 | 527 | } |
|
502 | 528 | |
|
503 | 529 | if (m_guiThreadId == m_paintThreadId) { |
|
504 | 530 | QRectF renderRect(QPointF(0, 0), m_chart->size()); |
|
505 | 531 | m_scene->render(painter, renderRect, renderRect); |
|
506 | 532 | } else { |
|
507 | 533 | m_sceneImageLock.lock(); |
|
508 | 534 | if (m_currentSceneImage) { |
|
509 | 535 | QRect imageRect(QPoint(0, 0), m_currentSceneImage->size()); |
|
510 | 536 | QRect itemRect(QPoint(0, 0), QSize(width(), height())); |
|
511 | 537 | painter->drawImage(itemRect, *m_currentSceneImage, imageRect); |
|
512 | 538 | } |
|
513 | 539 | m_sceneImageLock.unlock(); |
|
514 | 540 | } |
|
515 | 541 | } |
|
516 | 542 | |
|
517 | 543 | void DeclarativeChart::mousePressEvent(QMouseEvent *event) |
|
518 | 544 | { |
|
519 | 545 | m_mousePressScenePoint = event->pos(); |
|
520 | 546 | m_mousePressScreenPoint = event->globalPos(); |
|
521 | 547 | m_lastMouseMoveScenePoint = m_mousePressScenePoint; |
|
522 | 548 | m_lastMouseMoveScreenPoint = m_mousePressScreenPoint; |
|
523 | 549 | m_mousePressButton = event->button(); |
|
524 | 550 | m_mousePressButtons = event->buttons(); |
|
525 | 551 | |
|
526 | 552 | QGraphicsSceneMouseEvent mouseEvent(QEvent::GraphicsSceneMousePress); |
|
527 | 553 | mouseEvent.setWidget(0); |
|
528 | 554 | mouseEvent.setButtonDownScenePos(m_mousePressButton, m_mousePressScenePoint); |
|
529 | 555 | mouseEvent.setButtonDownScreenPos(m_mousePressButton, m_mousePressScreenPoint); |
|
530 | 556 | mouseEvent.setScenePos(m_mousePressScenePoint); |
|
531 | 557 | mouseEvent.setScreenPos(m_mousePressScreenPoint); |
|
532 | 558 | mouseEvent.setLastScenePos(m_lastMouseMoveScenePoint); |
|
533 | 559 | mouseEvent.setLastScreenPos(m_lastMouseMoveScreenPoint); |
|
534 | 560 | mouseEvent.setButtons(m_mousePressButtons); |
|
535 | 561 | mouseEvent.setButton(m_mousePressButton); |
|
536 | 562 | mouseEvent.setModifiers(event->modifiers()); |
|
537 | 563 | mouseEvent.setAccepted(false); |
|
538 | 564 | |
|
539 | 565 | QApplication::sendEvent(m_scene, &mouseEvent); |
|
540 | 566 | } |
|
541 | 567 | |
|
542 | 568 | void DeclarativeChart::mouseReleaseEvent(QMouseEvent *event) |
|
543 | 569 | { |
|
544 | 570 | QGraphicsSceneMouseEvent mouseEvent(QEvent::GraphicsSceneMouseRelease); |
|
545 | 571 | mouseEvent.setWidget(0); |
|
546 | 572 | mouseEvent.setButtonDownScenePos(m_mousePressButton, m_mousePressScenePoint); |
|
547 | 573 | mouseEvent.setButtonDownScreenPos(m_mousePressButton, m_mousePressScreenPoint); |
|
548 | 574 | mouseEvent.setScenePos(event->pos()); |
|
549 | 575 | mouseEvent.setScreenPos(event->globalPos()); |
|
550 | 576 | mouseEvent.setLastScenePos(m_lastMouseMoveScenePoint); |
|
551 | 577 | mouseEvent.setLastScreenPos(m_lastMouseMoveScreenPoint); |
|
552 | 578 | mouseEvent.setButtons(event->buttons()); |
|
553 | 579 | mouseEvent.setButton(event->button()); |
|
554 | 580 | mouseEvent.setModifiers(event->modifiers()); |
|
555 | 581 | mouseEvent.setAccepted(false); |
|
556 | 582 | |
|
557 | 583 | QApplication::sendEvent(m_scene, &mouseEvent); |
|
558 | 584 | |
|
559 | 585 | m_mousePressButtons = event->buttons(); |
|
560 | 586 | m_mousePressButton = Qt::NoButton; |
|
561 | 587 | } |
|
562 | 588 | |
|
563 | 589 | void DeclarativeChart::hoverMoveEvent(QHoverEvent *event) |
|
564 | 590 | { |
|
565 | 591 | // Convert hover move to mouse move, since we don't seem to get actual mouse move events. |
|
566 | 592 | // QGraphicsScene generates hover events from mouse move events, so we don't need |
|
567 | 593 | // to pass hover events there. |
|
568 | 594 | QGraphicsSceneMouseEvent mouseEvent(QEvent::GraphicsSceneMouseMove); |
|
569 | 595 | mouseEvent.setWidget(0); |
|
570 | 596 | mouseEvent.setButtonDownScenePos(m_mousePressButton, m_mousePressScenePoint); |
|
571 | 597 | mouseEvent.setButtonDownScreenPos(m_mousePressButton, m_mousePressScreenPoint); |
|
572 | 598 | mouseEvent.setScenePos(event->pos()); |
|
573 | 599 | // Hover events do not have global pos in them, and the screen position doesn't seem to |
|
574 | 600 | // matter anyway in this use case, so just pass event pos instead of trying to |
|
575 | 601 | // calculate the real screen position. |
|
576 | 602 | mouseEvent.setScreenPos(event->pos()); |
|
577 | 603 | mouseEvent.setLastScenePos(m_lastMouseMoveScenePoint); |
|
578 | 604 | mouseEvent.setLastScreenPos(m_lastMouseMoveScreenPoint); |
|
579 | 605 | mouseEvent.setButtons(m_mousePressButtons); |
|
580 | 606 | mouseEvent.setButton(m_mousePressButton); |
|
581 | 607 | mouseEvent.setModifiers(event->modifiers()); |
|
582 | 608 | m_lastMouseMoveScenePoint = mouseEvent.scenePos(); |
|
583 | 609 | m_lastMouseMoveScreenPoint = mouseEvent.screenPos(); |
|
584 | 610 | mouseEvent.setAccepted(false); |
|
585 | 611 | |
|
586 | 612 | QApplication::sendEvent(m_scene, &mouseEvent); |
|
587 | 613 | } |
|
588 | 614 | |
|
589 | 615 | void DeclarativeChart::mouseDoubleClickEvent(QMouseEvent *event) |
|
590 | 616 | { |
|
591 | 617 | m_mousePressScenePoint = event->pos(); |
|
592 | 618 | m_mousePressScreenPoint = event->globalPos(); |
|
593 | 619 | m_lastMouseMoveScenePoint = m_mousePressScenePoint; |
|
594 | 620 | m_lastMouseMoveScreenPoint = m_mousePressScreenPoint; |
|
595 | 621 | m_mousePressButton = event->button(); |
|
596 | 622 | m_mousePressButtons = event->buttons(); |
|
597 | 623 | |
|
598 | 624 | QGraphicsSceneMouseEvent mouseEvent(QEvent::GraphicsSceneMouseDoubleClick); |
|
599 | 625 | mouseEvent.setWidget(0); |
|
600 | 626 | mouseEvent.setButtonDownScenePos(m_mousePressButton, m_mousePressScenePoint); |
|
601 | 627 | mouseEvent.setButtonDownScreenPos(m_mousePressButton, m_mousePressScreenPoint); |
|
602 | 628 | mouseEvent.setScenePos(m_mousePressScenePoint); |
|
603 | 629 | mouseEvent.setScreenPos(m_mousePressScreenPoint); |
|
604 | 630 | mouseEvent.setLastScenePos(m_lastMouseMoveScenePoint); |
|
605 | 631 | mouseEvent.setLastScreenPos(m_lastMouseMoveScreenPoint); |
|
606 | 632 | mouseEvent.setButtons(m_mousePressButtons); |
|
607 | 633 | mouseEvent.setButton(m_mousePressButton); |
|
608 | 634 | mouseEvent.setModifiers(event->modifiers()); |
|
609 | 635 | mouseEvent.setAccepted(false); |
|
610 | 636 | |
|
611 | 637 | QApplication::sendEvent(m_scene, &mouseEvent); |
|
612 | 638 | } |
|
613 | 639 | |
|
614 | 640 | void DeclarativeChart::handleAntialiasingChanged(bool enable) |
|
615 | 641 | { |
|
616 | 642 | setAntialiasing(enable); |
|
617 | 643 | } |
|
618 | 644 | |
|
619 | 645 | void DeclarativeChart::setTheme(DeclarativeChart::Theme theme) |
|
620 | 646 | { |
|
621 | 647 | QChart::ChartTheme chartTheme = (QChart::ChartTheme) theme; |
|
622 | 648 | if (chartTheme != m_chart->theme()) |
|
623 | 649 | m_chart->setTheme(chartTheme); |
|
624 | 650 | } |
|
625 | 651 | |
|
626 | 652 | DeclarativeChart::Theme DeclarativeChart::theme() |
|
627 | 653 | { |
|
628 | 654 | return (DeclarativeChart::Theme) m_chart->theme(); |
|
629 | 655 | } |
|
630 | 656 | |
|
631 | 657 | void DeclarativeChart::setAnimationOptions(DeclarativeChart::Animation animations) |
|
632 | 658 | { |
|
633 | 659 | QChart::AnimationOption animationOptions = (QChart::AnimationOption) animations; |
|
634 | 660 | if (animationOptions != m_chart->animationOptions()) |
|
635 | 661 | m_chart->setAnimationOptions(animationOptions); |
|
636 | 662 | } |
|
637 | 663 | |
|
638 | 664 | DeclarativeChart::Animation DeclarativeChart::animationOptions() |
|
639 | 665 | { |
|
640 | 666 | if (m_chart->animationOptions().testFlag(QChart::AllAnimations)) |
|
641 | 667 | return DeclarativeChart::AllAnimations; |
|
642 | 668 | else if (m_chart->animationOptions().testFlag(QChart::GridAxisAnimations)) |
|
643 | 669 | return DeclarativeChart::GridAxisAnimations; |
|
644 | 670 | else if (m_chart->animationOptions().testFlag(QChart::SeriesAnimations)) |
|
645 | 671 | return DeclarativeChart::SeriesAnimations; |
|
646 | 672 | else |
|
647 | 673 | return DeclarativeChart::NoAnimation; |
|
648 | 674 | } |
|
649 | 675 | |
|
650 | 676 | void DeclarativeChart::setTitle(QString title) |
|
651 | 677 | { |
|
652 | 678 | if (title != m_chart->title()) |
|
653 | 679 | m_chart->setTitle(title); |
|
654 | 680 | } |
|
655 | 681 | QString DeclarativeChart::title() |
|
656 | 682 | { |
|
657 | 683 | return m_chart->title(); |
|
658 | 684 | } |
|
659 | 685 | |
|
660 | 686 | QAbstractAxis *DeclarativeChart::axisX(QAbstractSeries *series) |
|
661 | 687 | { |
|
662 | 688 | QList<QAbstractAxis *> axes = m_chart->axes(Qt::Horizontal, series); |
|
663 | 689 | if (axes.count()) |
|
664 | 690 | return axes[0]; |
|
665 | 691 | return 0; |
|
666 | 692 | } |
|
667 | 693 | |
|
668 | 694 | QAbstractAxis *DeclarativeChart::axisY(QAbstractSeries *series) |
|
669 | 695 | { |
|
670 | 696 | QList<QAbstractAxis *> axes = m_chart->axes(Qt::Vertical, series); |
|
671 | 697 | if (axes.count()) |
|
672 | 698 | return axes[0]; |
|
673 | 699 | return 0; |
|
674 | 700 | } |
|
675 | 701 | |
|
676 | 702 | QLegend *DeclarativeChart::legend() |
|
677 | 703 | { |
|
678 | 704 | return m_chart->legend(); |
|
679 | 705 | } |
|
680 | 706 | |
|
681 | 707 | void DeclarativeChart::setTitleColor(QColor color) |
|
682 | 708 | { |
|
683 | 709 | QBrush b = m_chart->titleBrush(); |
|
684 | 710 | if (color != b.color()) { |
|
685 | 711 | b.setColor(color); |
|
686 | 712 | m_chart->setTitleBrush(b); |
|
687 | 713 | emit titleColorChanged(color); |
|
688 | 714 | } |
|
689 | 715 | } |
|
690 | 716 | |
|
691 | 717 | QFont DeclarativeChart::titleFont() const |
|
692 | 718 | { |
|
693 | 719 | return m_chart->titleFont(); |
|
694 | 720 | } |
|
695 | 721 | |
|
696 | 722 | void DeclarativeChart::setTitleFont(const QFont &font) |
|
697 | 723 | { |
|
698 | 724 | m_chart->setTitleFont(font); |
|
699 | 725 | } |
|
700 | 726 | |
|
701 | 727 | QColor DeclarativeChart::titleColor() |
|
702 | 728 | { |
|
703 | 729 | return m_chart->titleBrush().color(); |
|
704 | 730 | } |
|
705 | 731 | |
|
706 | 732 | void DeclarativeChart::setBackgroundColor(QColor color) |
|
707 | 733 | { |
|
708 | 734 | QBrush b = m_chart->backgroundBrush(); |
|
709 | 735 | if (b.style() != Qt::SolidPattern || color != b.color()) { |
|
710 | 736 | b.setStyle(Qt::SolidPattern); |
|
711 | 737 | b.setColor(color); |
|
712 | 738 | m_chart->setBackgroundBrush(b); |
|
713 | 739 | emit backgroundColorChanged(); |
|
714 | 740 | } |
|
715 | 741 | } |
|
716 | 742 | |
|
717 | 743 | QColor DeclarativeChart::backgroundColor() |
|
718 | 744 | { |
|
719 | 745 | return m_chart->backgroundBrush().color(); |
|
720 | 746 | } |
|
721 | 747 | |
|
722 | 748 | void QtCharts::DeclarativeChart::setPlotAreaColor(QColor color) |
|
723 | 749 | { |
|
724 | 750 | QBrush b = m_chart->plotAreaBackgroundBrush(); |
|
725 | 751 | if (b.style() != Qt::SolidPattern || color != b.color()) { |
|
726 | 752 | b.setStyle(Qt::SolidPattern); |
|
727 | 753 | b.setColor(color); |
|
728 | 754 | m_chart->setPlotAreaBackgroundBrush(b); |
|
729 | 755 | m_chart->setPlotAreaBackgroundVisible(true); |
|
730 | 756 | emit plotAreaColorChanged(); |
|
731 | 757 | } |
|
732 | 758 | } |
|
733 | 759 | |
|
734 | 760 | QColor QtCharts::DeclarativeChart::plotAreaColor() |
|
735 | 761 | { |
|
736 | 762 | return m_chart->plotAreaBackgroundBrush().color(); |
|
737 | 763 | } |
|
738 | 764 | |
|
739 | 765 | void DeclarativeChart::setLocalizeNumbers(bool localize) |
|
740 | 766 | { |
|
741 | 767 | if (m_chart->localizeNumbers() != localize) { |
|
742 | 768 | m_chart->setLocalizeNumbers(localize); |
|
743 | 769 | emit localizeNumbersChanged(); |
|
744 | 770 | } |
|
745 | 771 | } |
|
746 | 772 | |
|
747 | 773 | bool DeclarativeChart::localizeNumbers() const |
|
748 | 774 | { |
|
749 | 775 | return m_chart->localizeNumbers(); |
|
750 | 776 | } |
|
751 | 777 | |
|
752 | 778 | void QtCharts::DeclarativeChart::setLocale(const QLocale &locale) |
|
753 | 779 | { |
|
754 | 780 | if (m_chart->locale() != locale) { |
|
755 | 781 | m_chart->setLocale(locale); |
|
756 | 782 | emit localeChanged(); |
|
757 | 783 | } |
|
758 | 784 | } |
|
759 | 785 | |
|
760 | 786 | QLocale QtCharts::DeclarativeChart::locale() const |
|
761 | 787 | { |
|
762 | 788 | return m_chart->locale(); |
|
763 | 789 | } |
|
764 | 790 | |
|
765 | 791 | int DeclarativeChart::count() |
|
766 | 792 | { |
|
767 | 793 | return m_chart->series().count(); |
|
768 | 794 | } |
|
769 | 795 | |
|
770 | 796 | void DeclarativeChart::setDropShadowEnabled(bool enabled) |
|
771 | 797 | { |
|
772 | 798 | if (enabled != m_chart->isDropShadowEnabled()) { |
|
773 | 799 | m_chart->setDropShadowEnabled(enabled); |
|
774 | 800 | dropShadowEnabledChanged(enabled); |
|
775 | 801 | } |
|
776 | 802 | } |
|
777 | 803 | |
|
778 | 804 | bool DeclarativeChart::dropShadowEnabled() |
|
779 | 805 | { |
|
780 | 806 | return m_chart->isDropShadowEnabled(); |
|
781 | 807 | } |
|
782 | 808 | |
|
783 | 809 | qreal DeclarativeChart::backgroundRoundness() const |
|
784 | 810 | { |
|
785 | 811 | return m_chart->backgroundRoundness(); |
|
786 | 812 | } |
|
787 | 813 | |
|
788 | 814 | void DeclarativeChart::setBackgroundRoundness(qreal diameter) |
|
789 | 815 | { |
|
790 | 816 | if (m_chart->backgroundRoundness() != diameter) { |
|
791 | 817 | m_chart->setBackgroundRoundness(diameter); |
|
792 | 818 | emit backgroundRoundnessChanged(diameter); |
|
793 | 819 | } |
|
794 | 820 | } |
|
795 | 821 | |
|
796 | 822 | void DeclarativeChart::zoom(qreal factor) |
|
797 | 823 | { |
|
798 | 824 | m_chart->zoom(factor); |
|
799 | 825 | } |
|
800 | 826 | |
|
827 | void DeclarativeChart::zoomIn() | |
|
828 | { | |
|
829 | m_chart->zoomIn(); | |
|
830 | } | |
|
831 | ||
|
832 | void DeclarativeChart::zoomIn(const QRectF &rectangle) | |
|
833 | { | |
|
834 | m_chart->zoomIn(rectangle); | |
|
835 | } | |
|
836 | ||
|
837 | void DeclarativeChart::zoomOut() | |
|
838 | { | |
|
839 | m_chart->zoomOut(); | |
|
840 | } | |
|
841 | ||
|
842 | void DeclarativeChart::zoomReset() | |
|
843 | { | |
|
844 | m_chart->zoomReset(); | |
|
845 | } | |
|
846 | ||
|
801 | 847 | void DeclarativeChart::scrollLeft(qreal pixels) |
|
802 | 848 | { |
|
803 | 849 | m_chart->scroll(-pixels, 0); |
|
804 | 850 | } |
|
805 | 851 | |
|
806 | 852 | void DeclarativeChart::scrollRight(qreal pixels) |
|
807 | 853 | { |
|
808 | 854 | m_chart->scroll(pixels, 0); |
|
809 | 855 | } |
|
810 | 856 | |
|
811 | 857 | void DeclarativeChart::scrollUp(qreal pixels) |
|
812 | 858 | { |
|
813 | 859 | m_chart->scroll(0, pixels); |
|
814 | 860 | } |
|
815 | 861 | |
|
816 | 862 | void DeclarativeChart::scrollDown(qreal pixels) |
|
817 | 863 | { |
|
818 | 864 | m_chart->scroll(0, -pixels); |
|
819 | 865 | } |
|
820 | 866 | |
|
821 | 867 | QQmlListProperty<QAbstractAxis> DeclarativeChart::axes() |
|
822 | 868 | { |
|
823 | 869 | return QQmlListProperty<QAbstractAxis>(this, 0, |
|
824 | 870 | &DeclarativeChart::axesAppendFunc, |
|
825 | 871 | &DeclarativeChart::axesCountFunc, |
|
826 | 872 | &DeclarativeChart::axesAtFunc, |
|
827 | 873 | &DeclarativeChart::axesClearFunc); |
|
828 | 874 | } |
|
829 | 875 | |
|
830 | 876 | void DeclarativeChart::axesAppendFunc(QQmlListProperty<QAbstractAxis> *list, QAbstractAxis *element) |
|
831 | 877 | { |
|
832 | 878 | // Empty implementation |
|
833 | 879 | Q_UNUSED(list); |
|
834 | 880 | Q_UNUSED(element); |
|
835 | 881 | } |
|
836 | 882 | |
|
837 | 883 | int DeclarativeChart::axesCountFunc(QQmlListProperty<QAbstractAxis> *list) |
|
838 | 884 | { |
|
839 | 885 | if (qobject_cast<DeclarativeChart *>(list->object)) { |
|
840 | 886 | DeclarativeChart *chart = qobject_cast<DeclarativeChart *>(list->object); |
|
841 | 887 | return chart->m_chart->axes(Qt::Horizontal | Qt::Vertical).count(); |
|
842 | 888 | } |
|
843 | 889 | return 0; |
|
844 | 890 | } |
|
845 | 891 | |
|
846 | 892 | QAbstractAxis *DeclarativeChart::axesAtFunc(QQmlListProperty<QAbstractAxis> *list, int index) |
|
847 | 893 | { |
|
848 | 894 | if (qobject_cast<DeclarativeChart *>(list->object)) { |
|
849 | 895 | DeclarativeChart *chart = qobject_cast<DeclarativeChart *>(list->object); |
|
850 | 896 | QList<QAbstractAxis *> axes = chart->m_chart->axes(Qt::Horizontal | Qt::Vertical, chart->m_chart->series()[0]); |
|
851 | 897 | return axes.at(index); |
|
852 | 898 | } |
|
853 | 899 | return 0; |
|
854 | 900 | } |
|
855 | 901 | |
|
856 | 902 | void DeclarativeChart::axesClearFunc(QQmlListProperty<QAbstractAxis> *list) |
|
857 | 903 | { |
|
858 | 904 | // Empty implementation |
|
859 | 905 | Q_UNUSED(list); |
|
860 | 906 | } |
|
861 | 907 | |
|
862 | 908 | |
|
863 | 909 | QAbstractSeries *DeclarativeChart::series(int index) |
|
864 | 910 | { |
|
865 | 911 | if (index < m_chart->series().count()) { |
|
866 | 912 | return m_chart->series().at(index); |
|
867 | 913 | } |
|
868 | 914 | return 0; |
|
869 | 915 | } |
|
870 | 916 | |
|
871 | 917 | QAbstractSeries *DeclarativeChart::series(QString seriesName) |
|
872 | 918 | { |
|
873 | 919 | foreach (QAbstractSeries *series, m_chart->series()) { |
|
874 | 920 | if (series->name() == seriesName) |
|
875 | 921 | return series; |
|
876 | 922 | } |
|
877 | 923 | return 0; |
|
878 | 924 | } |
|
879 | 925 | |
|
880 | 926 | QAbstractSeries *DeclarativeChart::createSeries(int type, QString name, QAbstractAxis *axisX, QAbstractAxis *axisY) |
|
881 | 927 | { |
|
882 | 928 | QAbstractSeries *series = 0; |
|
883 | 929 | |
|
884 | 930 | switch (type) { |
|
885 | 931 | case DeclarativeChart::SeriesTypeLine: |
|
886 | 932 | series = new DeclarativeLineSeries(); |
|
887 | 933 | break; |
|
888 | 934 | case DeclarativeChart::SeriesTypeArea: { |
|
889 | 935 | DeclarativeAreaSeries *area = new DeclarativeAreaSeries(); |
|
890 | 936 | DeclarativeLineSeries *line = new DeclarativeLineSeries(); |
|
891 | 937 | line->setParent(area); |
|
892 | 938 | area->setUpperSeries(line); |
|
893 | 939 | series = area; |
|
894 | 940 | break; |
|
895 | 941 | } |
|
896 | 942 | case DeclarativeChart::SeriesTypeStackedBar: |
|
897 | 943 | series = new DeclarativeStackedBarSeries(); |
|
898 | 944 | break; |
|
899 | 945 | case DeclarativeChart::SeriesTypePercentBar: |
|
900 | 946 | series = new DeclarativePercentBarSeries(); |
|
901 | 947 | break; |
|
902 | 948 | case DeclarativeChart::SeriesTypeBar: |
|
903 | 949 | series = new DeclarativeBarSeries(); |
|
904 | 950 | break; |
|
905 | 951 | case DeclarativeChart::SeriesTypeHorizontalBar: |
|
906 | 952 | series = new DeclarativeHorizontalBarSeries(); |
|
907 | 953 | break; |
|
908 | 954 | case DeclarativeChart::SeriesTypeHorizontalPercentBar: |
|
909 | 955 | series = new DeclarativeHorizontalPercentBarSeries(); |
|
910 | 956 | break; |
|
911 | 957 | case DeclarativeChart::SeriesTypeHorizontalStackedBar: |
|
912 | 958 | series = new DeclarativeHorizontalStackedBarSeries(); |
|
913 | 959 | break; |
|
914 | 960 | case DeclarativeChart::SeriesTypeBoxPlot: |
|
915 | 961 | series = new DeclarativeBoxPlotSeries(); |
|
916 | 962 | break; |
|
917 | 963 | case DeclarativeChart::SeriesTypePie: |
|
918 | 964 | series = new DeclarativePieSeries(); |
|
919 | 965 | break; |
|
920 | 966 | case DeclarativeChart::SeriesTypeScatter: |
|
921 | 967 | series = new DeclarativeScatterSeries(); |
|
922 | 968 | break; |
|
923 | 969 | case DeclarativeChart::SeriesTypeSpline: |
|
924 | 970 | series = new DeclarativeSplineSeries(); |
|
925 | 971 | break; |
|
926 | 972 | default: |
|
927 | 973 | qWarning() << "Illegal series type"; |
|
928 | 974 | } |
|
929 | 975 | |
|
930 | 976 | if (series) { |
|
931 | 977 | // Connect to axis changed signals (unless this is a pie series) |
|
932 | 978 | if (!qobject_cast<DeclarativePieSeries *>(series)) { |
|
933 | 979 | connect(series, SIGNAL(axisXChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*))); |
|
934 | 980 | connect(series, SIGNAL(axisXTopChanged(QAbstractAxis*)), this, SLOT(handleAxisXSet(QAbstractAxis*))); |
|
935 | 981 | connect(series, SIGNAL(axisYChanged(QAbstractAxis*)), this, SLOT(handleAxisYSet(QAbstractAxis*))); |
|
936 | 982 | connect(series, SIGNAL(axisYRightChanged(QAbstractAxis*)), this, SLOT(handleAxisYRightSet(QAbstractAxis*))); |
|
937 | 983 | } |
|
938 | 984 | |
|
939 | 985 | series->setName(name); |
|
940 | 986 | m_chart->addSeries(series); |
|
941 | 987 | |
|
942 | 988 | if (!axisX || !axisY) |
|
943 | 989 | initializeAxes(series); |
|
944 | 990 | |
|
945 | 991 | if (axisX) |
|
946 | 992 | setAxisX(axisX, series); |
|
947 | 993 | if (axisY) |
|
948 | 994 | setAxisY(axisY, series); |
|
949 | 995 | } |
|
950 | 996 | |
|
951 | 997 | return series; |
|
952 | 998 | } |
|
953 | 999 | |
|
954 | 1000 | void DeclarativeChart::removeSeries(QAbstractSeries *series) |
|
955 | 1001 | { |
|
956 | 1002 | if (series) |
|
957 | 1003 | m_chart->removeSeries(series); |
|
958 | 1004 | else |
|
959 | 1005 | qWarning("removeSeries: cannot remove null"); |
|
960 | 1006 | } |
|
961 | 1007 | |
|
962 | 1008 | void DeclarativeChart::setAxisX(QAbstractAxis *axis, QAbstractSeries *series) |
|
963 | 1009 | { |
|
964 | 1010 | if (axis && series) |
|
965 | 1011 | seriesAxisAttachHelper(series, axis, Qt::Horizontal, Qt::AlignBottom); |
|
966 | 1012 | } |
|
967 | 1013 | |
|
968 | 1014 | void DeclarativeChart::setAxisY(QAbstractAxis *axis, QAbstractSeries *series) |
|
969 | 1015 | { |
|
970 | 1016 | if (axis && series) |
|
971 | 1017 | seriesAxisAttachHelper(series, axis, Qt::Vertical, Qt::AlignLeft); |
|
972 | 1018 | } |
|
973 | 1019 | |
|
974 | 1020 | QAbstractAxis *DeclarativeChart::defaultAxis(Qt::Orientation orientation, QAbstractSeries *series) |
|
975 | 1021 | { |
|
976 | 1022 | if (!series) { |
|
977 | 1023 | qWarning() << "No axis type defined for null series"; |
|
978 | 1024 | return 0; |
|
979 | 1025 | } |
|
980 | 1026 | |
|
981 | 1027 | foreach (QAbstractAxis *existingAxis, m_chart->axes(orientation)) { |
|
982 | 1028 | if (existingAxis->type() == series->d_ptr->defaultAxisType(orientation)) |
|
983 | 1029 | return existingAxis; |
|
984 | 1030 | } |
|
985 | 1031 | |
|
986 | 1032 | switch (series->d_ptr->defaultAxisType(orientation)) { |
|
987 | 1033 | case QAbstractAxis::AxisTypeValue: |
|
988 | 1034 | return new QValueAxis(this); |
|
989 | 1035 | case QAbstractAxis::AxisTypeBarCategory: |
|
990 | 1036 | return new QBarCategoryAxis(this); |
|
991 | 1037 | case QAbstractAxis::AxisTypeCategory: |
|
992 | 1038 | return new QCategoryAxis(this); |
|
993 | 1039 | #ifndef QT_ON_ARM |
|
994 | 1040 | case QAbstractAxis::AxisTypeDateTime: |
|
995 | 1041 | return new QDateTimeAxis(this); |
|
996 | 1042 | #endif |
|
997 | 1043 | case QAbstractAxis::AxisTypeLogValue: |
|
998 | 1044 | return new QLogValueAxis(this); |
|
999 | 1045 | default: |
|
1000 | 1046 | // assume AxisTypeNoAxis |
|
1001 | 1047 | return 0; |
|
1002 | 1048 | } |
|
1003 | 1049 | } |
|
1004 | 1050 | |
|
1005 | 1051 | void DeclarativeChart::initializeAxes(QAbstractSeries *series) |
|
1006 | 1052 | { |
|
1007 | 1053 | if (qobject_cast<DeclarativeLineSeries *>(series)) |
|
1008 | 1054 | doInitializeAxes(series, qobject_cast<DeclarativeLineSeries *>(series)->m_axes); |
|
1009 | 1055 | else if (qobject_cast<DeclarativeScatterSeries *>(series)) |
|
1010 | 1056 | doInitializeAxes(series, qobject_cast<DeclarativeScatterSeries *>(series)->m_axes); |
|
1011 | 1057 | else if (qobject_cast<DeclarativeSplineSeries *>(series)) |
|
1012 | 1058 | doInitializeAxes(series, qobject_cast<DeclarativeSplineSeries *>(series)->m_axes); |
|
1013 | 1059 | else if (qobject_cast<DeclarativeAreaSeries *>(series)) |
|
1014 | 1060 | doInitializeAxes(series, qobject_cast<DeclarativeAreaSeries *>(series)->m_axes); |
|
1015 | 1061 | else if (qobject_cast<DeclarativeBarSeries *>(series)) |
|
1016 | 1062 | doInitializeAxes(series, qobject_cast<DeclarativeBarSeries *>(series)->m_axes); |
|
1017 | 1063 | else if (qobject_cast<DeclarativeStackedBarSeries *>(series)) |
|
1018 | 1064 | doInitializeAxes(series, qobject_cast<DeclarativeStackedBarSeries *>(series)->m_axes); |
|
1019 | 1065 | else if (qobject_cast<DeclarativePercentBarSeries *>(series)) |
|
1020 | 1066 | doInitializeAxes(series, qobject_cast<DeclarativePercentBarSeries *>(series)->m_axes); |
|
1021 | 1067 | else if (qobject_cast<DeclarativeHorizontalBarSeries *>(series)) |
|
1022 | 1068 | doInitializeAxes(series, qobject_cast<DeclarativeHorizontalBarSeries *>(series)->m_axes); |
|
1023 | 1069 | else if (qobject_cast<DeclarativeHorizontalStackedBarSeries *>(series)) |
|
1024 | 1070 | doInitializeAxes(series, qobject_cast<DeclarativeHorizontalStackedBarSeries *>(series)->m_axes); |
|
1025 | 1071 | else if (qobject_cast<DeclarativeHorizontalPercentBarSeries *>(series)) |
|
1026 | 1072 | doInitializeAxes(series, qobject_cast<DeclarativeHorizontalPercentBarSeries *>(series)->m_axes); |
|
1027 | 1073 | else if (qobject_cast<DeclarativeBoxPlotSeries *>(series)) |
|
1028 | 1074 | doInitializeAxes(series, qobject_cast<DeclarativeBoxPlotSeries *>(series)->m_axes); |
|
1029 | 1075 | // else: do nothing |
|
1030 | 1076 | } |
|
1031 | 1077 | |
|
1032 | 1078 | void DeclarativeChart::doInitializeAxes(QAbstractSeries *series, DeclarativeAxes *axes) |
|
1033 | 1079 | { |
|
1034 | 1080 | // Initialize axis X |
|
1035 | 1081 | if (axes->axisX()) |
|
1036 | 1082 | axes->emitAxisXChanged(); |
|
1037 | 1083 | else if (axes->axisXTop()) |
|
1038 | 1084 | axes->emitAxisXTopChanged(); |
|
1039 | 1085 | else |
|
1040 | 1086 | axes->setAxisX(defaultAxis(Qt::Horizontal, series)); |
|
1041 | 1087 | |
|
1042 | 1088 | // Initialize axis Y |
|
1043 | 1089 | if (axes->axisY()) |
|
1044 | 1090 | axes->emitAxisYChanged(); |
|
1045 | 1091 | else if (axes->axisYRight()) |
|
1046 | 1092 | axes->emitAxisYRightChanged(); |
|
1047 | 1093 | else |
|
1048 | 1094 | axes->setAxisY(defaultAxis(Qt::Vertical, series)); |
|
1049 | 1095 | } |
|
1050 | 1096 | |
|
1051 | 1097 | QPointF DeclarativeChart::mapToValue(const QPointF &position, QAbstractSeries *series) |
|
1052 | 1098 | { |
|
1053 | 1099 | return m_chart->mapToValue(position, series); |
|
1054 | 1100 | } |
|
1055 | 1101 | |
|
1056 | 1102 | QPointF DeclarativeChart::mapToPosition(const QPointF &value, QAbstractSeries *series) |
|
1057 | 1103 | { |
|
1058 | 1104 | return m_chart->mapToPosition(value, series); |
|
1059 | 1105 | } |
|
1060 | 1106 | |
|
1061 | 1107 | #include "moc_declarativechart.cpp" |
|
1062 | 1108 | |
|
1063 | 1109 | QT_CHARTS_END_NAMESPACE |
@@ -1,225 +1,229 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2015 The Qt Company Ltd |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to The Qt Company, please use contact form at http://qt.io |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Charts module. |
|
8 | 8 | ** |
|
9 | 9 | ** Licensees holding valid commercial license for Qt may use this file in |
|
10 | 10 | ** accordance with the Qt License Agreement provided with the Software |
|
11 | 11 | ** or, alternatively, in accordance with the terms contained in a written |
|
12 | 12 | ** agreement between you and The Qt Company. |
|
13 | 13 | ** |
|
14 | 14 | ** If you have questions regarding the use of this file, please use |
|
15 | 15 | ** contact form at http://qt.io |
|
16 | 16 | ** |
|
17 | 17 | ****************************************************************************/ |
|
18 | 18 | |
|
19 | 19 | #ifndef DECLARATIVECHART_H |
|
20 | 20 | #define DECLARATIVECHART_H |
|
21 | 21 | |
|
22 | 22 | #include <QtCore/QtGlobal> |
|
23 | 23 | #include <QtQuick/QQuickItem> |
|
24 | 24 | #include <QtQuick/QQuickPaintedItem> |
|
25 | 25 | #include <QtWidgets/QGraphicsScene> |
|
26 | 26 | #include <QtCore/QMutex> |
|
27 | 27 | |
|
28 | 28 | #include <QtCharts/QChart> |
|
29 | 29 | #include <QtCore/QLocale> |
|
30 | 30 | |
|
31 | 31 | QT_CHARTS_BEGIN_NAMESPACE |
|
32 | 32 | |
|
33 | 33 | class DeclarativeMargins; |
|
34 | 34 | class Domain; |
|
35 | 35 | class DeclarativeAxes; |
|
36 | 36 | |
|
37 | 37 | class DeclarativeChart : public QQuickPaintedItem |
|
38 | 38 | { |
|
39 | 39 | Q_OBJECT |
|
40 | 40 | Q_PROPERTY(Theme theme READ theme WRITE setTheme) |
|
41 | 41 | Q_PROPERTY(Animation animationOptions READ animationOptions WRITE setAnimationOptions) |
|
42 | 42 | Q_PROPERTY(QString title READ title WRITE setTitle) |
|
43 | 43 | Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont) |
|
44 | 44 | Q_PROPERTY(QColor titleColor READ titleColor WRITE setTitleColor NOTIFY titleColorChanged) |
|
45 | 45 | Q_PROPERTY(QLegend *legend READ legend CONSTANT) |
|
46 | 46 | Q_PROPERTY(int count READ count) |
|
47 | 47 | Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged) |
|
48 | 48 | Q_PROPERTY(bool dropShadowEnabled READ dropShadowEnabled WRITE setDropShadowEnabled NOTIFY dropShadowEnabledChanged) |
|
49 | 49 | Q_PROPERTY(qreal backgroundRoundness READ backgroundRoundness WRITE setBackgroundRoundness NOTIFY backgroundRoundnessChanged REVISION 3) |
|
50 | 50 | Q_PROPERTY(DeclarativeMargins *margins READ margins NOTIFY marginsChanged REVISION 2) |
|
51 | 51 | Q_PROPERTY(QRectF plotArea READ plotArea NOTIFY plotAreaChanged REVISION 1) |
|
52 | 52 | Q_PROPERTY(QColor plotAreaColor READ plotAreaColor WRITE setPlotAreaColor NOTIFY plotAreaColorChanged REVISION 3) |
|
53 | 53 | Q_PROPERTY(QQmlListProperty<QAbstractAxis> axes READ axes REVISION 2) |
|
54 | 54 | Q_PROPERTY(bool localizeNumbers READ localizeNumbers WRITE setLocalizeNumbers NOTIFY localizeNumbersChanged REVISION 4) |
|
55 | 55 | Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged REVISION 4) |
|
56 | 56 | Q_ENUMS(Animation) |
|
57 | 57 | Q_ENUMS(Theme) |
|
58 | 58 | Q_ENUMS(SeriesType) |
|
59 | 59 | |
|
60 | 60 | public: |
|
61 | 61 | // duplicating enums from QChart to make the QML api namings 1-to-1 with the C++ api |
|
62 | 62 | enum Theme { |
|
63 | 63 | ChartThemeLight = 0, |
|
64 | 64 | ChartThemeBlueCerulean, |
|
65 | 65 | ChartThemeDark, |
|
66 | 66 | ChartThemeBrownSand, |
|
67 | 67 | ChartThemeBlueNcs, |
|
68 | 68 | ChartThemeHighContrast, |
|
69 | 69 | ChartThemeBlueIcy, |
|
70 | 70 | ChartThemeQt |
|
71 | 71 | }; |
|
72 | 72 | |
|
73 | 73 | enum Animation { |
|
74 | 74 | NoAnimation = 0x0, |
|
75 | 75 | GridAxisAnimations = 0x1, |
|
76 | 76 | SeriesAnimations = 0x2, |
|
77 | 77 | AllAnimations = 0x3 |
|
78 | 78 | }; |
|
79 | 79 | |
|
80 | 80 | enum SeriesType { |
|
81 | 81 | SeriesTypeLine, |
|
82 | 82 | SeriesTypeArea, |
|
83 | 83 | SeriesTypeBar, |
|
84 | 84 | SeriesTypeStackedBar, |
|
85 | 85 | SeriesTypePercentBar, |
|
86 | 86 | SeriesTypeBoxPlot, |
|
87 | 87 | SeriesTypePie, |
|
88 | 88 | SeriesTypeScatter, |
|
89 | 89 | SeriesTypeSpline, |
|
90 | 90 | SeriesTypeHorizontalBar, |
|
91 | 91 | SeriesTypeHorizontalStackedBar, |
|
92 | 92 | SeriesTypeHorizontalPercentBar |
|
93 | 93 | }; |
|
94 | 94 | |
|
95 | 95 | public: |
|
96 | 96 | DeclarativeChart(QQuickItem *parent = 0); |
|
97 | 97 | ~DeclarativeChart(); |
|
98 | 98 | |
|
99 | 99 | public: // From parent classes |
|
100 | 100 | void childEvent(QChildEvent *event); |
|
101 | 101 | void componentComplete(); |
|
102 | 102 | void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); |
|
103 | 103 | void paint(QPainter *painter); |
|
104 | 104 | protected: |
|
105 | 105 | void mousePressEvent(QMouseEvent *event); |
|
106 | 106 | void mouseReleaseEvent(QMouseEvent *event); |
|
107 | 107 | void hoverMoveEvent(QHoverEvent *event); |
|
108 | 108 | void mouseDoubleClickEvent(QMouseEvent *event); |
|
109 | 109 | private Q_SLOTS: |
|
110 | 110 | void handleAntialiasingChanged(bool enable); |
|
111 | 111 | void sceneChanged(QList<QRectF> region); |
|
112 | 112 | void renderScene(); |
|
113 | 113 | |
|
114 | 114 | public: |
|
115 | 115 | void setTheme(DeclarativeChart::Theme theme); |
|
116 | 116 | DeclarativeChart::Theme theme(); |
|
117 | 117 | void setAnimationOptions(DeclarativeChart::Animation animations); |
|
118 | 118 | DeclarativeChart::Animation animationOptions(); |
|
119 | 119 | void setTitle(QString title); |
|
120 | 120 | QString title(); |
|
121 | 121 | QLegend *legend(); |
|
122 | 122 | QFont titleFont() const; |
|
123 | 123 | void setTitleFont(const QFont &font); |
|
124 | 124 | void setTitleColor(QColor color); |
|
125 | 125 | QColor titleColor(); |
|
126 | 126 | void setBackgroundColor(QColor color); |
|
127 | 127 | QColor backgroundColor(); |
|
128 | 128 | void setPlotAreaColor(QColor color); |
|
129 | 129 | QColor plotAreaColor(); |
|
130 | 130 | void setLocalizeNumbers(bool localize); |
|
131 | 131 | bool localizeNumbers() const; |
|
132 | 132 | void setLocale(const QLocale &locale); |
|
133 | 133 | QLocale locale() const; |
|
134 | 134 | |
|
135 | 135 | int count(); |
|
136 | 136 | void setDropShadowEnabled(bool enabled); |
|
137 | 137 | bool dropShadowEnabled(); |
|
138 | 138 | qreal backgroundRoundness() const; |
|
139 | 139 | void setBackgroundRoundness(qreal diameter); |
|
140 | 140 | |
|
141 | 141 | // Margins & plotArea |
|
142 | 142 | DeclarativeMargins *margins() { return m_margins; } |
|
143 | 143 | QRectF plotArea() { return m_chart->plotArea(); } |
|
144 | 144 | |
|
145 | 145 | // Axis handling |
|
146 | 146 | QAbstractAxis *defaultAxis(Qt::Orientation orientation, QAbstractSeries *series); |
|
147 | 147 | void initializeAxes(QAbstractSeries *series); |
|
148 | 148 | void doInitializeAxes(QAbstractSeries *series, DeclarativeAxes *axes); |
|
149 | 149 | QQmlListProperty<QAbstractAxis> axes(); |
|
150 | 150 | static void axesAppendFunc(QQmlListProperty<QAbstractAxis> *list, QAbstractAxis *element); |
|
151 | 151 | static int axesCountFunc(QQmlListProperty<QAbstractAxis> *list); |
|
152 | 152 | static QAbstractAxis *axesAtFunc(QQmlListProperty<QAbstractAxis> *list, int index); |
|
153 | 153 | static void axesClearFunc(QQmlListProperty<QAbstractAxis> *list); |
|
154 | 154 | |
|
155 | 155 | public: |
|
156 | 156 | Q_INVOKABLE QAbstractSeries *series(int index); |
|
157 | 157 | Q_INVOKABLE QAbstractSeries *series(QString seriesName); |
|
158 | 158 | Q_INVOKABLE QAbstractSeries *createSeries(int type, QString name = "", QAbstractAxis *axisX = 0, QAbstractAxis *axisY = 0); |
|
159 | 159 | Q_INVOKABLE void removeSeries(QAbstractSeries *series); |
|
160 | 160 | Q_INVOKABLE void removeAllSeries() { m_chart->removeAllSeries(); } |
|
161 | 161 | Q_INVOKABLE void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = 0); |
|
162 | 162 | Q_INVOKABLE void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = 0); |
|
163 | 163 | Q_INVOKABLE QAbstractAxis *axisX(QAbstractSeries *series = 0); |
|
164 | 164 | Q_INVOKABLE QAbstractAxis *axisY(QAbstractSeries *series = 0); |
|
165 | 165 | Q_INVOKABLE void zoom(qreal factor); |
|
166 | Q_REVISION(5) Q_INVOKABLE void zoomIn(); | |
|
167 | Q_REVISION(5) Q_INVOKABLE void zoomIn(const QRectF &rectangle); | |
|
168 | Q_REVISION(5) Q_INVOKABLE void zoomOut(); | |
|
169 | Q_REVISION(5) Q_INVOKABLE void zoomReset(); | |
|
166 | 170 | Q_INVOKABLE void scrollLeft(qreal pixels); |
|
167 | 171 | Q_INVOKABLE void scrollRight(qreal pixels); |
|
168 | 172 | Q_INVOKABLE void scrollUp(qreal pixels); |
|
169 | 173 | Q_INVOKABLE void scrollDown(qreal pixels); |
|
170 | 174 | Q_REVISION(5) Q_INVOKABLE QPointF mapToValue(const QPointF &position, |
|
171 | 175 | QAbstractSeries *series = 0); |
|
172 | 176 | Q_REVISION(5) Q_INVOKABLE QPointF mapToPosition(const QPointF &value, |
|
173 | 177 | QAbstractSeries *series = 0); |
|
174 | 178 | |
|
175 | 179 | |
|
176 | 180 | Q_SIGNALS: |
|
177 | 181 | void axisLabelsChanged(); |
|
178 | 182 | void titleColorChanged(QColor color); |
|
179 | 183 | void backgroundColorChanged(); |
|
180 | 184 | void dropShadowEnabledChanged(bool enabled); |
|
181 | 185 | Q_REVISION(2) void marginsChanged(); |
|
182 | 186 | void plotAreaChanged(QRectF plotArea); |
|
183 | 187 | void seriesAdded(QAbstractSeries *series); |
|
184 | 188 | void seriesRemoved(QAbstractSeries *series); |
|
185 | 189 | Q_REVISION(3) void plotAreaColorChanged(); |
|
186 | 190 | Q_REVISION(3) void backgroundRoundnessChanged(qreal diameter); |
|
187 | 191 | Q_REVISION(4) void localizeNumbersChanged(); |
|
188 | 192 | Q_REVISION(4) void localeChanged(); |
|
189 | 193 | |
|
190 | 194 | private Q_SLOTS: |
|
191 | 195 | void changeMargins(int top, int bottom, int left, int right); |
|
192 | 196 | void handleAxisXSet(QAbstractAxis *axis); |
|
193 | 197 | void handleAxisYSet(QAbstractAxis *axis); |
|
194 | 198 | void handleAxisXTopSet(QAbstractAxis *axis); |
|
195 | 199 | void handleAxisYRightSet(QAbstractAxis *axis); |
|
196 | 200 | void handleSeriesAdded(QAbstractSeries *series); |
|
197 | 201 | |
|
198 | 202 | protected: |
|
199 | 203 | explicit DeclarativeChart(QChart::ChartType type, QQuickItem *parent); |
|
200 | 204 | |
|
201 | 205 | private: |
|
202 | 206 | void initChart(QChart::ChartType type); |
|
203 | 207 | void seriesAxisAttachHelper(QAbstractSeries *series, QAbstractAxis *axis, |
|
204 | 208 | Qt::Orientations orientation, Qt::Alignment alignment); |
|
205 | 209 | // Extending QChart with DeclarativeChart is not possible because QObject does not support |
|
206 | 210 | // multi inheritance, so we now have a QChart as a member instead |
|
207 | 211 | QChart *m_chart; |
|
208 | 212 | QGraphicsScene *m_scene; |
|
209 | 213 | QPointF m_mousePressScenePoint; |
|
210 | 214 | QPoint m_mousePressScreenPoint; |
|
211 | 215 | QPointF m_lastMouseMoveScenePoint; |
|
212 | 216 | QPoint m_lastMouseMoveScreenPoint; |
|
213 | 217 | Qt::MouseButton m_mousePressButton; |
|
214 | 218 | Qt::MouseButtons m_mousePressButtons; |
|
215 | 219 | QMutex m_sceneImageLock; |
|
216 | 220 | QImage *m_currentSceneImage; |
|
217 | 221 | bool m_updatePending; |
|
218 | 222 | Qt::HANDLE m_paintThreadId; |
|
219 | 223 | Qt::HANDLE m_guiThreadId; |
|
220 | 224 | DeclarativeMargins *m_margins; |
|
221 | 225 | }; |
|
222 | 226 | |
|
223 | 227 | QT_CHARTS_END_NAMESPACE |
|
224 | 228 | |
|
225 | 229 | #endif // DECLARATIVECHART_H |
@@ -1,2884 +1,2893 | |||
|
1 | 1 | import QtQuick.tooling 1.2 |
|
2 | 2 | |
|
3 | 3 | // This file describes the plugin-supplied types contained in the library. |
|
4 | 4 | // It is used for QML tooling purposes only. |
|
5 | 5 | // |
|
6 | 6 | // This file was auto-generated by: |
|
7 | 7 | // 'qmlplugindump -nonrelocatable QtCharts 2.0' |
|
8 | 8 | |
|
9 | 9 | Module { |
|
10 | 10 | dependencies: [] |
|
11 | 11 | Component { |
|
12 | 12 | name: "QAbstractItemModel" |
|
13 | 13 | prototype: "QObject" |
|
14 | 14 | exports: [ |
|
15 | 15 | "QtCharts/AbstractItemModel 1.0", |
|
16 | 16 | "QtCharts/AbstractItemModel 2.0" |
|
17 | 17 | ] |
|
18 | 18 | isCreatable: false |
|
19 | 19 | exportMetaObjectRevisions: [0, 0] |
|
20 | 20 | Enum { |
|
21 | 21 | name: "LayoutChangeHint" |
|
22 | 22 | values: { |
|
23 | 23 | "NoLayoutChangeHint": 0, |
|
24 | 24 | "VerticalSortHint": 1, |
|
25 | 25 | "HorizontalSortHint": 2 |
|
26 | 26 | } |
|
27 | 27 | } |
|
28 | 28 | Signal { |
|
29 | 29 | name: "dataChanged" |
|
30 | 30 | Parameter { name: "topLeft"; type: "QModelIndex" } |
|
31 | 31 | Parameter { name: "bottomRight"; type: "QModelIndex" } |
|
32 | 32 | Parameter { name: "roles"; type: "QVector<int>" } |
|
33 | 33 | } |
|
34 | 34 | Signal { |
|
35 | 35 | name: "dataChanged" |
|
36 | 36 | Parameter { name: "topLeft"; type: "QModelIndex" } |
|
37 | 37 | Parameter { name: "bottomRight"; type: "QModelIndex" } |
|
38 | 38 | } |
|
39 | 39 | Signal { |
|
40 | 40 | name: "headerDataChanged" |
|
41 | 41 | Parameter { name: "orientation"; type: "Qt::Orientation" } |
|
42 | 42 | Parameter { name: "first"; type: "int" } |
|
43 | 43 | Parameter { name: "last"; type: "int" } |
|
44 | 44 | } |
|
45 | 45 | Signal { |
|
46 | 46 | name: "layoutChanged" |
|
47 | 47 | Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } |
|
48 | 48 | Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } |
|
49 | 49 | } |
|
50 | 50 | Signal { |
|
51 | 51 | name: "layoutChanged" |
|
52 | 52 | Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } |
|
53 | 53 | } |
|
54 | 54 | Signal { name: "layoutChanged" } |
|
55 | 55 | Signal { |
|
56 | 56 | name: "layoutAboutToBeChanged" |
|
57 | 57 | Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } |
|
58 | 58 | Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } |
|
59 | 59 | } |
|
60 | 60 | Signal { |
|
61 | 61 | name: "layoutAboutToBeChanged" |
|
62 | 62 | Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } |
|
63 | 63 | } |
|
64 | 64 | Signal { name: "layoutAboutToBeChanged" } |
|
65 | 65 | Signal { |
|
66 | 66 | name: "rowsAboutToBeInserted" |
|
67 | 67 | Parameter { name: "parent"; type: "QModelIndex" } |
|
68 | 68 | Parameter { name: "first"; type: "int" } |
|
69 | 69 | Parameter { name: "last"; type: "int" } |
|
70 | 70 | } |
|
71 | 71 | Signal { |
|
72 | 72 | name: "rowsInserted" |
|
73 | 73 | Parameter { name: "parent"; type: "QModelIndex" } |
|
74 | 74 | Parameter { name: "first"; type: "int" } |
|
75 | 75 | Parameter { name: "last"; type: "int" } |
|
76 | 76 | } |
|
77 | 77 | Signal { |
|
78 | 78 | name: "rowsAboutToBeRemoved" |
|
79 | 79 | Parameter { name: "parent"; type: "QModelIndex" } |
|
80 | 80 | Parameter { name: "first"; type: "int" } |
|
81 | 81 | Parameter { name: "last"; type: "int" } |
|
82 | 82 | } |
|
83 | 83 | Signal { |
|
84 | 84 | name: "rowsRemoved" |
|
85 | 85 | Parameter { name: "parent"; type: "QModelIndex" } |
|
86 | 86 | Parameter { name: "first"; type: "int" } |
|
87 | 87 | Parameter { name: "last"; type: "int" } |
|
88 | 88 | } |
|
89 | 89 | Signal { |
|
90 | 90 | name: "columnsAboutToBeInserted" |
|
91 | 91 | Parameter { name: "parent"; type: "QModelIndex" } |
|
92 | 92 | Parameter { name: "first"; type: "int" } |
|
93 | 93 | Parameter { name: "last"; type: "int" } |
|
94 | 94 | } |
|
95 | 95 | Signal { |
|
96 | 96 | name: "columnsInserted" |
|
97 | 97 | Parameter { name: "parent"; type: "QModelIndex" } |
|
98 | 98 | Parameter { name: "first"; type: "int" } |
|
99 | 99 | Parameter { name: "last"; type: "int" } |
|
100 | 100 | } |
|
101 | 101 | Signal { |
|
102 | 102 | name: "columnsAboutToBeRemoved" |
|
103 | 103 | Parameter { name: "parent"; type: "QModelIndex" } |
|
104 | 104 | Parameter { name: "first"; type: "int" } |
|
105 | 105 | Parameter { name: "last"; type: "int" } |
|
106 | 106 | } |
|
107 | 107 | Signal { |
|
108 | 108 | name: "columnsRemoved" |
|
109 | 109 | Parameter { name: "parent"; type: "QModelIndex" } |
|
110 | 110 | Parameter { name: "first"; type: "int" } |
|
111 | 111 | Parameter { name: "last"; type: "int" } |
|
112 | 112 | } |
|
113 | 113 | Signal { name: "modelAboutToBeReset" } |
|
114 | 114 | Signal { name: "modelReset" } |
|
115 | 115 | Signal { |
|
116 | 116 | name: "rowsAboutToBeMoved" |
|
117 | 117 | Parameter { name: "sourceParent"; type: "QModelIndex" } |
|
118 | 118 | Parameter { name: "sourceStart"; type: "int" } |
|
119 | 119 | Parameter { name: "sourceEnd"; type: "int" } |
|
120 | 120 | Parameter { name: "destinationParent"; type: "QModelIndex" } |
|
121 | 121 | Parameter { name: "destinationRow"; type: "int" } |
|
122 | 122 | } |
|
123 | 123 | Signal { |
|
124 | 124 | name: "rowsMoved" |
|
125 | 125 | Parameter { name: "parent"; type: "QModelIndex" } |
|
126 | 126 | Parameter { name: "start"; type: "int" } |
|
127 | 127 | Parameter { name: "end"; type: "int" } |
|
128 | 128 | Parameter { name: "destination"; type: "QModelIndex" } |
|
129 | 129 | Parameter { name: "row"; type: "int" } |
|
130 | 130 | } |
|
131 | 131 | Signal { |
|
132 | 132 | name: "columnsAboutToBeMoved" |
|
133 | 133 | Parameter { name: "sourceParent"; type: "QModelIndex" } |
|
134 | 134 | Parameter { name: "sourceStart"; type: "int" } |
|
135 | 135 | Parameter { name: "sourceEnd"; type: "int" } |
|
136 | 136 | Parameter { name: "destinationParent"; type: "QModelIndex" } |
|
137 | 137 | Parameter { name: "destinationColumn"; type: "int" } |
|
138 | 138 | } |
|
139 | 139 | Signal { |
|
140 | 140 | name: "columnsMoved" |
|
141 | 141 | Parameter { name: "parent"; type: "QModelIndex" } |
|
142 | 142 | Parameter { name: "start"; type: "int" } |
|
143 | 143 | Parameter { name: "end"; type: "int" } |
|
144 | 144 | Parameter { name: "destination"; type: "QModelIndex" } |
|
145 | 145 | Parameter { name: "column"; type: "int" } |
|
146 | 146 | } |
|
147 | 147 | Method { name: "submit"; type: "bool" } |
|
148 | 148 | Method { name: "revert" } |
|
149 | 149 | Method { |
|
150 | 150 | name: "hasIndex" |
|
151 | 151 | type: "bool" |
|
152 | 152 | Parameter { name: "row"; type: "int" } |
|
153 | 153 | Parameter { name: "column"; type: "int" } |
|
154 | 154 | Parameter { name: "parent"; type: "QModelIndex" } |
|
155 | 155 | } |
|
156 | 156 | Method { |
|
157 | 157 | name: "hasIndex" |
|
158 | 158 | type: "bool" |
|
159 | 159 | Parameter { name: "row"; type: "int" } |
|
160 | 160 | Parameter { name: "column"; type: "int" } |
|
161 | 161 | } |
|
162 | 162 | Method { |
|
163 | 163 | name: "index" |
|
164 | 164 | type: "QModelIndex" |
|
165 | 165 | Parameter { name: "row"; type: "int" } |
|
166 | 166 | Parameter { name: "column"; type: "int" } |
|
167 | 167 | Parameter { name: "parent"; type: "QModelIndex" } |
|
168 | 168 | } |
|
169 | 169 | Method { |
|
170 | 170 | name: "index" |
|
171 | 171 | type: "QModelIndex" |
|
172 | 172 | Parameter { name: "row"; type: "int" } |
|
173 | 173 | Parameter { name: "column"; type: "int" } |
|
174 | 174 | } |
|
175 | 175 | Method { |
|
176 | 176 | name: "parent" |
|
177 | 177 | type: "QModelIndex" |
|
178 | 178 | Parameter { name: "child"; type: "QModelIndex" } |
|
179 | 179 | } |
|
180 | 180 | Method { |
|
181 | 181 | name: "sibling" |
|
182 | 182 | type: "QModelIndex" |
|
183 | 183 | Parameter { name: "row"; type: "int" } |
|
184 | 184 | Parameter { name: "column"; type: "int" } |
|
185 | 185 | Parameter { name: "idx"; type: "QModelIndex" } |
|
186 | 186 | } |
|
187 | 187 | Method { |
|
188 | 188 | name: "rowCount" |
|
189 | 189 | type: "int" |
|
190 | 190 | Parameter { name: "parent"; type: "QModelIndex" } |
|
191 | 191 | } |
|
192 | 192 | Method { name: "rowCount"; type: "int" } |
|
193 | 193 | Method { |
|
194 | 194 | name: "columnCount" |
|
195 | 195 | type: "int" |
|
196 | 196 | Parameter { name: "parent"; type: "QModelIndex" } |
|
197 | 197 | } |
|
198 | 198 | Method { name: "columnCount"; type: "int" } |
|
199 | 199 | Method { |
|
200 | 200 | name: "hasChildren" |
|
201 | 201 | type: "bool" |
|
202 | 202 | Parameter { name: "parent"; type: "QModelIndex" } |
|
203 | 203 | } |
|
204 | 204 | Method { name: "hasChildren"; type: "bool" } |
|
205 | 205 | Method { |
|
206 | 206 | name: "data" |
|
207 | 207 | type: "QVariant" |
|
208 | 208 | Parameter { name: "index"; type: "QModelIndex" } |
|
209 | 209 | Parameter { name: "role"; type: "int" } |
|
210 | 210 | } |
|
211 | 211 | Method { |
|
212 | 212 | name: "data" |
|
213 | 213 | type: "QVariant" |
|
214 | 214 | Parameter { name: "index"; type: "QModelIndex" } |
|
215 | 215 | } |
|
216 | 216 | Method { |
|
217 | 217 | name: "setData" |
|
218 | 218 | type: "bool" |
|
219 | 219 | Parameter { name: "index"; type: "QModelIndex" } |
|
220 | 220 | Parameter { name: "value"; type: "QVariant" } |
|
221 | 221 | Parameter { name: "role"; type: "int" } |
|
222 | 222 | } |
|
223 | 223 | Method { |
|
224 | 224 | name: "setData" |
|
225 | 225 | type: "bool" |
|
226 | 226 | Parameter { name: "index"; type: "QModelIndex" } |
|
227 | 227 | Parameter { name: "value"; type: "QVariant" } |
|
228 | 228 | } |
|
229 | 229 | Method { |
|
230 | 230 | name: "headerData" |
|
231 | 231 | type: "QVariant" |
|
232 | 232 | Parameter { name: "section"; type: "int" } |
|
233 | 233 | Parameter { name: "orientation"; type: "Qt::Orientation" } |
|
234 | 234 | Parameter { name: "role"; type: "int" } |
|
235 | 235 | } |
|
236 | 236 | Method { |
|
237 | 237 | name: "headerData" |
|
238 | 238 | type: "QVariant" |
|
239 | 239 | Parameter { name: "section"; type: "int" } |
|
240 | 240 | Parameter { name: "orientation"; type: "Qt::Orientation" } |
|
241 | 241 | } |
|
242 | 242 | Method { |
|
243 | 243 | name: "fetchMore" |
|
244 | 244 | Parameter { name: "parent"; type: "QModelIndex" } |
|
245 | 245 | } |
|
246 | 246 | Method { |
|
247 | 247 | name: "canFetchMore" |
|
248 | 248 | type: "bool" |
|
249 | 249 | Parameter { name: "parent"; type: "QModelIndex" } |
|
250 | 250 | } |
|
251 | 251 | Method { |
|
252 | 252 | name: "flags" |
|
253 | 253 | type: "Qt::ItemFlags" |
|
254 | 254 | Parameter { name: "index"; type: "QModelIndex" } |
|
255 | 255 | } |
|
256 | 256 | Method { |
|
257 | 257 | name: "match" |
|
258 | 258 | type: "QModelIndexList" |
|
259 | 259 | Parameter { name: "start"; type: "QModelIndex" } |
|
260 | 260 | Parameter { name: "role"; type: "int" } |
|
261 | 261 | Parameter { name: "value"; type: "QVariant" } |
|
262 | 262 | Parameter { name: "hits"; type: "int" } |
|
263 | 263 | Parameter { name: "flags"; type: "Qt::MatchFlags" } |
|
264 | 264 | } |
|
265 | 265 | Method { |
|
266 | 266 | name: "match" |
|
267 | 267 | type: "QModelIndexList" |
|
268 | 268 | Parameter { name: "start"; type: "QModelIndex" } |
|
269 | 269 | Parameter { name: "role"; type: "int" } |
|
270 | 270 | Parameter { name: "value"; type: "QVariant" } |
|
271 | 271 | Parameter { name: "hits"; type: "int" } |
|
272 | 272 | } |
|
273 | 273 | Method { |
|
274 | 274 | name: "match" |
|
275 | 275 | type: "QModelIndexList" |
|
276 | 276 | Parameter { name: "start"; type: "QModelIndex" } |
|
277 | 277 | Parameter { name: "role"; type: "int" } |
|
278 | 278 | Parameter { name: "value"; type: "QVariant" } |
|
279 | 279 | } |
|
280 | 280 | } |
|
281 | 281 | Component { |
|
282 | 282 | name: "QGraphicsObject" |
|
283 | 283 | defaultProperty: "children" |
|
284 | 284 | prototype: "QObject" |
|
285 | 285 | Property { name: "parent"; type: "QGraphicsObject"; isPointer: true } |
|
286 | 286 | Property { name: "opacity"; type: "double" } |
|
287 | 287 | Property { name: "enabled"; type: "bool" } |
|
288 | 288 | Property { name: "visible"; type: "bool" } |
|
289 | 289 | Property { name: "pos"; type: "QPointF" } |
|
290 | 290 | Property { name: "x"; type: "double" } |
|
291 | 291 | Property { name: "y"; type: "double" } |
|
292 | 292 | Property { name: "z"; type: "double" } |
|
293 | 293 | Property { name: "rotation"; type: "double" } |
|
294 | 294 | Property { name: "scale"; type: "double" } |
|
295 | 295 | Property { name: "transformOriginPoint"; type: "QPointF" } |
|
296 | 296 | Property { name: "effect"; type: "QGraphicsEffect"; isPointer: true } |
|
297 | 297 | Property { |
|
298 | 298 | name: "children" |
|
299 | 299 | type: "QDeclarativeListProperty<QGraphicsObject>" |
|
300 | 300 | isReadonly: true |
|
301 | 301 | } |
|
302 | 302 | Property { name: "width"; type: "double" } |
|
303 | 303 | Property { name: "height"; type: "double" } |
|
304 | 304 | } |
|
305 | 305 | Component { |
|
306 | 306 | name: "QGraphicsWidget" |
|
307 | 307 | defaultProperty: "children" |
|
308 | 308 | prototype: "QGraphicsObject" |
|
309 | 309 | Property { name: "palette"; type: "QPalette" } |
|
310 | 310 | Property { name: "font"; type: "QFont" } |
|
311 | 311 | Property { name: "layoutDirection"; type: "Qt::LayoutDirection" } |
|
312 | 312 | Property { name: "size"; type: "QSizeF" } |
|
313 | 313 | Property { name: "minimumSize"; type: "QSizeF" } |
|
314 | 314 | Property { name: "preferredSize"; type: "QSizeF" } |
|
315 | 315 | Property { name: "maximumSize"; type: "QSizeF" } |
|
316 | 316 | Property { name: "sizePolicy"; type: "QSizePolicy" } |
|
317 | 317 | Property { name: "focusPolicy"; type: "Qt::FocusPolicy" } |
|
318 | 318 | Property { name: "windowFlags"; type: "Qt::WindowFlags" } |
|
319 | 319 | Property { name: "windowTitle"; type: "string" } |
|
320 | 320 | Property { name: "geometry"; type: "QRectF" } |
|
321 | 321 | Property { name: "autoFillBackground"; type: "bool" } |
|
322 | 322 | Property { name: "layout"; type: "QGraphicsLayout"; isPointer: true } |
|
323 | 323 | Method { name: "close"; type: "bool" } |
|
324 | 324 | } |
|
325 | 325 | Component { |
|
326 | 326 | name: "QQuickItem" |
|
327 | 327 | defaultProperty: "data" |
|
328 | 328 | prototype: "QObject" |
|
329 | 329 | Enum { |
|
330 | 330 | name: "TransformOrigin" |
|
331 | 331 | values: { |
|
332 | 332 | "TopLeft": 0, |
|
333 | 333 | "Top": 1, |
|
334 | 334 | "TopRight": 2, |
|
335 | 335 | "Left": 3, |
|
336 | 336 | "Center": 4, |
|
337 | 337 | "Right": 5, |
|
338 | 338 | "BottomLeft": 6, |
|
339 | 339 | "Bottom": 7, |
|
340 | 340 | "BottomRight": 8 |
|
341 | 341 | } |
|
342 | 342 | } |
|
343 | 343 | Property { name: "parent"; type: "QQuickItem"; isPointer: true } |
|
344 | 344 | Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } |
|
345 | 345 | Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true } |
|
346 | 346 | Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true } |
|
347 | 347 | Property { name: "x"; type: "double" } |
|
348 | 348 | Property { name: "y"; type: "double" } |
|
349 | 349 | Property { name: "z"; type: "double" } |
|
350 | 350 | Property { name: "width"; type: "double" } |
|
351 | 351 | Property { name: "height"; type: "double" } |
|
352 | 352 | Property { name: "opacity"; type: "double" } |
|
353 | 353 | Property { name: "enabled"; type: "bool" } |
|
354 | 354 | Property { name: "visible"; type: "bool" } |
|
355 | 355 | Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true } |
|
356 | 356 | Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true } |
|
357 | 357 | Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true } |
|
358 | 358 | Property { name: "state"; type: "string" } |
|
359 | 359 | Property { name: "childrenRect"; type: "QRectF"; isReadonly: true } |
|
360 | 360 | Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true } |
|
361 | 361 | Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true } |
|
362 | 362 | Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true } |
|
363 | 363 | Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true } |
|
364 | 364 | Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true } |
|
365 | 365 | Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true } |
|
366 | 366 | Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true } |
|
367 | 367 | Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true } |
|
368 | 368 | Property { name: "baselineOffset"; type: "double" } |
|
369 | 369 | Property { name: "clip"; type: "bool" } |
|
370 | 370 | Property { name: "focus"; type: "bool" } |
|
371 | 371 | Property { name: "activeFocus"; type: "bool"; isReadonly: true } |
|
372 | 372 | Property { name: "activeFocusOnTab"; revision: 1; type: "bool" } |
|
373 | 373 | Property { name: "rotation"; type: "double" } |
|
374 | 374 | Property { name: "scale"; type: "double" } |
|
375 | 375 | Property { name: "transformOrigin"; type: "TransformOrigin" } |
|
376 | 376 | Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true } |
|
377 | 377 | Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true } |
|
378 | 378 | Property { name: "smooth"; type: "bool" } |
|
379 | 379 | Property { name: "antialiasing"; type: "bool" } |
|
380 | 380 | Property { name: "implicitWidth"; type: "double" } |
|
381 | 381 | Property { name: "implicitHeight"; type: "double" } |
|
382 | 382 | Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true } |
|
383 | 383 | Signal { |
|
384 | 384 | name: "childrenRectChanged" |
|
385 | 385 | Parameter { type: "QRectF" } |
|
386 | 386 | } |
|
387 | 387 | Signal { |
|
388 | 388 | name: "baselineOffsetChanged" |
|
389 | 389 | Parameter { type: "double" } |
|
390 | 390 | } |
|
391 | 391 | Signal { |
|
392 | 392 | name: "stateChanged" |
|
393 | 393 | Parameter { type: "string" } |
|
394 | 394 | } |
|
395 | 395 | Signal { |
|
396 | 396 | name: "focusChanged" |
|
397 | 397 | Parameter { type: "bool" } |
|
398 | 398 | } |
|
399 | 399 | Signal { |
|
400 | 400 | name: "activeFocusChanged" |
|
401 | 401 | Parameter { type: "bool" } |
|
402 | 402 | } |
|
403 | 403 | Signal { |
|
404 | 404 | name: "activeFocusOnTabChanged" |
|
405 | 405 | revision: 1 |
|
406 | 406 | Parameter { type: "bool" } |
|
407 | 407 | } |
|
408 | 408 | Signal { |
|
409 | 409 | name: "parentChanged" |
|
410 | 410 | Parameter { type: "QQuickItem"; isPointer: true } |
|
411 | 411 | } |
|
412 | 412 | Signal { |
|
413 | 413 | name: "transformOriginChanged" |
|
414 | 414 | Parameter { type: "TransformOrigin" } |
|
415 | 415 | } |
|
416 | 416 | Signal { |
|
417 | 417 | name: "smoothChanged" |
|
418 | 418 | Parameter { type: "bool" } |
|
419 | 419 | } |
|
420 | 420 | Signal { |
|
421 | 421 | name: "antialiasingChanged" |
|
422 | 422 | Parameter { type: "bool" } |
|
423 | 423 | } |
|
424 | 424 | Signal { |
|
425 | 425 | name: "clipChanged" |
|
426 | 426 | Parameter { type: "bool" } |
|
427 | 427 | } |
|
428 | 428 | Signal { |
|
429 | 429 | name: "windowChanged" |
|
430 | 430 | revision: 1 |
|
431 | 431 | Parameter { name: "window"; type: "QQuickWindow"; isPointer: true } |
|
432 | 432 | } |
|
433 | 433 | Method { name: "update" } |
|
434 | 434 | Method { |
|
435 | 435 | name: "grabToImage" |
|
436 | 436 | revision: 2 |
|
437 | 437 | type: "bool" |
|
438 | 438 | Parameter { name: "callback"; type: "QJSValue" } |
|
439 | 439 | Parameter { name: "targetSize"; type: "QSize" } |
|
440 | 440 | } |
|
441 | 441 | Method { |
|
442 | 442 | name: "grabToImage" |
|
443 | 443 | revision: 2 |
|
444 | 444 | type: "bool" |
|
445 | 445 | Parameter { name: "callback"; type: "QJSValue" } |
|
446 | 446 | } |
|
447 | 447 | Method { |
|
448 | 448 | name: "contains" |
|
449 | 449 | type: "bool" |
|
450 | 450 | Parameter { name: "point"; type: "QPointF" } |
|
451 | 451 | } |
|
452 | 452 | Method { |
|
453 | 453 | name: "mapFromItem" |
|
454 | 454 | Parameter { type: "QQmlV4Function"; isPointer: true } |
|
455 | 455 | } |
|
456 | 456 | Method { |
|
457 | 457 | name: "mapToItem" |
|
458 | 458 | Parameter { type: "QQmlV4Function"; isPointer: true } |
|
459 | 459 | } |
|
460 | 460 | Method { name: "forceActiveFocus" } |
|
461 | 461 | Method { |
|
462 | 462 | name: "forceActiveFocus" |
|
463 | 463 | Parameter { name: "reason"; type: "Qt::FocusReason" } |
|
464 | 464 | } |
|
465 | 465 | Method { |
|
466 | 466 | name: "nextItemInFocusChain" |
|
467 | 467 | revision: 1 |
|
468 | 468 | type: "QQuickItem*" |
|
469 | 469 | Parameter { name: "forward"; type: "bool" } |
|
470 | 470 | } |
|
471 | 471 | Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" } |
|
472 | 472 | Method { |
|
473 | 473 | name: "childAt" |
|
474 | 474 | type: "QQuickItem*" |
|
475 | 475 | Parameter { name: "x"; type: "double" } |
|
476 | 476 | Parameter { name: "y"; type: "double" } |
|
477 | 477 | } |
|
478 | 478 | } |
|
479 | 479 | Component { |
|
480 | 480 | name: "QQuickPaintedItem" |
|
481 | 481 | defaultProperty: "data" |
|
482 | 482 | prototype: "QQuickItem" |
|
483 | 483 | Enum { |
|
484 | 484 | name: "RenderTarget" |
|
485 | 485 | values: { |
|
486 | 486 | "Image": 0, |
|
487 | 487 | "FramebufferObject": 1, |
|
488 | 488 | "InvertedYFramebufferObject": 2 |
|
489 | 489 | } |
|
490 | 490 | } |
|
491 | 491 | Property { name: "contentsSize"; type: "QSize" } |
|
492 | 492 | Property { name: "fillColor"; type: "QColor" } |
|
493 | 493 | Property { name: "contentsScale"; type: "double" } |
|
494 | 494 | Property { name: "renderTarget"; type: "RenderTarget" } |
|
495 | 495 | } |
|
496 | 496 | Component { |
|
497 | 497 | name: "QtCharts::DeclarativeAreaSeries" |
|
498 | 498 | prototype: "QtCharts::QAreaSeries" |
|
499 | 499 | exports: [ |
|
500 | 500 | "QtCharts/AreaSeries 1.0", |
|
501 | 501 | "QtCharts/AreaSeries 1.1", |
|
502 | 502 | "QtCharts/AreaSeries 1.2", |
|
503 | 503 | "QtCharts/AreaSeries 1.3", |
|
504 | 504 | "QtCharts/AreaSeries 1.4", |
|
505 | 505 | "QtCharts/AreaSeries 2.0" |
|
506 | 506 | ] |
|
507 | 507 | exportMetaObjectRevisions: [0, 1, 2, 3, 4, 4] |
|
508 | 508 | Property { name: "upperSeries"; type: "DeclarativeLineSeries"; isPointer: true } |
|
509 | 509 | Property { name: "lowerSeries"; type: "DeclarativeLineSeries"; isPointer: true } |
|
510 | 510 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
511 | 511 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
512 | 512 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
513 | 513 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
514 | 514 | Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
515 | 515 | Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
516 | 516 | Property { name: "borderWidth"; revision: 1; type: "double" } |
|
517 | 517 | Property { name: "brushFilename"; revision: 4; type: "string" } |
|
518 | 518 | Property { name: "brush"; revision: 4; type: "QBrush" } |
|
519 | 519 | Signal { |
|
520 | 520 | name: "axisXChanged" |
|
521 | 521 | revision: 1 |
|
522 | 522 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
523 | 523 | } |
|
524 | 524 | Signal { |
|
525 | 525 | name: "axisYChanged" |
|
526 | 526 | revision: 1 |
|
527 | 527 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
528 | 528 | } |
|
529 | 529 | Signal { |
|
530 | 530 | name: "borderWidthChanged" |
|
531 | 531 | revision: 1 |
|
532 | 532 | Parameter { name: "width"; type: "double" } |
|
533 | 533 | } |
|
534 | 534 | Signal { |
|
535 | 535 | name: "axisXTopChanged" |
|
536 | 536 | revision: 2 |
|
537 | 537 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
538 | 538 | } |
|
539 | 539 | Signal { |
|
540 | 540 | name: "axisYRightChanged" |
|
541 | 541 | revision: 2 |
|
542 | 542 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
543 | 543 | } |
|
544 | 544 | Signal { |
|
545 | 545 | name: "axisAngularChanged" |
|
546 | 546 | revision: 3 |
|
547 | 547 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
548 | 548 | } |
|
549 | 549 | Signal { |
|
550 | 550 | name: "axisRadialChanged" |
|
551 | 551 | revision: 3 |
|
552 | 552 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
553 | 553 | } |
|
554 | 554 | Signal { name: "brushChanged"; revision: 4 } |
|
555 | 555 | Signal { |
|
556 | 556 | name: "brushFilenameChanged" |
|
557 | 557 | revision: 4 |
|
558 | 558 | Parameter { name: "brushFilename"; type: "string" } |
|
559 | 559 | } |
|
560 | 560 | } |
|
561 | 561 | Component { |
|
562 | 562 | name: "QtCharts::DeclarativeAxes" |
|
563 | 563 | prototype: "QObject" |
|
564 | 564 | exports: [ |
|
565 | 565 | "QtCharts/DeclarativeAxes 1.0", |
|
566 | 566 | "QtCharts/DeclarativeAxes 2.0" |
|
567 | 567 | ] |
|
568 | 568 | isCreatable: false |
|
569 | 569 | exportMetaObjectRevisions: [0, 0] |
|
570 | 570 | Property { name: "axisX"; type: "QAbstractAxis"; isPointer: true } |
|
571 | 571 | Property { name: "axisY"; type: "QAbstractAxis"; isPointer: true } |
|
572 | 572 | Property { name: "axisXTop"; type: "QAbstractAxis"; isPointer: true } |
|
573 | 573 | Property { name: "axisYRight"; type: "QAbstractAxis"; isPointer: true } |
|
574 | 574 | Signal { |
|
575 | 575 | name: "axisXChanged" |
|
576 | 576 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
577 | 577 | } |
|
578 | 578 | Signal { |
|
579 | 579 | name: "axisYChanged" |
|
580 | 580 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
581 | 581 | } |
|
582 | 582 | Signal { |
|
583 | 583 | name: "axisXTopChanged" |
|
584 | 584 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
585 | 585 | } |
|
586 | 586 | Signal { |
|
587 | 587 | name: "axisYRightChanged" |
|
588 | 588 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
589 | 589 | } |
|
590 | 590 | } |
|
591 | 591 | Component { |
|
592 | 592 | name: "QtCharts::DeclarativeBarSeries" |
|
593 | 593 | defaultProperty: "seriesChildren" |
|
594 | 594 | prototype: "QtCharts::QBarSeries" |
|
595 | 595 | exports: [ |
|
596 | 596 | "QtCharts/BarSeries 1.0", |
|
597 | 597 | "QtCharts/BarSeries 1.1", |
|
598 | 598 | "QtCharts/BarSeries 1.2", |
|
599 | 599 | "QtCharts/BarSeries 2.0" |
|
600 | 600 | ] |
|
601 | 601 | exportMetaObjectRevisions: [0, 1, 2, 2] |
|
602 | 602 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
603 | 603 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
604 | 604 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
605 | 605 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
606 | 606 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
607 | 607 | Signal { |
|
608 | 608 | name: "axisXChanged" |
|
609 | 609 | revision: 1 |
|
610 | 610 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
611 | 611 | } |
|
612 | 612 | Signal { |
|
613 | 613 | name: "axisYChanged" |
|
614 | 614 | revision: 1 |
|
615 | 615 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
616 | 616 | } |
|
617 | 617 | Signal { |
|
618 | 618 | name: "axisXTopChanged" |
|
619 | 619 | revision: 2 |
|
620 | 620 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
621 | 621 | } |
|
622 | 622 | Signal { |
|
623 | 623 | name: "axisYRightChanged" |
|
624 | 624 | revision: 2 |
|
625 | 625 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
626 | 626 | } |
|
627 | 627 | Method { |
|
628 | 628 | name: "appendSeriesChildren" |
|
629 | 629 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
630 | 630 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
631 | 631 | } |
|
632 | 632 | Method { |
|
633 | 633 | name: "at" |
|
634 | 634 | type: "DeclarativeBarSet*" |
|
635 | 635 | Parameter { name: "index"; type: "int" } |
|
636 | 636 | } |
|
637 | 637 | Method { |
|
638 | 638 | name: "append" |
|
639 | 639 | type: "DeclarativeBarSet*" |
|
640 | 640 | Parameter { name: "label"; type: "string" } |
|
641 | 641 | Parameter { name: "values"; type: "QVariantList" } |
|
642 | 642 | } |
|
643 | 643 | Method { |
|
644 | 644 | name: "insert" |
|
645 | 645 | type: "DeclarativeBarSet*" |
|
646 | 646 | Parameter { name: "index"; type: "int" } |
|
647 | 647 | Parameter { name: "label"; type: "string" } |
|
648 | 648 | Parameter { name: "values"; type: "QVariantList" } |
|
649 | 649 | } |
|
650 | 650 | Method { |
|
651 | 651 | name: "remove" |
|
652 | 652 | type: "bool" |
|
653 | 653 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
654 | 654 | } |
|
655 | 655 | Method { name: "clear" } |
|
656 | 656 | } |
|
657 | 657 | Component { |
|
658 | 658 | name: "QtCharts::DeclarativeBarSet" |
|
659 | 659 | prototype: "QtCharts::QBarSet" |
|
660 | 660 | exports: [ |
|
661 | 661 | "QtCharts/BarSet 1.0", |
|
662 | 662 | "QtCharts/BarSet 1.1", |
|
663 | 663 | "QtCharts/BarSet 1.4", |
|
664 | 664 | "QtCharts/BarSet 2.0" |
|
665 | 665 | ] |
|
666 | 666 | exportMetaObjectRevisions: [0, 0, 2, 2] |
|
667 | 667 | Property { name: "values"; type: "QVariantList" } |
|
668 | 668 | Property { name: "borderWidth"; revision: 1; type: "double" } |
|
669 | 669 | Property { name: "count"; type: "int"; isReadonly: true } |
|
670 | 670 | Property { name: "brushFilename"; revision: 2; type: "string" } |
|
671 | 671 | Signal { |
|
672 | 672 | name: "countChanged" |
|
673 | 673 | Parameter { name: "count"; type: "int" } |
|
674 | 674 | } |
|
675 | 675 | Signal { |
|
676 | 676 | name: "borderWidthChanged" |
|
677 | 677 | revision: 1 |
|
678 | 678 | Parameter { name: "width"; type: "double" } |
|
679 | 679 | } |
|
680 | 680 | Signal { |
|
681 | 681 | name: "brushFilenameChanged" |
|
682 | 682 | revision: 2 |
|
683 | 683 | Parameter { name: "brushFilename"; type: "string" } |
|
684 | 684 | } |
|
685 | 685 | Method { |
|
686 | 686 | name: "append" |
|
687 | 687 | Parameter { name: "value"; type: "double" } |
|
688 | 688 | } |
|
689 | 689 | Method { |
|
690 | 690 | name: "remove" |
|
691 | 691 | Parameter { name: "index"; type: "int" } |
|
692 | 692 | Parameter { name: "count"; type: "int" } |
|
693 | 693 | } |
|
694 | 694 | Method { |
|
695 | 695 | name: "remove" |
|
696 | 696 | Parameter { name: "index"; type: "int" } |
|
697 | 697 | } |
|
698 | 698 | Method { |
|
699 | 699 | name: "replace" |
|
700 | 700 | Parameter { name: "index"; type: "int" } |
|
701 | 701 | Parameter { name: "value"; type: "double" } |
|
702 | 702 | } |
|
703 | 703 | Method { |
|
704 | 704 | name: "at" |
|
705 | 705 | type: "double" |
|
706 | 706 | Parameter { name: "index"; type: "int" } |
|
707 | 707 | } |
|
708 | 708 | } |
|
709 | 709 | Component { |
|
710 | 710 | name: "QtCharts::DeclarativeBoxPlotSeries" |
|
711 | 711 | defaultProperty: "seriesChildren" |
|
712 | 712 | prototype: "QtCharts::QBoxPlotSeries" |
|
713 | 713 | exports: [ |
|
714 | 714 | "QtCharts/BoxPlotSeries 1.3", |
|
715 | 715 | "QtCharts/BoxPlotSeries 1.4", |
|
716 | 716 | "QtCharts/BoxPlotSeries 2.0" |
|
717 | 717 | ] |
|
718 | 718 | exportMetaObjectRevisions: [0, 1, 1] |
|
719 | 719 | Property { name: "axisX"; type: "QAbstractAxis"; isPointer: true } |
|
720 | 720 | Property { name: "axisY"; type: "QAbstractAxis"; isPointer: true } |
|
721 | 721 | Property { name: "axisXTop"; type: "QAbstractAxis"; isPointer: true } |
|
722 | 722 | Property { name: "axisYRight"; type: "QAbstractAxis"; isPointer: true } |
|
723 | 723 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
724 | 724 | Property { name: "brushFilename"; revision: 1; type: "string" } |
|
725 | 725 | Signal { |
|
726 | 726 | name: "axisXChanged" |
|
727 | 727 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
728 | 728 | } |
|
729 | 729 | Signal { |
|
730 | 730 | name: "axisYChanged" |
|
731 | 731 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
732 | 732 | } |
|
733 | 733 | Signal { |
|
734 | 734 | name: "axisXTopChanged" |
|
735 | 735 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
736 | 736 | } |
|
737 | 737 | Signal { |
|
738 | 738 | name: "axisYRightChanged" |
|
739 | 739 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
740 | 740 | } |
|
741 | 741 | Signal { |
|
742 | 742 | name: "clicked" |
|
743 | 743 | Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true } |
|
744 | 744 | } |
|
745 | 745 | Signal { |
|
746 | 746 | name: "hovered" |
|
747 | 747 | Parameter { name: "status"; type: "bool" } |
|
748 | 748 | Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true } |
|
749 | 749 | } |
|
750 | 750 | Signal { |
|
751 | 751 | name: "pressed" |
|
752 | 752 | Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true } |
|
753 | 753 | } |
|
754 | 754 | Signal { |
|
755 | 755 | name: "released" |
|
756 | 756 | Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true } |
|
757 | 757 | } |
|
758 | 758 | Signal { |
|
759 | 759 | name: "doubleClicked" |
|
760 | 760 | Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true } |
|
761 | 761 | } |
|
762 | 762 | Signal { |
|
763 | 763 | name: "brushFilenameChanged" |
|
764 | 764 | revision: 1 |
|
765 | 765 | Parameter { name: "brushFilename"; type: "string" } |
|
766 | 766 | } |
|
767 | 767 | Method { |
|
768 | 768 | name: "appendSeriesChildren" |
|
769 | 769 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
770 | 770 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
771 | 771 | } |
|
772 | 772 | Method { |
|
773 | 773 | name: "onHovered" |
|
774 | 774 | Parameter { name: "status"; type: "bool" } |
|
775 | 775 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
776 | 776 | } |
|
777 | 777 | Method { |
|
778 | 778 | name: "onClicked" |
|
779 | 779 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
780 | 780 | } |
|
781 | 781 | Method { |
|
782 | 782 | name: "onPressed" |
|
783 | 783 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
784 | 784 | } |
|
785 | 785 | Method { |
|
786 | 786 | name: "onReleased" |
|
787 | 787 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
788 | 788 | } |
|
789 | 789 | Method { |
|
790 | 790 | name: "onDoubleClicked" |
|
791 | 791 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
792 | 792 | } |
|
793 | 793 | Method { |
|
794 | 794 | name: "at" |
|
795 | 795 | type: "DeclarativeBoxSet*" |
|
796 | 796 | Parameter { name: "index"; type: "int" } |
|
797 | 797 | } |
|
798 | 798 | Method { |
|
799 | 799 | name: "append" |
|
800 | 800 | type: "DeclarativeBoxSet*" |
|
801 | 801 | Parameter { name: "label"; type: "string" } |
|
802 | 802 | Parameter { name: "values"; type: "QVariantList" } |
|
803 | 803 | } |
|
804 | 804 | Method { |
|
805 | 805 | name: "append" |
|
806 | 806 | Parameter { name: "box"; type: "DeclarativeBoxSet"; isPointer: true } |
|
807 | 807 | } |
|
808 | 808 | Method { |
|
809 | 809 | name: "insert" |
|
810 | 810 | type: "DeclarativeBoxSet*" |
|
811 | 811 | Parameter { name: "index"; type: "int" } |
|
812 | 812 | Parameter { name: "label"; type: "string" } |
|
813 | 813 | Parameter { name: "values"; type: "QVariantList" } |
|
814 | 814 | } |
|
815 | 815 | Method { |
|
816 | 816 | name: "remove" |
|
817 | 817 | type: "bool" |
|
818 | 818 | Parameter { name: "box"; type: "DeclarativeBoxSet"; isPointer: true } |
|
819 | 819 | } |
|
820 | 820 | Method { name: "clear" } |
|
821 | 821 | } |
|
822 | 822 | Component { |
|
823 | 823 | name: "QtCharts::DeclarativeBoxSet" |
|
824 | 824 | prototype: "QtCharts::QBoxSet" |
|
825 | 825 | exports: [ |
|
826 | 826 | "QtCharts/BoxSet 1.3", |
|
827 | 827 | "QtCharts/BoxSet 1.4", |
|
828 | 828 | "QtCharts/BoxSet 2.0" |
|
829 | 829 | ] |
|
830 | 830 | exportMetaObjectRevisions: [0, 1, 1] |
|
831 | 831 | Enum { |
|
832 | 832 | name: "ValuePositions" |
|
833 | 833 | values: { |
|
834 | 834 | "LowerExtreme": 0, |
|
835 | 835 | "LowerQuartile": 1, |
|
836 | 836 | "Median": 2, |
|
837 | 837 | "UpperQuartile": 3, |
|
838 | 838 | "UpperExtreme": 4 |
|
839 | 839 | } |
|
840 | 840 | } |
|
841 | 841 | Property { name: "values"; type: "QVariantList" } |
|
842 | 842 | Property { name: "label"; type: "string" } |
|
843 | 843 | Property { name: "count"; type: "int"; isReadonly: true } |
|
844 | 844 | Property { name: "brushFilename"; revision: 1; type: "string" } |
|
845 | 845 | Signal { name: "changedValues" } |
|
846 | 846 | Signal { |
|
847 | 847 | name: "changedValue" |
|
848 | 848 | Parameter { name: "index"; type: "int" } |
|
849 | 849 | } |
|
850 | 850 | Signal { |
|
851 | 851 | name: "brushFilenameChanged" |
|
852 | 852 | revision: 1 |
|
853 | 853 | Parameter { name: "brushFilename"; type: "string" } |
|
854 | 854 | } |
|
855 | 855 | Method { |
|
856 | 856 | name: "append" |
|
857 | 857 | Parameter { name: "value"; type: "double" } |
|
858 | 858 | } |
|
859 | 859 | Method { name: "clear" } |
|
860 | 860 | Method { |
|
861 | 861 | name: "at" |
|
862 | 862 | type: "double" |
|
863 | 863 | Parameter { name: "index"; type: "int" } |
|
864 | 864 | } |
|
865 | 865 | Method { |
|
866 | 866 | name: "setValue" |
|
867 | 867 | Parameter { name: "index"; type: "int" } |
|
868 | 868 | Parameter { name: "value"; type: "double" } |
|
869 | 869 | } |
|
870 | 870 | } |
|
871 | 871 | Component { |
|
872 | 872 | name: "QtCharts::DeclarativeCategoryAxis" |
|
873 | 873 | defaultProperty: "axisChildren" |
|
874 | 874 | prototype: "QtCharts::QCategoryAxis" |
|
875 | 875 | exports: [ |
|
876 | 876 | "QtCharts/CategoryAxis 1.1", |
|
877 | 877 | "QtCharts/CategoryAxis 2.0", |
|
878 | 878 | "QtCharts/CategoryAxis 2.1" |
|
879 | 879 | ] |
|
880 | 880 | exportMetaObjectRevisions: [0, 0, 1] |
|
881 | 881 | Enum { |
|
882 | 882 | name: "AxisLabelsPosition" |
|
883 | 883 | values: { |
|
884 | 884 | "AxisLabelsPositionCenter": 0, |
|
885 | 885 | "AxisLabelsPositionOnValue": 1 |
|
886 | 886 | } |
|
887 | 887 | } |
|
888 | 888 | Property { name: "axisChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
889 | 889 | Property { name: "labelsPosition"; revision: 1; type: "AxisLabelsPosition" } |
|
890 | 890 | Signal { |
|
891 | 891 | name: "labelsPositionChanged" |
|
892 | 892 | revision: 1 |
|
893 | 893 | Parameter { name: "position"; type: "AxisLabelsPosition" } |
|
894 | 894 | } |
|
895 | 895 | Method { |
|
896 | 896 | name: "append" |
|
897 | 897 | Parameter { name: "label"; type: "string" } |
|
898 | 898 | Parameter { name: "categoryEndValue"; type: "double" } |
|
899 | 899 | } |
|
900 | 900 | Method { |
|
901 | 901 | name: "remove" |
|
902 | 902 | Parameter { name: "label"; type: "string" } |
|
903 | 903 | } |
|
904 | 904 | Method { |
|
905 | 905 | name: "replace" |
|
906 | 906 | Parameter { name: "oldLabel"; type: "string" } |
|
907 | 907 | Parameter { name: "newLabel"; type: "string" } |
|
908 | 908 | } |
|
909 | 909 | Method { |
|
910 | 910 | name: "appendAxisChildren" |
|
911 | 911 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
912 | 912 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
913 | 913 | } |
|
914 | 914 | } |
|
915 | 915 | Component { |
|
916 | 916 | name: "QtCharts::DeclarativeCategoryRange" |
|
917 | 917 | prototype: "QObject" |
|
918 | 918 | exports: ["QtCharts/CategoryRange 1.1", "QtCharts/CategoryRange 2.0"] |
|
919 | 919 | exportMetaObjectRevisions: [0, 0] |
|
920 | 920 | Property { name: "endValue"; type: "double" } |
|
921 | 921 | Property { name: "label"; type: "string" } |
|
922 | 922 | } |
|
923 | 923 | Component { |
|
924 | 924 | name: "QtCharts::DeclarativeChart" |
|
925 | 925 | defaultProperty: "data" |
|
926 | 926 | prototype: "QQuickPaintedItem" |
|
927 | 927 | exports: [ |
|
928 | 928 | "QtCharts/ChartView 1.0", |
|
929 | 929 | "QtCharts/ChartView 1.1", |
|
930 | 930 | "QtCharts/ChartView 1.2", |
|
931 | 931 | "QtCharts/ChartView 1.3", |
|
932 | "QtCharts/ChartView 2.0" | |
|
932 | "QtCharts/ChartView 2.0", | |
|
933 | "QtCharts/ChartView 2.1" | |
|
933 | 934 | ] |
|
934 | exportMetaObjectRevisions: [0, 1, 2, 3, 4] | |
|
935 | exportMetaObjectRevisions: [0, 1, 2, 3, 4, 5] | |
|
935 | 936 | Enum { |
|
936 | 937 | name: "Theme" |
|
937 | 938 | values: { |
|
938 | 939 | "ChartThemeLight": 0, |
|
939 | 940 | "ChartThemeBlueCerulean": 1, |
|
940 | 941 | "ChartThemeDark": 2, |
|
941 | 942 | "ChartThemeBrownSand": 3, |
|
942 | 943 | "ChartThemeBlueNcs": 4, |
|
943 | 944 | "ChartThemeHighContrast": 5, |
|
944 | 945 | "ChartThemeBlueIcy": 6, |
|
945 | 946 | "ChartThemeQt": 7 |
|
946 | 947 | } |
|
947 | 948 | } |
|
948 | 949 | Enum { |
|
949 | 950 | name: "Animation" |
|
950 | 951 | values: { |
|
951 | 952 | "NoAnimation": 0, |
|
952 | 953 | "GridAxisAnimations": 1, |
|
953 | 954 | "SeriesAnimations": 2, |
|
954 | 955 | "AllAnimations": 3 |
|
955 | 956 | } |
|
956 | 957 | } |
|
957 | 958 | Enum { |
|
958 | 959 | name: "SeriesType" |
|
959 | 960 | values: { |
|
960 | 961 | "SeriesTypeLine": 0, |
|
961 | 962 | "SeriesTypeArea": 1, |
|
962 | 963 | "SeriesTypeBar": 2, |
|
963 | 964 | "SeriesTypeStackedBar": 3, |
|
964 | 965 | "SeriesTypePercentBar": 4, |
|
965 | 966 | "SeriesTypeBoxPlot": 5, |
|
966 | 967 | "SeriesTypePie": 6, |
|
967 | 968 | "SeriesTypeScatter": 7, |
|
968 | 969 | "SeriesTypeSpline": 8, |
|
969 | 970 | "SeriesTypeHorizontalBar": 9, |
|
970 | 971 | "SeriesTypeHorizontalStackedBar": 10, |
|
971 | 972 | "SeriesTypeHorizontalPercentBar": 11 |
|
972 | 973 | } |
|
973 | 974 | } |
|
974 | 975 | Property { name: "theme"; type: "Theme" } |
|
975 | 976 | Property { name: "animationOptions"; type: "Animation" } |
|
976 | 977 | Property { name: "title"; type: "string" } |
|
977 | 978 | Property { name: "titleFont"; type: "QFont" } |
|
978 | 979 | Property { name: "titleColor"; type: "QColor" } |
|
979 | 980 | Property { name: "legend"; type: "QLegend"; isReadonly: true; isPointer: true } |
|
980 | 981 | Property { name: "count"; type: "int"; isReadonly: true } |
|
981 | 982 | Property { name: "backgroundColor"; type: "QColor" } |
|
982 | 983 | Property { name: "dropShadowEnabled"; type: "bool" } |
|
983 | 984 | Property { name: "backgroundRoundness"; revision: 3; type: "double" } |
|
984 | 985 | Property { |
|
985 | 986 | name: "margins" |
|
986 | 987 | revision: 2 |
|
987 | 988 | type: "DeclarativeMargins" |
|
988 | 989 | isReadonly: true |
|
989 | 990 | isPointer: true |
|
990 | 991 | } |
|
991 | 992 | Property { name: "plotArea"; revision: 1; type: "QRectF"; isReadonly: true } |
|
992 | 993 | Property { name: "plotAreaColor"; revision: 3; type: "QColor" } |
|
993 | 994 | Property { name: "axes"; revision: 2; type: "QAbstractAxis"; isList: true; isReadonly: true } |
|
994 | 995 | Property { name: "localizeNumbers"; revision: 4; type: "bool" } |
|
995 | 996 | Property { name: "locale"; revision: 4; type: "QLocale" } |
|
996 | 997 | Signal { name: "axisLabelsChanged" } |
|
997 | 998 | Signal { |
|
998 | 999 | name: "titleColorChanged" |
|
999 | 1000 | Parameter { name: "color"; type: "QColor" } |
|
1000 | 1001 | } |
|
1001 | 1002 | Signal { |
|
1002 | 1003 | name: "dropShadowEnabledChanged" |
|
1003 | 1004 | Parameter { name: "enabled"; type: "bool" } |
|
1004 | 1005 | } |
|
1005 | 1006 | Signal { name: "marginsChanged"; revision: 2 } |
|
1006 | 1007 | Signal { |
|
1007 | 1008 | name: "plotAreaChanged" |
|
1008 | 1009 | Parameter { name: "plotArea"; type: "QRectF" } |
|
1009 | 1010 | } |
|
1010 | 1011 | Signal { |
|
1011 | 1012 | name: "seriesAdded" |
|
1012 | 1013 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1013 | 1014 | } |
|
1014 | 1015 | Signal { |
|
1015 | 1016 | name: "seriesRemoved" |
|
1016 | 1017 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1017 | 1018 | } |
|
1018 | 1019 | Signal { name: "plotAreaColorChanged"; revision: 3 } |
|
1019 | 1020 | Signal { |
|
1020 | 1021 | name: "backgroundRoundnessChanged" |
|
1021 | 1022 | revision: 3 |
|
1022 | 1023 | Parameter { name: "diameter"; type: "double" } |
|
1023 | 1024 | } |
|
1024 | 1025 | Signal { name: "localizeNumbersChanged"; revision: 4 } |
|
1025 | 1026 | Signal { name: "localeChanged"; revision: 4 } |
|
1026 | 1027 | Method { |
|
1027 | 1028 | name: "series" |
|
1028 | 1029 | type: "QAbstractSeries*" |
|
1029 | 1030 | Parameter { name: "index"; type: "int" } |
|
1030 | 1031 | } |
|
1031 | 1032 | Method { |
|
1032 | 1033 | name: "series" |
|
1033 | 1034 | type: "QAbstractSeries*" |
|
1034 | 1035 | Parameter { name: "seriesName"; type: "string" } |
|
1035 | 1036 | } |
|
1036 | 1037 | Method { |
|
1037 | 1038 | name: "createSeries" |
|
1038 | 1039 | type: "QAbstractSeries*" |
|
1039 | 1040 | Parameter { name: "type"; type: "int" } |
|
1040 | 1041 | Parameter { name: "name"; type: "string" } |
|
1041 | 1042 | Parameter { name: "axisX"; type: "QAbstractAxis"; isPointer: true } |
|
1042 | 1043 | Parameter { name: "axisY"; type: "QAbstractAxis"; isPointer: true } |
|
1043 | 1044 | } |
|
1044 | 1045 | Method { |
|
1045 | 1046 | name: "createSeries" |
|
1046 | 1047 | type: "QAbstractSeries*" |
|
1047 | 1048 | Parameter { name: "type"; type: "int" } |
|
1048 | 1049 | Parameter { name: "name"; type: "string" } |
|
1049 | 1050 | Parameter { name: "axisX"; type: "QAbstractAxis"; isPointer: true } |
|
1050 | 1051 | } |
|
1051 | 1052 | Method { |
|
1052 | 1053 | name: "createSeries" |
|
1053 | 1054 | type: "QAbstractSeries*" |
|
1054 | 1055 | Parameter { name: "type"; type: "int" } |
|
1055 | 1056 | Parameter { name: "name"; type: "string" } |
|
1056 | 1057 | } |
|
1057 | 1058 | Method { |
|
1058 | 1059 | name: "createSeries" |
|
1059 | 1060 | type: "QAbstractSeries*" |
|
1060 | 1061 | Parameter { name: "type"; type: "int" } |
|
1061 | 1062 | } |
|
1062 | 1063 | Method { |
|
1063 | 1064 | name: "removeSeries" |
|
1064 | 1065 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1065 | 1066 | } |
|
1066 | 1067 | Method { name: "removeAllSeries" } |
|
1067 | 1068 | Method { |
|
1068 | 1069 | name: "setAxisX" |
|
1069 | 1070 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1070 | 1071 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1071 | 1072 | } |
|
1072 | 1073 | Method { |
|
1073 | 1074 | name: "setAxisX" |
|
1074 | 1075 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1075 | 1076 | } |
|
1076 | 1077 | Method { |
|
1077 | 1078 | name: "setAxisY" |
|
1078 | 1079 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1079 | 1080 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1080 | 1081 | } |
|
1081 | 1082 | Method { |
|
1082 | 1083 | name: "setAxisY" |
|
1083 | 1084 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1084 | 1085 | } |
|
1085 | 1086 | Method { |
|
1086 | 1087 | name: "axisX" |
|
1087 | 1088 | type: "QAbstractAxis*" |
|
1088 | 1089 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1089 | 1090 | } |
|
1090 | 1091 | Method { name: "axisX"; type: "QAbstractAxis*" } |
|
1091 | 1092 | Method { |
|
1092 | 1093 | name: "axisY" |
|
1093 | 1094 | type: "QAbstractAxis*" |
|
1094 | 1095 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1095 | 1096 | } |
|
1096 | 1097 | Method { name: "axisY"; type: "QAbstractAxis*" } |
|
1097 | 1098 | Method { |
|
1098 | 1099 | name: "zoom" |
|
1099 | 1100 | Parameter { name: "factor"; type: "double" } |
|
1100 | 1101 | } |
|
1102 | Method { name: "zoomIn"; revision: 5 } | |
|
1103 | Method { | |
|
1104 | name: "zoomIn" | |
|
1105 | revision: 5 | |
|
1106 | Parameter { name: "rectangle"; type: "QRectF" } | |
|
1107 | } | |
|
1108 | Method { name: "zoomOut"; revision: 5 } | |
|
1109 | Method { name: "zoomReset"; revision: 5 } | |
|
1101 | 1110 | Method { |
|
1102 | 1111 | name: "scrollLeft" |
|
1103 | 1112 | Parameter { name: "pixels"; type: "double" } |
|
1104 | 1113 | } |
|
1105 | 1114 | Method { |
|
1106 | 1115 | name: "scrollRight" |
|
1107 | 1116 | Parameter { name: "pixels"; type: "double" } |
|
1108 | 1117 | } |
|
1109 | 1118 | Method { |
|
1110 | 1119 | name: "scrollUp" |
|
1111 | 1120 | Parameter { name: "pixels"; type: "double" } |
|
1112 | 1121 | } |
|
1113 | 1122 | Method { |
|
1114 | 1123 | name: "scrollDown" |
|
1115 | 1124 | Parameter { name: "pixels"; type: "double" } |
|
1116 | 1125 | } |
|
1117 | 1126 | Method { |
|
1118 | 1127 | name: "mapToValue" |
|
1119 | 1128 | revision: 5 |
|
1120 | 1129 | type: "QPointF" |
|
1121 | 1130 | Parameter { name: "position"; type: "QPointF" } |
|
1122 | 1131 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1123 | 1132 | } |
|
1124 | 1133 | Method { |
|
1125 | 1134 | name: "mapToValue" |
|
1126 | 1135 | revision: 5 |
|
1127 | 1136 | type: "QPointF" |
|
1128 | 1137 | Parameter { name: "position"; type: "QPointF" } |
|
1129 | 1138 | } |
|
1130 | 1139 | Method { |
|
1131 | 1140 | name: "mapToPosition" |
|
1132 | 1141 | revision: 5 |
|
1133 | 1142 | type: "QPointF" |
|
1134 | 1143 | Parameter { name: "value"; type: "QPointF" } |
|
1135 | 1144 | Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true } |
|
1136 | 1145 | } |
|
1137 | 1146 | Method { |
|
1138 | 1147 | name: "mapToPosition" |
|
1139 | 1148 | revision: 5 |
|
1140 | 1149 | type: "QPointF" |
|
1141 | 1150 | Parameter { name: "value"; type: "QPointF" } |
|
1142 | 1151 | } |
|
1143 | 1152 | } |
|
1144 | 1153 | Component { |
|
1145 | 1154 | name: "QtCharts::DeclarativeHorizontalBarSeries" |
|
1146 | 1155 | defaultProperty: "seriesChildren" |
|
1147 | 1156 | prototype: "QtCharts::QHorizontalBarSeries" |
|
1148 | 1157 | exports: [ |
|
1149 | 1158 | "QtCharts/HorizontalBarSeries 1.1", |
|
1150 | 1159 | "QtCharts/HorizontalBarSeries 1.2", |
|
1151 | 1160 | "QtCharts/HorizontalBarSeries 2.0" |
|
1152 | 1161 | ] |
|
1153 | 1162 | exportMetaObjectRevisions: [1, 2, 2] |
|
1154 | 1163 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1155 | 1164 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1156 | 1165 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1157 | 1166 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1158 | 1167 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1159 | 1168 | Signal { |
|
1160 | 1169 | name: "axisXChanged" |
|
1161 | 1170 | revision: 1 |
|
1162 | 1171 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1163 | 1172 | } |
|
1164 | 1173 | Signal { |
|
1165 | 1174 | name: "axisYChanged" |
|
1166 | 1175 | revision: 1 |
|
1167 | 1176 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1168 | 1177 | } |
|
1169 | 1178 | Signal { |
|
1170 | 1179 | name: "axisXTopChanged" |
|
1171 | 1180 | revision: 2 |
|
1172 | 1181 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1173 | 1182 | } |
|
1174 | 1183 | Signal { |
|
1175 | 1184 | name: "axisYRightChanged" |
|
1176 | 1185 | revision: 2 |
|
1177 | 1186 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1178 | 1187 | } |
|
1179 | 1188 | Method { |
|
1180 | 1189 | name: "appendSeriesChildren" |
|
1181 | 1190 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1182 | 1191 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1183 | 1192 | } |
|
1184 | 1193 | Method { |
|
1185 | 1194 | name: "at" |
|
1186 | 1195 | type: "DeclarativeBarSet*" |
|
1187 | 1196 | Parameter { name: "index"; type: "int" } |
|
1188 | 1197 | } |
|
1189 | 1198 | Method { |
|
1190 | 1199 | name: "append" |
|
1191 | 1200 | type: "DeclarativeBarSet*" |
|
1192 | 1201 | Parameter { name: "label"; type: "string" } |
|
1193 | 1202 | Parameter { name: "values"; type: "QVariantList" } |
|
1194 | 1203 | } |
|
1195 | 1204 | Method { |
|
1196 | 1205 | name: "insert" |
|
1197 | 1206 | type: "DeclarativeBarSet*" |
|
1198 | 1207 | Parameter { name: "index"; type: "int" } |
|
1199 | 1208 | Parameter { name: "label"; type: "string" } |
|
1200 | 1209 | Parameter { name: "values"; type: "QVariantList" } |
|
1201 | 1210 | } |
|
1202 | 1211 | Method { |
|
1203 | 1212 | name: "remove" |
|
1204 | 1213 | type: "bool" |
|
1205 | 1214 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
1206 | 1215 | } |
|
1207 | 1216 | Method { name: "clear" } |
|
1208 | 1217 | } |
|
1209 | 1218 | Component { |
|
1210 | 1219 | name: "QtCharts::DeclarativeHorizontalPercentBarSeries" |
|
1211 | 1220 | defaultProperty: "seriesChildren" |
|
1212 | 1221 | prototype: "QtCharts::QHorizontalPercentBarSeries" |
|
1213 | 1222 | exports: [ |
|
1214 | 1223 | "QtCharts/HorizontalPercentBarSeries 1.1", |
|
1215 | 1224 | "QtCharts/HorizontalPercentBarSeries 1.2", |
|
1216 | 1225 | "QtCharts/HorizontalPercentBarSeries 2.0" |
|
1217 | 1226 | ] |
|
1218 | 1227 | exportMetaObjectRevisions: [1, 2, 2] |
|
1219 | 1228 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1220 | 1229 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1221 | 1230 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1222 | 1231 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1223 | 1232 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1224 | 1233 | Signal { |
|
1225 | 1234 | name: "axisXChanged" |
|
1226 | 1235 | revision: 1 |
|
1227 | 1236 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1228 | 1237 | } |
|
1229 | 1238 | Signal { |
|
1230 | 1239 | name: "axisYChanged" |
|
1231 | 1240 | revision: 1 |
|
1232 | 1241 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1233 | 1242 | } |
|
1234 | 1243 | Signal { |
|
1235 | 1244 | name: "axisXTopChanged" |
|
1236 | 1245 | revision: 2 |
|
1237 | 1246 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1238 | 1247 | } |
|
1239 | 1248 | Signal { |
|
1240 | 1249 | name: "axisYRightChanged" |
|
1241 | 1250 | revision: 2 |
|
1242 | 1251 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1243 | 1252 | } |
|
1244 | 1253 | Method { |
|
1245 | 1254 | name: "appendSeriesChildren" |
|
1246 | 1255 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1247 | 1256 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1248 | 1257 | } |
|
1249 | 1258 | Method { |
|
1250 | 1259 | name: "at" |
|
1251 | 1260 | type: "DeclarativeBarSet*" |
|
1252 | 1261 | Parameter { name: "index"; type: "int" } |
|
1253 | 1262 | } |
|
1254 | 1263 | Method { |
|
1255 | 1264 | name: "append" |
|
1256 | 1265 | type: "DeclarativeBarSet*" |
|
1257 | 1266 | Parameter { name: "label"; type: "string" } |
|
1258 | 1267 | Parameter { name: "values"; type: "QVariantList" } |
|
1259 | 1268 | } |
|
1260 | 1269 | Method { |
|
1261 | 1270 | name: "insert" |
|
1262 | 1271 | type: "DeclarativeBarSet*" |
|
1263 | 1272 | Parameter { name: "index"; type: "int" } |
|
1264 | 1273 | Parameter { name: "label"; type: "string" } |
|
1265 | 1274 | Parameter { name: "values"; type: "QVariantList" } |
|
1266 | 1275 | } |
|
1267 | 1276 | Method { |
|
1268 | 1277 | name: "remove" |
|
1269 | 1278 | type: "bool" |
|
1270 | 1279 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
1271 | 1280 | } |
|
1272 | 1281 | Method { name: "clear" } |
|
1273 | 1282 | } |
|
1274 | 1283 | Component { |
|
1275 | 1284 | name: "QtCharts::DeclarativeHorizontalStackedBarSeries" |
|
1276 | 1285 | defaultProperty: "seriesChildren" |
|
1277 | 1286 | prototype: "QtCharts::QHorizontalStackedBarSeries" |
|
1278 | 1287 | exports: [ |
|
1279 | 1288 | "QtCharts/HorizontalStackedBarSeries 1.1", |
|
1280 | 1289 | "QtCharts/HorizontalStackedBarSeries 1.2", |
|
1281 | 1290 | "QtCharts/HorizontalStackedBarSeries 2.0" |
|
1282 | 1291 | ] |
|
1283 | 1292 | exportMetaObjectRevisions: [1, 2, 2] |
|
1284 | 1293 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1285 | 1294 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1286 | 1295 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1287 | 1296 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1288 | 1297 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1289 | 1298 | Signal { |
|
1290 | 1299 | name: "axisXChanged" |
|
1291 | 1300 | revision: 1 |
|
1292 | 1301 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1293 | 1302 | } |
|
1294 | 1303 | Signal { |
|
1295 | 1304 | name: "axisYChanged" |
|
1296 | 1305 | revision: 1 |
|
1297 | 1306 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1298 | 1307 | } |
|
1299 | 1308 | Signal { |
|
1300 | 1309 | name: "axisXTopChanged" |
|
1301 | 1310 | revision: 2 |
|
1302 | 1311 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1303 | 1312 | } |
|
1304 | 1313 | Signal { |
|
1305 | 1314 | name: "axisYRightChanged" |
|
1306 | 1315 | revision: 2 |
|
1307 | 1316 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1308 | 1317 | } |
|
1309 | 1318 | Method { |
|
1310 | 1319 | name: "appendSeriesChildren" |
|
1311 | 1320 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1312 | 1321 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1313 | 1322 | } |
|
1314 | 1323 | Method { |
|
1315 | 1324 | name: "at" |
|
1316 | 1325 | type: "DeclarativeBarSet*" |
|
1317 | 1326 | Parameter { name: "index"; type: "int" } |
|
1318 | 1327 | } |
|
1319 | 1328 | Method { |
|
1320 | 1329 | name: "append" |
|
1321 | 1330 | type: "DeclarativeBarSet*" |
|
1322 | 1331 | Parameter { name: "label"; type: "string" } |
|
1323 | 1332 | Parameter { name: "values"; type: "QVariantList" } |
|
1324 | 1333 | } |
|
1325 | 1334 | Method { |
|
1326 | 1335 | name: "insert" |
|
1327 | 1336 | type: "DeclarativeBarSet*" |
|
1328 | 1337 | Parameter { name: "index"; type: "int" } |
|
1329 | 1338 | Parameter { name: "label"; type: "string" } |
|
1330 | 1339 | Parameter { name: "values"; type: "QVariantList" } |
|
1331 | 1340 | } |
|
1332 | 1341 | Method { |
|
1333 | 1342 | name: "remove" |
|
1334 | 1343 | type: "bool" |
|
1335 | 1344 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
1336 | 1345 | } |
|
1337 | 1346 | Method { name: "clear" } |
|
1338 | 1347 | } |
|
1339 | 1348 | Component { |
|
1340 | 1349 | name: "QtCharts::DeclarativeLineSeries" |
|
1341 | 1350 | defaultProperty: "declarativeChildren" |
|
1342 | 1351 | prototype: "QtCharts::QLineSeries" |
|
1343 | 1352 | exports: [ |
|
1344 | 1353 | "QtCharts/LineSeries 1.0", |
|
1345 | 1354 | "QtCharts/LineSeries 1.1", |
|
1346 | 1355 | "QtCharts/LineSeries 1.2", |
|
1347 | 1356 | "QtCharts/LineSeries 1.3", |
|
1348 | 1357 | "QtCharts/LineSeries 2.0" |
|
1349 | 1358 | ] |
|
1350 | 1359 | exportMetaObjectRevisions: [0, 1, 2, 3, 3] |
|
1351 | 1360 | Property { name: "count"; type: "int"; isReadonly: true } |
|
1352 | 1361 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1353 | 1362 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1354 | 1363 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1355 | 1364 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1356 | 1365 | Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
1357 | 1366 | Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
1358 | 1367 | Property { name: "width"; revision: 1; type: "double" } |
|
1359 | 1368 | Property { name: "style"; revision: 1; type: "Qt::PenStyle" } |
|
1360 | 1369 | Property { name: "capStyle"; revision: 1; type: "Qt::PenCapStyle" } |
|
1361 | 1370 | Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1362 | 1371 | Signal { |
|
1363 | 1372 | name: "countChanged" |
|
1364 | 1373 | Parameter { name: "count"; type: "int" } |
|
1365 | 1374 | } |
|
1366 | 1375 | Signal { |
|
1367 | 1376 | name: "axisXChanged" |
|
1368 | 1377 | revision: 1 |
|
1369 | 1378 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1370 | 1379 | } |
|
1371 | 1380 | Signal { |
|
1372 | 1381 | name: "axisYChanged" |
|
1373 | 1382 | revision: 1 |
|
1374 | 1383 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1375 | 1384 | } |
|
1376 | 1385 | Signal { |
|
1377 | 1386 | name: "axisXTopChanged" |
|
1378 | 1387 | revision: 2 |
|
1379 | 1388 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1380 | 1389 | } |
|
1381 | 1390 | Signal { |
|
1382 | 1391 | name: "axisYRightChanged" |
|
1383 | 1392 | revision: 2 |
|
1384 | 1393 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1385 | 1394 | } |
|
1386 | 1395 | Signal { |
|
1387 | 1396 | name: "axisAngularChanged" |
|
1388 | 1397 | revision: 3 |
|
1389 | 1398 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1390 | 1399 | } |
|
1391 | 1400 | Signal { |
|
1392 | 1401 | name: "axisRadialChanged" |
|
1393 | 1402 | revision: 3 |
|
1394 | 1403 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1395 | 1404 | } |
|
1396 | 1405 | Signal { |
|
1397 | 1406 | name: "widthChanged" |
|
1398 | 1407 | revision: 1 |
|
1399 | 1408 | Parameter { name: "width"; type: "double" } |
|
1400 | 1409 | } |
|
1401 | 1410 | Signal { |
|
1402 | 1411 | name: "styleChanged" |
|
1403 | 1412 | revision: 1 |
|
1404 | 1413 | Parameter { name: "style"; type: "Qt::PenStyle" } |
|
1405 | 1414 | } |
|
1406 | 1415 | Signal { |
|
1407 | 1416 | name: "capStyleChanged" |
|
1408 | 1417 | revision: 1 |
|
1409 | 1418 | Parameter { name: "capStyle"; type: "Qt::PenCapStyle" } |
|
1410 | 1419 | } |
|
1411 | 1420 | Method { |
|
1412 | 1421 | name: "appendDeclarativeChildren" |
|
1413 | 1422 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1414 | 1423 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1415 | 1424 | } |
|
1416 | 1425 | Method { |
|
1417 | 1426 | name: "handleCountChanged" |
|
1418 | 1427 | Parameter { name: "index"; type: "int" } |
|
1419 | 1428 | } |
|
1420 | 1429 | Method { |
|
1421 | 1430 | name: "append" |
|
1422 | 1431 | Parameter { name: "x"; type: "double" } |
|
1423 | 1432 | Parameter { name: "y"; type: "double" } |
|
1424 | 1433 | } |
|
1425 | 1434 | Method { |
|
1426 | 1435 | name: "replace" |
|
1427 | 1436 | Parameter { name: "oldX"; type: "double" } |
|
1428 | 1437 | Parameter { name: "oldY"; type: "double" } |
|
1429 | 1438 | Parameter { name: "newX"; type: "double" } |
|
1430 | 1439 | Parameter { name: "newY"; type: "double" } |
|
1431 | 1440 | } |
|
1432 | 1441 | Method { |
|
1433 | 1442 | name: "replace" |
|
1434 | 1443 | revision: 3 |
|
1435 | 1444 | Parameter { name: "index"; type: "int" } |
|
1436 | 1445 | Parameter { name: "newX"; type: "double" } |
|
1437 | 1446 | Parameter { name: "newY"; type: "double" } |
|
1438 | 1447 | } |
|
1439 | 1448 | Method { |
|
1440 | 1449 | name: "remove" |
|
1441 | 1450 | Parameter { name: "x"; type: "double" } |
|
1442 | 1451 | Parameter { name: "y"; type: "double" } |
|
1443 | 1452 | } |
|
1444 | 1453 | Method { |
|
1445 | 1454 | name: "remove" |
|
1446 | 1455 | revision: 3 |
|
1447 | 1456 | Parameter { name: "index"; type: "int" } |
|
1448 | 1457 | } |
|
1449 | 1458 | Method { |
|
1450 | 1459 | name: "insert" |
|
1451 | 1460 | Parameter { name: "index"; type: "int" } |
|
1452 | 1461 | Parameter { name: "x"; type: "double" } |
|
1453 | 1462 | Parameter { name: "y"; type: "double" } |
|
1454 | 1463 | } |
|
1455 | 1464 | Method { name: "clear" } |
|
1456 | 1465 | Method { |
|
1457 | 1466 | name: "at" |
|
1458 | 1467 | type: "QPointF" |
|
1459 | 1468 | Parameter { name: "index"; type: "int" } |
|
1460 | 1469 | } |
|
1461 | 1470 | } |
|
1462 | 1471 | Component { |
|
1463 | 1472 | name: "QtCharts::DeclarativeMargins" |
|
1464 | 1473 | prototype: "QObject" |
|
1465 | 1474 | exports: ["QtCharts/Margins 1.1", "QtCharts/Margins 2.0"] |
|
1466 | 1475 | isCreatable: false |
|
1467 | 1476 | exportMetaObjectRevisions: [0, 0] |
|
1468 | 1477 | Property { name: "top"; type: "int" } |
|
1469 | 1478 | Property { name: "bottom"; type: "int" } |
|
1470 | 1479 | Property { name: "left"; type: "int" } |
|
1471 | 1480 | Property { name: "right"; type: "int" } |
|
1472 | 1481 | Signal { |
|
1473 | 1482 | name: "topChanged" |
|
1474 | 1483 | Parameter { name: "top"; type: "int" } |
|
1475 | 1484 | Parameter { name: "bottom"; type: "int" } |
|
1476 | 1485 | Parameter { name: "left"; type: "int" } |
|
1477 | 1486 | Parameter { name: "right"; type: "int" } |
|
1478 | 1487 | } |
|
1479 | 1488 | Signal { |
|
1480 | 1489 | name: "bottomChanged" |
|
1481 | 1490 | Parameter { name: "top"; type: "int" } |
|
1482 | 1491 | Parameter { name: "bottom"; type: "int" } |
|
1483 | 1492 | Parameter { name: "left"; type: "int" } |
|
1484 | 1493 | Parameter { name: "right"; type: "int" } |
|
1485 | 1494 | } |
|
1486 | 1495 | Signal { |
|
1487 | 1496 | name: "leftChanged" |
|
1488 | 1497 | Parameter { name: "top"; type: "int" } |
|
1489 | 1498 | Parameter { name: "bottom"; type: "int" } |
|
1490 | 1499 | Parameter { name: "left"; type: "int" } |
|
1491 | 1500 | Parameter { name: "right"; type: "int" } |
|
1492 | 1501 | } |
|
1493 | 1502 | Signal { |
|
1494 | 1503 | name: "rightChanged" |
|
1495 | 1504 | Parameter { name: "top"; type: "int" } |
|
1496 | 1505 | Parameter { name: "bottom"; type: "int" } |
|
1497 | 1506 | Parameter { name: "left"; type: "int" } |
|
1498 | 1507 | Parameter { name: "right"; type: "int" } |
|
1499 | 1508 | } |
|
1500 | 1509 | } |
|
1501 | 1510 | Component { |
|
1502 | 1511 | name: "QtCharts::DeclarativePercentBarSeries" |
|
1503 | 1512 | defaultProperty: "seriesChildren" |
|
1504 | 1513 | prototype: "QtCharts::QPercentBarSeries" |
|
1505 | 1514 | exports: [ |
|
1506 | 1515 | "QtCharts/PercentBarSeries 1.0", |
|
1507 | 1516 | "QtCharts/PercentBarSeries 1.1", |
|
1508 | 1517 | "QtCharts/PercentBarSeries 1.2", |
|
1509 | 1518 | "QtCharts/PercentBarSeries 2.0" |
|
1510 | 1519 | ] |
|
1511 | 1520 | exportMetaObjectRevisions: [0, 1, 2, 2] |
|
1512 | 1521 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1513 | 1522 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1514 | 1523 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1515 | 1524 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1516 | 1525 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1517 | 1526 | Signal { |
|
1518 | 1527 | name: "axisXChanged" |
|
1519 | 1528 | revision: 1 |
|
1520 | 1529 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1521 | 1530 | } |
|
1522 | 1531 | Signal { |
|
1523 | 1532 | name: "axisYChanged" |
|
1524 | 1533 | revision: 1 |
|
1525 | 1534 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1526 | 1535 | } |
|
1527 | 1536 | Signal { |
|
1528 | 1537 | name: "axisXTopChanged" |
|
1529 | 1538 | revision: 2 |
|
1530 | 1539 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1531 | 1540 | } |
|
1532 | 1541 | Signal { |
|
1533 | 1542 | name: "axisYRightChanged" |
|
1534 | 1543 | revision: 2 |
|
1535 | 1544 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1536 | 1545 | } |
|
1537 | 1546 | Method { |
|
1538 | 1547 | name: "appendSeriesChildren" |
|
1539 | 1548 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1540 | 1549 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1541 | 1550 | } |
|
1542 | 1551 | Method { |
|
1543 | 1552 | name: "at" |
|
1544 | 1553 | type: "DeclarativeBarSet*" |
|
1545 | 1554 | Parameter { name: "index"; type: "int" } |
|
1546 | 1555 | } |
|
1547 | 1556 | Method { |
|
1548 | 1557 | name: "append" |
|
1549 | 1558 | type: "DeclarativeBarSet*" |
|
1550 | 1559 | Parameter { name: "label"; type: "string" } |
|
1551 | 1560 | Parameter { name: "values"; type: "QVariantList" } |
|
1552 | 1561 | } |
|
1553 | 1562 | Method { |
|
1554 | 1563 | name: "insert" |
|
1555 | 1564 | type: "DeclarativeBarSet*" |
|
1556 | 1565 | Parameter { name: "index"; type: "int" } |
|
1557 | 1566 | Parameter { name: "label"; type: "string" } |
|
1558 | 1567 | Parameter { name: "values"; type: "QVariantList" } |
|
1559 | 1568 | } |
|
1560 | 1569 | Method { |
|
1561 | 1570 | name: "remove" |
|
1562 | 1571 | type: "bool" |
|
1563 | 1572 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
1564 | 1573 | } |
|
1565 | 1574 | Method { name: "clear" } |
|
1566 | 1575 | } |
|
1567 | 1576 | Component { |
|
1568 | 1577 | name: "QtCharts::DeclarativePieSeries" |
|
1569 | 1578 | defaultProperty: "seriesChildren" |
|
1570 | 1579 | prototype: "QtCharts::QPieSeries" |
|
1571 | 1580 | exports: [ |
|
1572 | 1581 | "QtCharts/PieSeries 1.0", |
|
1573 | 1582 | "QtCharts/PieSeries 1.1", |
|
1574 | 1583 | "QtCharts/PieSeries 2.0" |
|
1575 | 1584 | ] |
|
1576 | 1585 | exportMetaObjectRevisions: [0, 0, 0] |
|
1577 | 1586 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1578 | 1587 | Signal { |
|
1579 | 1588 | name: "sliceAdded" |
|
1580 | 1589 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
1581 | 1590 | } |
|
1582 | 1591 | Signal { |
|
1583 | 1592 | name: "sliceRemoved" |
|
1584 | 1593 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
1585 | 1594 | } |
|
1586 | 1595 | Method { |
|
1587 | 1596 | name: "appendSeriesChildren" |
|
1588 | 1597 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1589 | 1598 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1590 | 1599 | } |
|
1591 | 1600 | Method { |
|
1592 | 1601 | name: "handleAdded" |
|
1593 | 1602 | Parameter { name: "slices"; type: "QList<QPieSlice*>" } |
|
1594 | 1603 | } |
|
1595 | 1604 | Method { |
|
1596 | 1605 | name: "handleRemoved" |
|
1597 | 1606 | Parameter { name: "slices"; type: "QList<QPieSlice*>" } |
|
1598 | 1607 | } |
|
1599 | 1608 | Method { |
|
1600 | 1609 | name: "at" |
|
1601 | 1610 | type: "QPieSlice*" |
|
1602 | 1611 | Parameter { name: "index"; type: "int" } |
|
1603 | 1612 | } |
|
1604 | 1613 | Method { |
|
1605 | 1614 | name: "find" |
|
1606 | 1615 | type: "QPieSlice*" |
|
1607 | 1616 | Parameter { name: "label"; type: "string" } |
|
1608 | 1617 | } |
|
1609 | 1618 | Method { |
|
1610 | 1619 | name: "append" |
|
1611 | 1620 | type: "DeclarativePieSlice*" |
|
1612 | 1621 | Parameter { name: "label"; type: "string" } |
|
1613 | 1622 | Parameter { name: "value"; type: "double" } |
|
1614 | 1623 | } |
|
1615 | 1624 | Method { |
|
1616 | 1625 | name: "remove" |
|
1617 | 1626 | type: "bool" |
|
1618 | 1627 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
1619 | 1628 | } |
|
1620 | 1629 | Method { name: "clear" } |
|
1621 | 1630 | } |
|
1622 | 1631 | Component { |
|
1623 | 1632 | name: "QtCharts::DeclarativePieSlice" |
|
1624 | 1633 | prototype: "QtCharts::QPieSlice" |
|
1625 | 1634 | exports: ["QtCharts/PieSlice 1.4", "QtCharts/PieSlice 2.0"] |
|
1626 | 1635 | exportMetaObjectRevisions: [0, 0] |
|
1627 | 1636 | Property { name: "brushFilename"; type: "string" } |
|
1628 | 1637 | Signal { |
|
1629 | 1638 | name: "brushFilenameChanged" |
|
1630 | 1639 | Parameter { name: "brushFilename"; type: "string" } |
|
1631 | 1640 | } |
|
1632 | 1641 | } |
|
1633 | 1642 | Component { |
|
1634 | 1643 | name: "QtCharts::DeclarativePolarChart" |
|
1635 | 1644 | defaultProperty: "data" |
|
1636 | 1645 | prototype: "QtCharts::DeclarativeChart" |
|
1637 | 1646 | exports: [ |
|
1638 | 1647 | "QtCharts/PolarChartView 1.3", |
|
1639 | 1648 | "QtCharts/PolarChartView 2.0" |
|
1640 | 1649 | ] |
|
1641 | 1650 | exportMetaObjectRevisions: [1, 1] |
|
1642 | 1651 | } |
|
1643 | 1652 | Component { |
|
1644 | 1653 | name: "QtCharts::DeclarativeScatterSeries" |
|
1645 | 1654 | defaultProperty: "declarativeChildren" |
|
1646 | 1655 | prototype: "QtCharts::QScatterSeries" |
|
1647 | 1656 | exports: [ |
|
1648 | 1657 | "QtCharts/ScatterSeries 1.0", |
|
1649 | 1658 | "QtCharts/ScatterSeries 1.1", |
|
1650 | 1659 | "QtCharts/ScatterSeries 1.2", |
|
1651 | 1660 | "QtCharts/ScatterSeries 1.3", |
|
1652 | 1661 | "QtCharts/ScatterSeries 1.4", |
|
1653 | 1662 | "QtCharts/ScatterSeries 2.0" |
|
1654 | 1663 | ] |
|
1655 | 1664 | exportMetaObjectRevisions: [0, 1, 2, 3, 4, 4] |
|
1656 | 1665 | Property { name: "count"; type: "int"; isReadonly: true } |
|
1657 | 1666 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1658 | 1667 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1659 | 1668 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1660 | 1669 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1661 | 1670 | Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
1662 | 1671 | Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
1663 | 1672 | Property { name: "borderWidth"; revision: 1; type: "double" } |
|
1664 | 1673 | Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1665 | 1674 | Property { name: "brushFilename"; revision: 4; type: "string" } |
|
1666 | 1675 | Property { name: "brush"; revision: 4; type: "QBrush" } |
|
1667 | 1676 | Signal { |
|
1668 | 1677 | name: "countChanged" |
|
1669 | 1678 | Parameter { name: "count"; type: "int" } |
|
1670 | 1679 | } |
|
1671 | 1680 | Signal { |
|
1672 | 1681 | name: "axisXChanged" |
|
1673 | 1682 | revision: 1 |
|
1674 | 1683 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1675 | 1684 | } |
|
1676 | 1685 | Signal { |
|
1677 | 1686 | name: "axisYChanged" |
|
1678 | 1687 | revision: 1 |
|
1679 | 1688 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1680 | 1689 | } |
|
1681 | 1690 | Signal { |
|
1682 | 1691 | name: "borderWidthChanged" |
|
1683 | 1692 | revision: 1 |
|
1684 | 1693 | Parameter { name: "width"; type: "double" } |
|
1685 | 1694 | } |
|
1686 | 1695 | Signal { |
|
1687 | 1696 | name: "axisXTopChanged" |
|
1688 | 1697 | revision: 2 |
|
1689 | 1698 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1690 | 1699 | } |
|
1691 | 1700 | Signal { |
|
1692 | 1701 | name: "axisYRightChanged" |
|
1693 | 1702 | revision: 2 |
|
1694 | 1703 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1695 | 1704 | } |
|
1696 | 1705 | Signal { |
|
1697 | 1706 | name: "axisAngularChanged" |
|
1698 | 1707 | revision: 3 |
|
1699 | 1708 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1700 | 1709 | } |
|
1701 | 1710 | Signal { |
|
1702 | 1711 | name: "axisRadialChanged" |
|
1703 | 1712 | revision: 3 |
|
1704 | 1713 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1705 | 1714 | } |
|
1706 | 1715 | Signal { |
|
1707 | 1716 | name: "brushFilenameChanged" |
|
1708 | 1717 | revision: 4 |
|
1709 | 1718 | Parameter { name: "brushFilename"; type: "string" } |
|
1710 | 1719 | } |
|
1711 | 1720 | Signal { name: "brushChanged"; revision: 4 } |
|
1712 | 1721 | Method { |
|
1713 | 1722 | name: "appendDeclarativeChildren" |
|
1714 | 1723 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1715 | 1724 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1716 | 1725 | } |
|
1717 | 1726 | Method { |
|
1718 | 1727 | name: "handleCountChanged" |
|
1719 | 1728 | Parameter { name: "index"; type: "int" } |
|
1720 | 1729 | } |
|
1721 | 1730 | Method { |
|
1722 | 1731 | name: "append" |
|
1723 | 1732 | Parameter { name: "x"; type: "double" } |
|
1724 | 1733 | Parameter { name: "y"; type: "double" } |
|
1725 | 1734 | } |
|
1726 | 1735 | Method { |
|
1727 | 1736 | name: "replace" |
|
1728 | 1737 | Parameter { name: "oldX"; type: "double" } |
|
1729 | 1738 | Parameter { name: "oldY"; type: "double" } |
|
1730 | 1739 | Parameter { name: "newX"; type: "double" } |
|
1731 | 1740 | Parameter { name: "newY"; type: "double" } |
|
1732 | 1741 | } |
|
1733 | 1742 | Method { |
|
1734 | 1743 | name: "replace" |
|
1735 | 1744 | revision: 3 |
|
1736 | 1745 | Parameter { name: "index"; type: "int" } |
|
1737 | 1746 | Parameter { name: "newX"; type: "double" } |
|
1738 | 1747 | Parameter { name: "newY"; type: "double" } |
|
1739 | 1748 | } |
|
1740 | 1749 | Method { |
|
1741 | 1750 | name: "remove" |
|
1742 | 1751 | Parameter { name: "x"; type: "double" } |
|
1743 | 1752 | Parameter { name: "y"; type: "double" } |
|
1744 | 1753 | } |
|
1745 | 1754 | Method { |
|
1746 | 1755 | name: "remove" |
|
1747 | 1756 | revision: 3 |
|
1748 | 1757 | Parameter { name: "index"; type: "int" } |
|
1749 | 1758 | } |
|
1750 | 1759 | Method { |
|
1751 | 1760 | name: "insert" |
|
1752 | 1761 | Parameter { name: "index"; type: "int" } |
|
1753 | 1762 | Parameter { name: "x"; type: "double" } |
|
1754 | 1763 | Parameter { name: "y"; type: "double" } |
|
1755 | 1764 | } |
|
1756 | 1765 | Method { name: "clear" } |
|
1757 | 1766 | Method { |
|
1758 | 1767 | name: "at" |
|
1759 | 1768 | type: "QPointF" |
|
1760 | 1769 | Parameter { name: "index"; type: "int" } |
|
1761 | 1770 | } |
|
1762 | 1771 | } |
|
1763 | 1772 | Component { |
|
1764 | 1773 | name: "QtCharts::DeclarativeSplineSeries" |
|
1765 | 1774 | defaultProperty: "declarativeChildren" |
|
1766 | 1775 | prototype: "QtCharts::QSplineSeries" |
|
1767 | 1776 | exports: [ |
|
1768 | 1777 | "QtCharts/SplineSeries 1.0", |
|
1769 | 1778 | "QtCharts/SplineSeries 1.1", |
|
1770 | 1779 | "QtCharts/SplineSeries 1.2", |
|
1771 | 1780 | "QtCharts/SplineSeries 1.3", |
|
1772 | 1781 | "QtCharts/SplineSeries 2.0" |
|
1773 | 1782 | ] |
|
1774 | 1783 | exportMetaObjectRevisions: [0, 1, 2, 3, 3] |
|
1775 | 1784 | Property { name: "count"; type: "int"; isReadonly: true } |
|
1776 | 1785 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1777 | 1786 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1778 | 1787 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1779 | 1788 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1780 | 1789 | Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
1781 | 1790 | Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true } |
|
1782 | 1791 | Property { name: "width"; revision: 1; type: "double" } |
|
1783 | 1792 | Property { name: "style"; revision: 1; type: "Qt::PenStyle" } |
|
1784 | 1793 | Property { name: "capStyle"; revision: 1; type: "Qt::PenCapStyle" } |
|
1785 | 1794 | Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1786 | 1795 | Signal { |
|
1787 | 1796 | name: "countChanged" |
|
1788 | 1797 | Parameter { name: "count"; type: "int" } |
|
1789 | 1798 | } |
|
1790 | 1799 | Signal { |
|
1791 | 1800 | name: "axisXChanged" |
|
1792 | 1801 | revision: 1 |
|
1793 | 1802 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1794 | 1803 | } |
|
1795 | 1804 | Signal { |
|
1796 | 1805 | name: "axisYChanged" |
|
1797 | 1806 | revision: 1 |
|
1798 | 1807 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1799 | 1808 | } |
|
1800 | 1809 | Signal { |
|
1801 | 1810 | name: "axisXTopChanged" |
|
1802 | 1811 | revision: 2 |
|
1803 | 1812 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1804 | 1813 | } |
|
1805 | 1814 | Signal { |
|
1806 | 1815 | name: "axisYRightChanged" |
|
1807 | 1816 | revision: 2 |
|
1808 | 1817 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1809 | 1818 | } |
|
1810 | 1819 | Signal { |
|
1811 | 1820 | name: "axisAngularChanged" |
|
1812 | 1821 | revision: 3 |
|
1813 | 1822 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1814 | 1823 | } |
|
1815 | 1824 | Signal { |
|
1816 | 1825 | name: "axisRadialChanged" |
|
1817 | 1826 | revision: 3 |
|
1818 | 1827 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1819 | 1828 | } |
|
1820 | 1829 | Signal { |
|
1821 | 1830 | name: "widthChanged" |
|
1822 | 1831 | revision: 1 |
|
1823 | 1832 | Parameter { name: "width"; type: "double" } |
|
1824 | 1833 | } |
|
1825 | 1834 | Signal { |
|
1826 | 1835 | name: "styleChanged" |
|
1827 | 1836 | revision: 1 |
|
1828 | 1837 | Parameter { name: "style"; type: "Qt::PenStyle" } |
|
1829 | 1838 | } |
|
1830 | 1839 | Signal { |
|
1831 | 1840 | name: "capStyleChanged" |
|
1832 | 1841 | revision: 1 |
|
1833 | 1842 | Parameter { name: "capStyle"; type: "Qt::PenCapStyle" } |
|
1834 | 1843 | } |
|
1835 | 1844 | Method { |
|
1836 | 1845 | name: "appendDeclarativeChildren" |
|
1837 | 1846 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1838 | 1847 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1839 | 1848 | } |
|
1840 | 1849 | Method { |
|
1841 | 1850 | name: "handleCountChanged" |
|
1842 | 1851 | Parameter { name: "index"; type: "int" } |
|
1843 | 1852 | } |
|
1844 | 1853 | Method { |
|
1845 | 1854 | name: "append" |
|
1846 | 1855 | Parameter { name: "x"; type: "double" } |
|
1847 | 1856 | Parameter { name: "y"; type: "double" } |
|
1848 | 1857 | } |
|
1849 | 1858 | Method { |
|
1850 | 1859 | name: "replace" |
|
1851 | 1860 | Parameter { name: "oldX"; type: "double" } |
|
1852 | 1861 | Parameter { name: "oldY"; type: "double" } |
|
1853 | 1862 | Parameter { name: "newX"; type: "double" } |
|
1854 | 1863 | Parameter { name: "newY"; type: "double" } |
|
1855 | 1864 | } |
|
1856 | 1865 | Method { |
|
1857 | 1866 | name: "replace" |
|
1858 | 1867 | revision: 3 |
|
1859 | 1868 | Parameter { name: "index"; type: "int" } |
|
1860 | 1869 | Parameter { name: "newX"; type: "double" } |
|
1861 | 1870 | Parameter { name: "newY"; type: "double" } |
|
1862 | 1871 | } |
|
1863 | 1872 | Method { |
|
1864 | 1873 | name: "remove" |
|
1865 | 1874 | Parameter { name: "x"; type: "double" } |
|
1866 | 1875 | Parameter { name: "y"; type: "double" } |
|
1867 | 1876 | } |
|
1868 | 1877 | Method { |
|
1869 | 1878 | name: "remove" |
|
1870 | 1879 | revision: 3 |
|
1871 | 1880 | Parameter { name: "index"; type: "int" } |
|
1872 | 1881 | } |
|
1873 | 1882 | Method { |
|
1874 | 1883 | name: "insert" |
|
1875 | 1884 | Parameter { name: "index"; type: "int" } |
|
1876 | 1885 | Parameter { name: "x"; type: "double" } |
|
1877 | 1886 | Parameter { name: "y"; type: "double" } |
|
1878 | 1887 | } |
|
1879 | 1888 | Method { name: "clear" } |
|
1880 | 1889 | Method { |
|
1881 | 1890 | name: "at" |
|
1882 | 1891 | type: "QPointF" |
|
1883 | 1892 | Parameter { name: "index"; type: "int" } |
|
1884 | 1893 | } |
|
1885 | 1894 | } |
|
1886 | 1895 | Component { |
|
1887 | 1896 | name: "QtCharts::DeclarativeStackedBarSeries" |
|
1888 | 1897 | defaultProperty: "seriesChildren" |
|
1889 | 1898 | prototype: "QtCharts::QStackedBarSeries" |
|
1890 | 1899 | exports: [ |
|
1891 | 1900 | "QtCharts/StackedBarSeries 1.0", |
|
1892 | 1901 | "QtCharts/StackedBarSeries 1.1", |
|
1893 | 1902 | "QtCharts/StackedBarSeries 1.2", |
|
1894 | 1903 | "QtCharts/StackedBarSeries 2.0" |
|
1895 | 1904 | ] |
|
1896 | 1905 | exportMetaObjectRevisions: [0, 1, 2, 2] |
|
1897 | 1906 | Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1898 | 1907 | Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true } |
|
1899 | 1908 | Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1900 | 1909 | Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true } |
|
1901 | 1910 | Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true } |
|
1902 | 1911 | Signal { |
|
1903 | 1912 | name: "axisXChanged" |
|
1904 | 1913 | revision: 1 |
|
1905 | 1914 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1906 | 1915 | } |
|
1907 | 1916 | Signal { |
|
1908 | 1917 | name: "axisYChanged" |
|
1909 | 1918 | revision: 1 |
|
1910 | 1919 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1911 | 1920 | } |
|
1912 | 1921 | Signal { |
|
1913 | 1922 | name: "axisXTopChanged" |
|
1914 | 1923 | revision: 2 |
|
1915 | 1924 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1916 | 1925 | } |
|
1917 | 1926 | Signal { |
|
1918 | 1927 | name: "axisYRightChanged" |
|
1919 | 1928 | revision: 2 |
|
1920 | 1929 | Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } |
|
1921 | 1930 | } |
|
1922 | 1931 | Method { |
|
1923 | 1932 | name: "appendSeriesChildren" |
|
1924 | 1933 | Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true } |
|
1925 | 1934 | Parameter { name: "element"; type: "QObject"; isPointer: true } |
|
1926 | 1935 | } |
|
1927 | 1936 | Method { |
|
1928 | 1937 | name: "at" |
|
1929 | 1938 | type: "DeclarativeBarSet*" |
|
1930 | 1939 | Parameter { name: "index"; type: "int" } |
|
1931 | 1940 | } |
|
1932 | 1941 | Method { |
|
1933 | 1942 | name: "append" |
|
1934 | 1943 | type: "DeclarativeBarSet*" |
|
1935 | 1944 | Parameter { name: "label"; type: "string" } |
|
1936 | 1945 | Parameter { name: "values"; type: "QVariantList" } |
|
1937 | 1946 | } |
|
1938 | 1947 | Method { |
|
1939 | 1948 | name: "insert" |
|
1940 | 1949 | type: "DeclarativeBarSet*" |
|
1941 | 1950 | Parameter { name: "index"; type: "int" } |
|
1942 | 1951 | Parameter { name: "label"; type: "string" } |
|
1943 | 1952 | Parameter { name: "values"; type: "QVariantList" } |
|
1944 | 1953 | } |
|
1945 | 1954 | Method { |
|
1946 | 1955 | name: "remove" |
|
1947 | 1956 | type: "bool" |
|
1948 | 1957 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
1949 | 1958 | } |
|
1950 | 1959 | Method { name: "clear" } |
|
1951 | 1960 | } |
|
1952 | 1961 | Component { |
|
1953 | 1962 | name: "QtCharts::DeclarativeXYPoint" |
|
1954 | 1963 | prototype: "QObject" |
|
1955 | 1964 | exports: ["QtCharts/XYPoint 1.0", "QtCharts/XYPoint 2.0"] |
|
1956 | 1965 | exportMetaObjectRevisions: [0, 0] |
|
1957 | 1966 | Property { name: "x"; type: "double" } |
|
1958 | 1967 | Property { name: "y"; type: "double" } |
|
1959 | 1968 | } |
|
1960 | 1969 | Component { |
|
1961 | 1970 | name: "QtCharts::LegendScroller" |
|
1962 | 1971 | defaultProperty: "children" |
|
1963 | 1972 | prototype: "QtCharts::QLegend" |
|
1964 | 1973 | } |
|
1965 | 1974 | Component { |
|
1966 | 1975 | name: "QtCharts::QAbstractAxis" |
|
1967 | 1976 | prototype: "QObject" |
|
1968 | 1977 | exports: [ |
|
1969 | 1978 | "QtCharts/AbstractAxis 1.0", |
|
1970 | 1979 | "QtCharts/AbstractAxis 2.0", |
|
1971 | 1980 | "QtCharts/AbstractAxis 2.1" |
|
1972 | 1981 | ] |
|
1973 | 1982 | isCreatable: false |
|
1974 | 1983 | exportMetaObjectRevisions: [0, 0, 0] |
|
1975 | 1984 | Property { name: "visible"; type: "bool" } |
|
1976 | 1985 | Property { name: "lineVisible"; type: "bool" } |
|
1977 | 1986 | Property { name: "linePen"; type: "QPen" } |
|
1978 | 1987 | Property { name: "color"; type: "QColor" } |
|
1979 | 1988 | Property { name: "labelsVisible"; type: "bool" } |
|
1980 | 1989 | Property { name: "labelsBrush"; type: "QBrush" } |
|
1981 | 1990 | Property { name: "labelsAngle"; type: "int" } |
|
1982 | 1991 | Property { name: "labelsFont"; type: "QFont" } |
|
1983 | 1992 | Property { name: "labelsColor"; type: "QColor" } |
|
1984 | 1993 | Property { name: "gridVisible"; type: "bool" } |
|
1985 | 1994 | Property { name: "gridLinePen"; type: "QPen" } |
|
1986 | 1995 | Property { name: "shadesVisible"; type: "bool" } |
|
1987 | 1996 | Property { name: "shadesColor"; type: "QColor" } |
|
1988 | 1997 | Property { name: "shadesBorderColor"; type: "QColor" } |
|
1989 | 1998 | Property { name: "shadesPen"; type: "QPen" } |
|
1990 | 1999 | Property { name: "shadesBrush"; type: "QBrush" } |
|
1991 | 2000 | Property { name: "titleText"; type: "string" } |
|
1992 | 2001 | Property { name: "titleBrush"; type: "QBrush" } |
|
1993 | 2002 | Property { name: "titleVisible"; type: "bool" } |
|
1994 | 2003 | Property { name: "titleFont"; type: "QFont" } |
|
1995 | 2004 | Property { name: "orientation"; type: "Qt::Orientation"; isReadonly: true } |
|
1996 | 2005 | Property { name: "alignment"; type: "Qt::Alignment"; isReadonly: true } |
|
1997 | 2006 | Property { name: "reverse"; type: "bool" } |
|
1998 | 2007 | Signal { |
|
1999 | 2008 | name: "visibleChanged" |
|
2000 | 2009 | Parameter { name: "visible"; type: "bool" } |
|
2001 | 2010 | } |
|
2002 | 2011 | Signal { |
|
2003 | 2012 | name: "linePenChanged" |
|
2004 | 2013 | Parameter { name: "pen"; type: "QPen" } |
|
2005 | 2014 | } |
|
2006 | 2015 | Signal { |
|
2007 | 2016 | name: "lineVisibleChanged" |
|
2008 | 2017 | Parameter { name: "visible"; type: "bool" } |
|
2009 | 2018 | } |
|
2010 | 2019 | Signal { |
|
2011 | 2020 | name: "labelsVisibleChanged" |
|
2012 | 2021 | Parameter { name: "visible"; type: "bool" } |
|
2013 | 2022 | } |
|
2014 | 2023 | Signal { |
|
2015 | 2024 | name: "labelsBrushChanged" |
|
2016 | 2025 | Parameter { name: "brush"; type: "QBrush" } |
|
2017 | 2026 | } |
|
2018 | 2027 | Signal { |
|
2019 | 2028 | name: "labelsFontChanged" |
|
2020 | 2029 | Parameter { name: "pen"; type: "QFont" } |
|
2021 | 2030 | } |
|
2022 | 2031 | Signal { |
|
2023 | 2032 | name: "labelsAngleChanged" |
|
2024 | 2033 | Parameter { name: "angle"; type: "int" } |
|
2025 | 2034 | } |
|
2026 | 2035 | Signal { |
|
2027 | 2036 | name: "gridLinePenChanged" |
|
2028 | 2037 | Parameter { name: "pen"; type: "QPen" } |
|
2029 | 2038 | } |
|
2030 | 2039 | Signal { |
|
2031 | 2040 | name: "gridVisibleChanged" |
|
2032 | 2041 | Parameter { name: "visible"; type: "bool" } |
|
2033 | 2042 | } |
|
2034 | 2043 | Signal { |
|
2035 | 2044 | name: "colorChanged" |
|
2036 | 2045 | Parameter { name: "color"; type: "QColor" } |
|
2037 | 2046 | } |
|
2038 | 2047 | Signal { |
|
2039 | 2048 | name: "labelsColorChanged" |
|
2040 | 2049 | Parameter { name: "color"; type: "QColor" } |
|
2041 | 2050 | } |
|
2042 | 2051 | Signal { |
|
2043 | 2052 | name: "titleTextChanged" |
|
2044 | 2053 | Parameter { name: "title"; type: "string" } |
|
2045 | 2054 | } |
|
2046 | 2055 | Signal { |
|
2047 | 2056 | name: "titleBrushChanged" |
|
2048 | 2057 | Parameter { name: "brush"; type: "QBrush" } |
|
2049 | 2058 | } |
|
2050 | 2059 | Signal { |
|
2051 | 2060 | name: "titleVisibleChanged" |
|
2052 | 2061 | Parameter { name: "visible"; type: "bool" } |
|
2053 | 2062 | } |
|
2054 | 2063 | Signal { |
|
2055 | 2064 | name: "titleFontChanged" |
|
2056 | 2065 | Parameter { name: "font"; type: "QFont" } |
|
2057 | 2066 | } |
|
2058 | 2067 | Signal { |
|
2059 | 2068 | name: "shadesVisibleChanged" |
|
2060 | 2069 | Parameter { name: "visible"; type: "bool" } |
|
2061 | 2070 | } |
|
2062 | 2071 | Signal { |
|
2063 | 2072 | name: "shadesColorChanged" |
|
2064 | 2073 | Parameter { name: "color"; type: "QColor" } |
|
2065 | 2074 | } |
|
2066 | 2075 | Signal { |
|
2067 | 2076 | name: "shadesBorderColorChanged" |
|
2068 | 2077 | Parameter { name: "color"; type: "QColor" } |
|
2069 | 2078 | } |
|
2070 | 2079 | Signal { |
|
2071 | 2080 | name: "shadesPenChanged" |
|
2072 | 2081 | Parameter { name: "pen"; type: "QPen" } |
|
2073 | 2082 | } |
|
2074 | 2083 | Signal { |
|
2075 | 2084 | name: "shadesBrushChanged" |
|
2076 | 2085 | Parameter { name: "brush"; type: "QBrush" } |
|
2077 | 2086 | } |
|
2078 | 2087 | Signal { |
|
2079 | 2088 | name: "reverseChanged" |
|
2080 | 2089 | Parameter { name: "reverse"; type: "bool" } |
|
2081 | 2090 | } |
|
2082 | 2091 | } |
|
2083 | 2092 | Component { |
|
2084 | 2093 | name: "QtCharts::QAbstractBarSeries" |
|
2085 | 2094 | prototype: "QtCharts::QAbstractSeries" |
|
2086 | 2095 | exports: [ |
|
2087 | 2096 | "QtCharts/AbstractBarSeries 1.0", |
|
2088 | 2097 | "QtCharts/AbstractBarSeries 2.0" |
|
2089 | 2098 | ] |
|
2090 | 2099 | isCreatable: false |
|
2091 | 2100 | exportMetaObjectRevisions: [0, 0] |
|
2092 | 2101 | Enum { |
|
2093 | 2102 | name: "LabelsPosition" |
|
2094 | 2103 | values: { |
|
2095 | 2104 | "LabelsCenter": 0, |
|
2096 | 2105 | "LabelsInsideEnd": 1, |
|
2097 | 2106 | "LabelsInsideBase": 2, |
|
2098 | 2107 | "LabelsOutsideEnd": 3 |
|
2099 | 2108 | } |
|
2100 | 2109 | } |
|
2101 | 2110 | Property { name: "barWidth"; type: "double" } |
|
2102 | 2111 | Property { name: "count"; type: "int"; isReadonly: true } |
|
2103 | 2112 | Property { name: "labelsVisible"; type: "bool" } |
|
2104 | 2113 | Property { name: "labelsFormat"; type: "string" } |
|
2105 | 2114 | Property { name: "labelsPosition"; type: "LabelsPosition" } |
|
2106 | 2115 | Signal { |
|
2107 | 2116 | name: "clicked" |
|
2108 | 2117 | Parameter { name: "index"; type: "int" } |
|
2109 | 2118 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
2110 | 2119 | } |
|
2111 | 2120 | Signal { |
|
2112 | 2121 | name: "hovered" |
|
2113 | 2122 | Parameter { name: "status"; type: "bool" } |
|
2114 | 2123 | Parameter { name: "index"; type: "int" } |
|
2115 | 2124 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
2116 | 2125 | } |
|
2117 | 2126 | Signal { |
|
2118 | 2127 | name: "pressed" |
|
2119 | 2128 | Parameter { name: "index"; type: "int" } |
|
2120 | 2129 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
2121 | 2130 | } |
|
2122 | 2131 | Signal { |
|
2123 | 2132 | name: "released" |
|
2124 | 2133 | Parameter { name: "index"; type: "int" } |
|
2125 | 2134 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
2126 | 2135 | } |
|
2127 | 2136 | Signal { |
|
2128 | 2137 | name: "doubleClicked" |
|
2129 | 2138 | Parameter { name: "index"; type: "int" } |
|
2130 | 2139 | Parameter { name: "barset"; type: "QBarSet"; isPointer: true } |
|
2131 | 2140 | } |
|
2132 | 2141 | Signal { |
|
2133 | 2142 | name: "labelsFormatChanged" |
|
2134 | 2143 | Parameter { name: "format"; type: "string" } |
|
2135 | 2144 | } |
|
2136 | 2145 | Signal { |
|
2137 | 2146 | name: "labelsPositionChanged" |
|
2138 | 2147 | Parameter { name: "position"; type: "QAbstractBarSeries::LabelsPosition" } |
|
2139 | 2148 | } |
|
2140 | 2149 | Signal { |
|
2141 | 2150 | name: "barsetsAdded" |
|
2142 | 2151 | Parameter { name: "sets"; type: "QList<QBarSet*>" } |
|
2143 | 2152 | } |
|
2144 | 2153 | Signal { |
|
2145 | 2154 | name: "barsetsRemoved" |
|
2146 | 2155 | Parameter { name: "sets"; type: "QList<QBarSet*>" } |
|
2147 | 2156 | } |
|
2148 | 2157 | } |
|
2149 | 2158 | Component { |
|
2150 | 2159 | name: "QtCharts::QAbstractSeries" |
|
2151 | 2160 | prototype: "QObject" |
|
2152 | 2161 | exports: [ |
|
2153 | 2162 | "QtCharts/AbstractSeries 1.0", |
|
2154 | 2163 | "QtCharts/AbstractSeries 2.0" |
|
2155 | 2164 | ] |
|
2156 | 2165 | isCreatable: false |
|
2157 | 2166 | exportMetaObjectRevisions: [0, 0] |
|
2158 | 2167 | Enum { |
|
2159 | 2168 | name: "SeriesType" |
|
2160 | 2169 | values: { |
|
2161 | 2170 | "SeriesTypeLine": 0, |
|
2162 | 2171 | "SeriesTypeArea": 1, |
|
2163 | 2172 | "SeriesTypeBar": 2, |
|
2164 | 2173 | "SeriesTypeStackedBar": 3, |
|
2165 | 2174 | "SeriesTypePercentBar": 4, |
|
2166 | 2175 | "SeriesTypePie": 5, |
|
2167 | 2176 | "SeriesTypeScatter": 6, |
|
2168 | 2177 | "SeriesTypeSpline": 7, |
|
2169 | 2178 | "SeriesTypeHorizontalBar": 8, |
|
2170 | 2179 | "SeriesTypeHorizontalStackedBar": 9, |
|
2171 | 2180 | "SeriesTypeHorizontalPercentBar": 10, |
|
2172 | 2181 | "SeriesTypeBoxPlot": 11 |
|
2173 | 2182 | } |
|
2174 | 2183 | } |
|
2175 | 2184 | Property { name: "name"; type: "string" } |
|
2176 | 2185 | Property { name: "visible"; type: "bool" } |
|
2177 | 2186 | Property { name: "opacity"; type: "double" } |
|
2178 | 2187 | Property { name: "type"; type: "SeriesType"; isReadonly: true } |
|
2179 | 2188 | } |
|
2180 | 2189 | Component { |
|
2181 | 2190 | name: "QtCharts::QAreaSeries" |
|
2182 | 2191 | prototype: "QtCharts::QAbstractSeries" |
|
2183 | 2192 | Property { name: "upperSeries"; type: "QLineSeries"; isReadonly: true; isPointer: true } |
|
2184 | 2193 | Property { name: "lowerSeries"; type: "QLineSeries"; isReadonly: true; isPointer: true } |
|
2185 | 2194 | Property { name: "color"; type: "QColor" } |
|
2186 | 2195 | Property { name: "borderColor"; type: "QColor" } |
|
2187 | 2196 | Property { name: "pointLabelsFormat"; type: "string" } |
|
2188 | 2197 | Property { name: "pointLabelsVisible"; type: "bool" } |
|
2189 | 2198 | Property { name: "pointLabelsFont"; type: "QFont" } |
|
2190 | 2199 | Property { name: "pointLabelsColor"; type: "QColor" } |
|
2191 | 2200 | Signal { |
|
2192 | 2201 | name: "clicked" |
|
2193 | 2202 | Parameter { name: "point"; type: "QPointF" } |
|
2194 | 2203 | } |
|
2195 | 2204 | Signal { |
|
2196 | 2205 | name: "hovered" |
|
2197 | 2206 | Parameter { name: "point"; type: "QPointF" } |
|
2198 | 2207 | Parameter { name: "state"; type: "bool" } |
|
2199 | 2208 | } |
|
2200 | 2209 | Signal { |
|
2201 | 2210 | name: "pressed" |
|
2202 | 2211 | Parameter { name: "point"; type: "QPointF" } |
|
2203 | 2212 | } |
|
2204 | 2213 | Signal { |
|
2205 | 2214 | name: "released" |
|
2206 | 2215 | Parameter { name: "point"; type: "QPointF" } |
|
2207 | 2216 | } |
|
2208 | 2217 | Signal { |
|
2209 | 2218 | name: "doubleClicked" |
|
2210 | 2219 | Parameter { name: "point"; type: "QPointF" } |
|
2211 | 2220 | } |
|
2212 | 2221 | Signal { name: "selected" } |
|
2213 | 2222 | Signal { |
|
2214 | 2223 | name: "colorChanged" |
|
2215 | 2224 | Parameter { name: "color"; type: "QColor" } |
|
2216 | 2225 | } |
|
2217 | 2226 | Signal { |
|
2218 | 2227 | name: "borderColorChanged" |
|
2219 | 2228 | Parameter { name: "color"; type: "QColor" } |
|
2220 | 2229 | } |
|
2221 | 2230 | Signal { |
|
2222 | 2231 | name: "pointLabelsFormatChanged" |
|
2223 | 2232 | Parameter { name: "format"; type: "string" } |
|
2224 | 2233 | } |
|
2225 | 2234 | Signal { |
|
2226 | 2235 | name: "pointLabelsVisibilityChanged" |
|
2227 | 2236 | Parameter { name: "visible"; type: "bool" } |
|
2228 | 2237 | } |
|
2229 | 2238 | Signal { |
|
2230 | 2239 | name: "pointLabelsFontChanged" |
|
2231 | 2240 | Parameter { name: "font"; type: "QFont" } |
|
2232 | 2241 | } |
|
2233 | 2242 | Signal { |
|
2234 | 2243 | name: "pointLabelsColorChanged" |
|
2235 | 2244 | Parameter { name: "color"; type: "QColor" } |
|
2236 | 2245 | } |
|
2237 | 2246 | } |
|
2238 | 2247 | Component { |
|
2239 | 2248 | name: "QtCharts::QBarCategoryAxis" |
|
2240 | 2249 | prototype: "QtCharts::QAbstractAxis" |
|
2241 | 2250 | exports: [ |
|
2242 | 2251 | "QtCharts/BarCategoriesAxis 1.0", |
|
2243 | 2252 | "QtCharts/BarCategoryAxis 1.1", |
|
2244 | 2253 | "QtCharts/BarCategoryAxis 2.0" |
|
2245 | 2254 | ] |
|
2246 | 2255 | exportMetaObjectRevisions: [0, 0, 0] |
|
2247 | 2256 | Property { name: "categories"; type: "QStringList" } |
|
2248 | 2257 | Property { name: "min"; type: "string" } |
|
2249 | 2258 | Property { name: "max"; type: "string" } |
|
2250 | 2259 | Property { name: "count"; type: "int"; isReadonly: true } |
|
2251 | 2260 | Signal { |
|
2252 | 2261 | name: "minChanged" |
|
2253 | 2262 | Parameter { name: "min"; type: "string" } |
|
2254 | 2263 | } |
|
2255 | 2264 | Signal { |
|
2256 | 2265 | name: "maxChanged" |
|
2257 | 2266 | Parameter { name: "max"; type: "string" } |
|
2258 | 2267 | } |
|
2259 | 2268 | Signal { |
|
2260 | 2269 | name: "rangeChanged" |
|
2261 | 2270 | Parameter { name: "min"; type: "string" } |
|
2262 | 2271 | Parameter { name: "max"; type: "string" } |
|
2263 | 2272 | } |
|
2264 | 2273 | Method { name: "clear" } |
|
2265 | 2274 | } |
|
2266 | 2275 | Component { |
|
2267 | 2276 | name: "QtCharts::QBarModelMapper" |
|
2268 | 2277 | prototype: "QObject" |
|
2269 | 2278 | exports: [ |
|
2270 | 2279 | "QtCharts/BarModelMapper 1.0", |
|
2271 | 2280 | "QtCharts/BarModelMapper 2.0" |
|
2272 | 2281 | ] |
|
2273 | 2282 | isCreatable: false |
|
2274 | 2283 | exportMetaObjectRevisions: [0, 0] |
|
2275 | 2284 | } |
|
2276 | 2285 | Component { name: "QtCharts::QBarSeries"; prototype: "QtCharts::QAbstractBarSeries" } |
|
2277 | 2286 | Component { |
|
2278 | 2287 | name: "QtCharts::QBarSet" |
|
2279 | 2288 | prototype: "QObject" |
|
2280 | 2289 | exports: ["QtCharts/BarSetBase 1.0", "QtCharts/BarSetBase 2.0"] |
|
2281 | 2290 | isCreatable: false |
|
2282 | 2291 | exportMetaObjectRevisions: [0, 0] |
|
2283 | 2292 | Property { name: "label"; type: "string" } |
|
2284 | 2293 | Property { name: "pen"; type: "QPen" } |
|
2285 | 2294 | Property { name: "brush"; type: "QBrush" } |
|
2286 | 2295 | Property { name: "labelBrush"; type: "QBrush" } |
|
2287 | 2296 | Property { name: "labelFont"; type: "QFont" } |
|
2288 | 2297 | Property { name: "color"; type: "QColor" } |
|
2289 | 2298 | Property { name: "borderColor"; type: "QColor" } |
|
2290 | 2299 | Property { name: "labelColor"; type: "QColor" } |
|
2291 | 2300 | Signal { |
|
2292 | 2301 | name: "clicked" |
|
2293 | 2302 | Parameter { name: "index"; type: "int" } |
|
2294 | 2303 | } |
|
2295 | 2304 | Signal { |
|
2296 | 2305 | name: "hovered" |
|
2297 | 2306 | Parameter { name: "status"; type: "bool" } |
|
2298 | 2307 | Parameter { name: "index"; type: "int" } |
|
2299 | 2308 | } |
|
2300 | 2309 | Signal { |
|
2301 | 2310 | name: "pressed" |
|
2302 | 2311 | Parameter { name: "index"; type: "int" } |
|
2303 | 2312 | } |
|
2304 | 2313 | Signal { |
|
2305 | 2314 | name: "released" |
|
2306 | 2315 | Parameter { name: "index"; type: "int" } |
|
2307 | 2316 | } |
|
2308 | 2317 | Signal { |
|
2309 | 2318 | name: "doubleClicked" |
|
2310 | 2319 | Parameter { name: "index"; type: "int" } |
|
2311 | 2320 | } |
|
2312 | 2321 | Signal { |
|
2313 | 2322 | name: "colorChanged" |
|
2314 | 2323 | Parameter { name: "color"; type: "QColor" } |
|
2315 | 2324 | } |
|
2316 | 2325 | Signal { |
|
2317 | 2326 | name: "borderColorChanged" |
|
2318 | 2327 | Parameter { name: "color"; type: "QColor" } |
|
2319 | 2328 | } |
|
2320 | 2329 | Signal { |
|
2321 | 2330 | name: "labelColorChanged" |
|
2322 | 2331 | Parameter { name: "color"; type: "QColor" } |
|
2323 | 2332 | } |
|
2324 | 2333 | Signal { |
|
2325 | 2334 | name: "valuesAdded" |
|
2326 | 2335 | Parameter { name: "index"; type: "int" } |
|
2327 | 2336 | Parameter { name: "count"; type: "int" } |
|
2328 | 2337 | } |
|
2329 | 2338 | Signal { |
|
2330 | 2339 | name: "valuesRemoved" |
|
2331 | 2340 | Parameter { name: "index"; type: "int" } |
|
2332 | 2341 | Parameter { name: "count"; type: "int" } |
|
2333 | 2342 | } |
|
2334 | 2343 | Signal { |
|
2335 | 2344 | name: "valueChanged" |
|
2336 | 2345 | Parameter { name: "index"; type: "int" } |
|
2337 | 2346 | } |
|
2338 | 2347 | } |
|
2339 | 2348 | Component { |
|
2340 | 2349 | name: "QtCharts::QBoxPlotModelMapper" |
|
2341 | 2350 | prototype: "QObject" |
|
2342 | 2351 | exports: ["QtCharts/BoxPlotModelMapper 2.0"] |
|
2343 | 2352 | isCreatable: false |
|
2344 | 2353 | exportMetaObjectRevisions: [0] |
|
2345 | 2354 | } |
|
2346 | 2355 | Component { |
|
2347 | 2356 | name: "QtCharts::QBoxPlotSeries" |
|
2348 | 2357 | prototype: "QtCharts::QAbstractSeries" |
|
2349 | 2358 | Property { name: "boxOutlineVisible"; type: "bool" } |
|
2350 | 2359 | Property { name: "boxWidth"; type: "double" } |
|
2351 | 2360 | Property { name: "pen"; type: "QPen" } |
|
2352 | 2361 | Property { name: "brush"; type: "QBrush" } |
|
2353 | 2362 | Property { name: "count"; revision: 1; type: "int"; isReadonly: true } |
|
2354 | 2363 | Signal { |
|
2355 | 2364 | name: "clicked" |
|
2356 | 2365 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
2357 | 2366 | } |
|
2358 | 2367 | Signal { |
|
2359 | 2368 | name: "hovered" |
|
2360 | 2369 | Parameter { name: "status"; type: "bool" } |
|
2361 | 2370 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
2362 | 2371 | } |
|
2363 | 2372 | Signal { |
|
2364 | 2373 | name: "pressed" |
|
2365 | 2374 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
2366 | 2375 | } |
|
2367 | 2376 | Signal { |
|
2368 | 2377 | name: "released" |
|
2369 | 2378 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
2370 | 2379 | } |
|
2371 | 2380 | Signal { |
|
2372 | 2381 | name: "doubleClicked" |
|
2373 | 2382 | Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true } |
|
2374 | 2383 | } |
|
2375 | 2384 | Signal { name: "boxOutlineVisibilityChanged" } |
|
2376 | 2385 | Signal { |
|
2377 | 2386 | name: "boxsetsAdded" |
|
2378 | 2387 | Parameter { name: "sets"; type: "QList<QBoxSet*>" } |
|
2379 | 2388 | } |
|
2380 | 2389 | Signal { |
|
2381 | 2390 | name: "boxsetsRemoved" |
|
2382 | 2391 | Parameter { name: "sets"; type: "QList<QBoxSet*>" } |
|
2383 | 2392 | } |
|
2384 | 2393 | } |
|
2385 | 2394 | Component { |
|
2386 | 2395 | name: "QtCharts::QBoxSet" |
|
2387 | 2396 | prototype: "QObject" |
|
2388 | 2397 | Property { name: "pen"; type: "QPen" } |
|
2389 | 2398 | Property { name: "brush"; type: "QBrush" } |
|
2390 | 2399 | Signal { name: "clicked" } |
|
2391 | 2400 | Signal { |
|
2392 | 2401 | name: "hovered" |
|
2393 | 2402 | Parameter { name: "status"; type: "bool" } |
|
2394 | 2403 | } |
|
2395 | 2404 | Signal { name: "pressed" } |
|
2396 | 2405 | Signal { name: "released" } |
|
2397 | 2406 | Signal { name: "doubleClicked" } |
|
2398 | 2407 | Signal { name: "valuesChanged" } |
|
2399 | 2408 | Signal { |
|
2400 | 2409 | name: "valueChanged" |
|
2401 | 2410 | Parameter { name: "index"; type: "int" } |
|
2402 | 2411 | } |
|
2403 | 2412 | Signal { name: "cleared" } |
|
2404 | 2413 | } |
|
2405 | 2414 | Component { |
|
2406 | 2415 | name: "QtCharts::QCategoryAxis" |
|
2407 | 2416 | prototype: "QtCharts::QValueAxis" |
|
2408 | 2417 | Enum { |
|
2409 | 2418 | name: "AxisLabelsPosition" |
|
2410 | 2419 | values: { |
|
2411 | 2420 | "AxisLabelsPositionCenter": 0, |
|
2412 | 2421 | "AxisLabelsPositionOnValue": 1 |
|
2413 | 2422 | } |
|
2414 | 2423 | } |
|
2415 | 2424 | Property { name: "startValue"; type: "double" } |
|
2416 | 2425 | Property { name: "count"; type: "int"; isReadonly: true } |
|
2417 | 2426 | Property { name: "categoriesLabels"; type: "QStringList"; isReadonly: true } |
|
2418 | 2427 | Property { name: "labelsPosition"; type: "AxisLabelsPosition" } |
|
2419 | 2428 | Signal { name: "categoriesChanged" } |
|
2420 | 2429 | Signal { |
|
2421 | 2430 | name: "labelsPositionChanged" |
|
2422 | 2431 | Parameter { name: "position"; type: "QCategoryAxis::AxisLabelsPosition" } |
|
2423 | 2432 | } |
|
2424 | 2433 | } |
|
2425 | 2434 | Component { |
|
2426 | 2435 | name: "QtCharts::QDateTimeAxis" |
|
2427 | 2436 | prototype: "QtCharts::QAbstractAxis" |
|
2428 | 2437 | exports: ["QtCharts/DateTimeAxis 1.1", "QtCharts/DateTimeAxis 2.0"] |
|
2429 | 2438 | exportMetaObjectRevisions: [0, 0] |
|
2430 | 2439 | Property { name: "tickCount"; type: "int" } |
|
2431 | 2440 | Property { name: "min"; type: "QDateTime" } |
|
2432 | 2441 | Property { name: "max"; type: "QDateTime" } |
|
2433 | 2442 | Property { name: "format"; type: "string" } |
|
2434 | 2443 | Signal { |
|
2435 | 2444 | name: "minChanged" |
|
2436 | 2445 | Parameter { name: "min"; type: "QDateTime" } |
|
2437 | 2446 | } |
|
2438 | 2447 | Signal { |
|
2439 | 2448 | name: "maxChanged" |
|
2440 | 2449 | Parameter { name: "max"; type: "QDateTime" } |
|
2441 | 2450 | } |
|
2442 | 2451 | Signal { |
|
2443 | 2452 | name: "rangeChanged" |
|
2444 | 2453 | Parameter { name: "min"; type: "QDateTime" } |
|
2445 | 2454 | Parameter { name: "max"; type: "QDateTime" } |
|
2446 | 2455 | } |
|
2447 | 2456 | Signal { |
|
2448 | 2457 | name: "formatChanged" |
|
2449 | 2458 | Parameter { name: "format"; type: "string" } |
|
2450 | 2459 | } |
|
2451 | 2460 | Signal { |
|
2452 | 2461 | name: "tickCountChanged" |
|
2453 | 2462 | Parameter { name: "tick"; type: "int" } |
|
2454 | 2463 | } |
|
2455 | 2464 | } |
|
2456 | 2465 | Component { |
|
2457 | 2466 | name: "QtCharts::QHBarModelMapper" |
|
2458 | 2467 | prototype: "QtCharts::QBarModelMapper" |
|
2459 | 2468 | exports: [ |
|
2460 | 2469 | "QtCharts/HBarModelMapper 1.0", |
|
2461 | 2470 | "QtCharts/HBarModelMapper 2.0" |
|
2462 | 2471 | ] |
|
2463 | 2472 | exportMetaObjectRevisions: [0, 0] |
|
2464 | 2473 | Property { name: "series"; type: "QAbstractBarSeries"; isPointer: true } |
|
2465 | 2474 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2466 | 2475 | Property { name: "firstBarSetRow"; type: "int" } |
|
2467 | 2476 | Property { name: "lastBarSetRow"; type: "int" } |
|
2468 | 2477 | Property { name: "firstColumn"; type: "int" } |
|
2469 | 2478 | Property { name: "columnCount"; type: "int" } |
|
2470 | 2479 | Signal { name: "seriesReplaced" } |
|
2471 | 2480 | Signal { name: "modelReplaced" } |
|
2472 | 2481 | } |
|
2473 | 2482 | Component { |
|
2474 | 2483 | name: "QtCharts::QHPieModelMapper" |
|
2475 | 2484 | prototype: "QtCharts::QPieModelMapper" |
|
2476 | 2485 | exports: [ |
|
2477 | 2486 | "QtCharts/HPieModelMapper 1.0", |
|
2478 | 2487 | "QtCharts/HPieModelMapper 2.0" |
|
2479 | 2488 | ] |
|
2480 | 2489 | exportMetaObjectRevisions: [0, 0] |
|
2481 | 2490 | Property { name: "series"; type: "QPieSeries"; isPointer: true } |
|
2482 | 2491 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2483 | 2492 | Property { name: "valuesRow"; type: "int" } |
|
2484 | 2493 | Property { name: "labelsRow"; type: "int" } |
|
2485 | 2494 | Property { name: "firstColumn"; type: "int" } |
|
2486 | 2495 | Property { name: "columnCount"; type: "int" } |
|
2487 | 2496 | Signal { name: "seriesReplaced" } |
|
2488 | 2497 | Signal { name: "modelReplaced" } |
|
2489 | 2498 | } |
|
2490 | 2499 | Component { |
|
2491 | 2500 | name: "QtCharts::QHXYModelMapper" |
|
2492 | 2501 | prototype: "QtCharts::QXYModelMapper" |
|
2493 | 2502 | exports: [ |
|
2494 | 2503 | "QtCharts/HXYModelMapper 1.0", |
|
2495 | 2504 | "QtCharts/HXYModelMapper 2.0" |
|
2496 | 2505 | ] |
|
2497 | 2506 | exportMetaObjectRevisions: [0, 0] |
|
2498 | 2507 | Property { name: "series"; type: "QXYSeries"; isPointer: true } |
|
2499 | 2508 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2500 | 2509 | Property { name: "xRow"; type: "int" } |
|
2501 | 2510 | Property { name: "yRow"; type: "int" } |
|
2502 | 2511 | Property { name: "firstColumn"; type: "int" } |
|
2503 | 2512 | Property { name: "columnCount"; type: "int" } |
|
2504 | 2513 | Signal { name: "seriesReplaced" } |
|
2505 | 2514 | Signal { name: "modelReplaced" } |
|
2506 | 2515 | } |
|
2507 | 2516 | Component { name: "QtCharts::QHorizontalBarSeries"; prototype: "QtCharts::QAbstractBarSeries" } |
|
2508 | 2517 | Component { |
|
2509 | 2518 | name: "QtCharts::QHorizontalPercentBarSeries" |
|
2510 | 2519 | prototype: "QtCharts::QAbstractBarSeries" |
|
2511 | 2520 | } |
|
2512 | 2521 | Component { |
|
2513 | 2522 | name: "QtCharts::QHorizontalStackedBarSeries" |
|
2514 | 2523 | prototype: "QtCharts::QAbstractBarSeries" |
|
2515 | 2524 | } |
|
2516 | 2525 | Component { |
|
2517 | 2526 | name: "QtCharts::QLegend" |
|
2518 | 2527 | defaultProperty: "children" |
|
2519 | 2528 | prototype: "QGraphicsWidget" |
|
2520 | 2529 | exports: ["QtCharts/Legend 1.0", "QtCharts/Legend 2.0"] |
|
2521 | 2530 | isCreatable: false |
|
2522 | 2531 | exportMetaObjectRevisions: [0, 0] |
|
2523 | 2532 | Property { name: "alignment"; type: "Qt::Alignment" } |
|
2524 | 2533 | Property { name: "backgroundVisible"; type: "bool" } |
|
2525 | 2534 | Property { name: "color"; type: "QColor" } |
|
2526 | 2535 | Property { name: "borderColor"; type: "QColor" } |
|
2527 | 2536 | Property { name: "font"; type: "QFont" } |
|
2528 | 2537 | Property { name: "labelColor"; type: "QColor" } |
|
2529 | 2538 | Property { name: "reverseMarkers"; type: "bool" } |
|
2530 | 2539 | Signal { |
|
2531 | 2540 | name: "backgroundVisibleChanged" |
|
2532 | 2541 | Parameter { name: "visible"; type: "bool" } |
|
2533 | 2542 | } |
|
2534 | 2543 | Signal { |
|
2535 | 2544 | name: "colorChanged" |
|
2536 | 2545 | Parameter { name: "color"; type: "QColor" } |
|
2537 | 2546 | } |
|
2538 | 2547 | Signal { |
|
2539 | 2548 | name: "borderColorChanged" |
|
2540 | 2549 | Parameter { name: "color"; type: "QColor" } |
|
2541 | 2550 | } |
|
2542 | 2551 | Signal { |
|
2543 | 2552 | name: "fontChanged" |
|
2544 | 2553 | Parameter { name: "font"; type: "QFont" } |
|
2545 | 2554 | } |
|
2546 | 2555 | Signal { |
|
2547 | 2556 | name: "labelColorChanged" |
|
2548 | 2557 | Parameter { name: "color"; type: "QColor" } |
|
2549 | 2558 | } |
|
2550 | 2559 | Signal { |
|
2551 | 2560 | name: "reverseMarkersChanged" |
|
2552 | 2561 | Parameter { name: "reverseMarkers"; type: "bool" } |
|
2553 | 2562 | } |
|
2554 | 2563 | } |
|
2555 | 2564 | Component { name: "QtCharts::QLineSeries"; prototype: "QtCharts::QXYSeries" } |
|
2556 | 2565 | Component { |
|
2557 | 2566 | name: "QtCharts::QLogValueAxis" |
|
2558 | 2567 | prototype: "QtCharts::QAbstractAxis" |
|
2559 | 2568 | exports: ["QtCharts/LogValueAxis 1.3", "QtCharts/LogValueAxis 2.0"] |
|
2560 | 2569 | exportMetaObjectRevisions: [0, 1] |
|
2561 | 2570 | Property { name: "min"; type: "double" } |
|
2562 | 2571 | Property { name: "max"; type: "double" } |
|
2563 | 2572 | Property { name: "labelFormat"; type: "string" } |
|
2564 | 2573 | Property { name: "base"; type: "double" } |
|
2565 | 2574 | Signal { |
|
2566 | 2575 | name: "minChanged" |
|
2567 | 2576 | Parameter { name: "min"; type: "double" } |
|
2568 | 2577 | } |
|
2569 | 2578 | Signal { |
|
2570 | 2579 | name: "maxChanged" |
|
2571 | 2580 | Parameter { name: "max"; type: "double" } |
|
2572 | 2581 | } |
|
2573 | 2582 | Signal { |
|
2574 | 2583 | name: "rangeChanged" |
|
2575 | 2584 | Parameter { name: "min"; type: "double" } |
|
2576 | 2585 | Parameter { name: "max"; type: "double" } |
|
2577 | 2586 | } |
|
2578 | 2587 | Signal { |
|
2579 | 2588 | name: "labelFormatChanged" |
|
2580 | 2589 | Parameter { name: "format"; type: "string" } |
|
2581 | 2590 | } |
|
2582 | 2591 | Signal { |
|
2583 | 2592 | name: "baseChanged" |
|
2584 | 2593 | Parameter { name: "base"; type: "double" } |
|
2585 | 2594 | } |
|
2586 | 2595 | } |
|
2587 | 2596 | Component { name: "QtCharts::QPercentBarSeries"; prototype: "QtCharts::QAbstractBarSeries" } |
|
2588 | 2597 | Component { |
|
2589 | 2598 | name: "QtCharts::QPieModelMapper" |
|
2590 | 2599 | prototype: "QObject" |
|
2591 | 2600 | exports: [ |
|
2592 | 2601 | "QtCharts/PieModelMapper 1.0", |
|
2593 | 2602 | "QtCharts/PieModelMapper 2.0" |
|
2594 | 2603 | ] |
|
2595 | 2604 | isCreatable: false |
|
2596 | 2605 | exportMetaObjectRevisions: [0, 0] |
|
2597 | 2606 | } |
|
2598 | 2607 | Component { |
|
2599 | 2608 | name: "QtCharts::QPieSeries" |
|
2600 | 2609 | prototype: "QtCharts::QAbstractSeries" |
|
2601 | 2610 | exports: ["QtCharts/QPieSeries 1.0", "QtCharts/QPieSeries 2.0"] |
|
2602 | 2611 | isCreatable: false |
|
2603 | 2612 | exportMetaObjectRevisions: [0, 0] |
|
2604 | 2613 | Property { name: "horizontalPosition"; type: "double" } |
|
2605 | 2614 | Property { name: "verticalPosition"; type: "double" } |
|
2606 | 2615 | Property { name: "size"; type: "double" } |
|
2607 | 2616 | Property { name: "startAngle"; type: "double" } |
|
2608 | 2617 | Property { name: "endAngle"; type: "double" } |
|
2609 | 2618 | Property { name: "count"; type: "int"; isReadonly: true } |
|
2610 | 2619 | Property { name: "sum"; type: "double"; isReadonly: true } |
|
2611 | 2620 | Property { name: "holeSize"; type: "double" } |
|
2612 | 2621 | Signal { |
|
2613 | 2622 | name: "added" |
|
2614 | 2623 | Parameter { name: "slices"; type: "QList<QPieSlice*>" } |
|
2615 | 2624 | } |
|
2616 | 2625 | Signal { |
|
2617 | 2626 | name: "removed" |
|
2618 | 2627 | Parameter { name: "slices"; type: "QList<QPieSlice*>" } |
|
2619 | 2628 | } |
|
2620 | 2629 | Signal { |
|
2621 | 2630 | name: "clicked" |
|
2622 | 2631 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
2623 | 2632 | } |
|
2624 | 2633 | Signal { |
|
2625 | 2634 | name: "hovered" |
|
2626 | 2635 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
2627 | 2636 | Parameter { name: "state"; type: "bool" } |
|
2628 | 2637 | } |
|
2629 | 2638 | Signal { |
|
2630 | 2639 | name: "pressed" |
|
2631 | 2640 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
2632 | 2641 | } |
|
2633 | 2642 | Signal { |
|
2634 | 2643 | name: "released" |
|
2635 | 2644 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
2636 | 2645 | } |
|
2637 | 2646 | Signal { |
|
2638 | 2647 | name: "doubleClicked" |
|
2639 | 2648 | Parameter { name: "slice"; type: "QPieSlice"; isPointer: true } |
|
2640 | 2649 | } |
|
2641 | 2650 | } |
|
2642 | 2651 | Component { |
|
2643 | 2652 | name: "QtCharts::QPieSlice" |
|
2644 | 2653 | prototype: "QObject" |
|
2645 | 2654 | exports: ["QtCharts/PieSlice 1.0", "QtCharts/PieSlice 2.0"] |
|
2646 | 2655 | exportMetaObjectRevisions: [0, 0] |
|
2647 | 2656 | Enum { |
|
2648 | 2657 | name: "LabelPosition" |
|
2649 | 2658 | values: { |
|
2650 | 2659 | "LabelOutside": 0, |
|
2651 | 2660 | "LabelInsideHorizontal": 1, |
|
2652 | 2661 | "LabelInsideTangential": 2, |
|
2653 | 2662 | "LabelInsideNormal": 3 |
|
2654 | 2663 | } |
|
2655 | 2664 | } |
|
2656 | 2665 | Property { name: "label"; type: "string" } |
|
2657 | 2666 | Property { name: "value"; type: "double" } |
|
2658 | 2667 | Property { name: "labelVisible"; type: "bool" } |
|
2659 | 2668 | Property { name: "labelPosition"; type: "LabelPosition" } |
|
2660 | 2669 | Property { name: "exploded"; type: "bool" } |
|
2661 | 2670 | Property { name: "pen"; type: "QPen" } |
|
2662 | 2671 | Property { name: "borderColor"; type: "QColor" } |
|
2663 | 2672 | Property { name: "borderWidth"; type: "int" } |
|
2664 | 2673 | Property { name: "brush"; type: "QBrush" } |
|
2665 | 2674 | Property { name: "color"; type: "QColor" } |
|
2666 | 2675 | Property { name: "labelBrush"; type: "QBrush" } |
|
2667 | 2676 | Property { name: "labelColor"; type: "QColor" } |
|
2668 | 2677 | Property { name: "labelFont"; type: "QFont" } |
|
2669 | 2678 | Property { name: "labelArmLengthFactor"; type: "double" } |
|
2670 | 2679 | Property { name: "explodeDistanceFactor"; type: "double" } |
|
2671 | 2680 | Property { name: "percentage"; type: "double"; isReadonly: true } |
|
2672 | 2681 | Property { name: "startAngle"; type: "double"; isReadonly: true } |
|
2673 | 2682 | Property { name: "angleSpan"; type: "double"; isReadonly: true } |
|
2674 | 2683 | Signal { name: "clicked" } |
|
2675 | 2684 | Signal { |
|
2676 | 2685 | name: "hovered" |
|
2677 | 2686 | Parameter { name: "state"; type: "bool" } |
|
2678 | 2687 | } |
|
2679 | 2688 | Signal { name: "pressed" } |
|
2680 | 2689 | Signal { name: "released" } |
|
2681 | 2690 | Signal { name: "doubleClicked" } |
|
2682 | 2691 | } |
|
2683 | 2692 | Component { |
|
2684 | 2693 | name: "QtCharts::QScatterSeries" |
|
2685 | 2694 | prototype: "QtCharts::QXYSeries" |
|
2686 | 2695 | Enum { |
|
2687 | 2696 | name: "MarkerShape" |
|
2688 | 2697 | values: { |
|
2689 | 2698 | "MarkerShapeCircle": 0, |
|
2690 | 2699 | "MarkerShapeRectangle": 1 |
|
2691 | 2700 | } |
|
2692 | 2701 | } |
|
2693 | 2702 | Property { name: "color"; type: "QColor" } |
|
2694 | 2703 | Property { name: "borderColor"; type: "QColor" } |
|
2695 | 2704 | Property { name: "markerShape"; type: "MarkerShape" } |
|
2696 | 2705 | Property { name: "markerSize"; type: "double" } |
|
2697 | 2706 | Property { name: "brush"; type: "QBrush" } |
|
2698 | 2707 | Signal { |
|
2699 | 2708 | name: "colorChanged" |
|
2700 | 2709 | Parameter { name: "color"; type: "QColor" } |
|
2701 | 2710 | } |
|
2702 | 2711 | Signal { |
|
2703 | 2712 | name: "borderColorChanged" |
|
2704 | 2713 | Parameter { name: "color"; type: "QColor" } |
|
2705 | 2714 | } |
|
2706 | 2715 | } |
|
2707 | 2716 | Component { name: "QtCharts::QSplineSeries"; prototype: "QtCharts::QLineSeries" } |
|
2708 | 2717 | Component { name: "QtCharts::QStackedBarSeries"; prototype: "QtCharts::QAbstractBarSeries" } |
|
2709 | 2718 | Component { |
|
2710 | 2719 | name: "QtCharts::QVBarModelMapper" |
|
2711 | 2720 | prototype: "QtCharts::QBarModelMapper" |
|
2712 | 2721 | exports: [ |
|
2713 | 2722 | "QtCharts/VBarModelMapper 1.0", |
|
2714 | 2723 | "QtCharts/VBarModelMapper 2.0" |
|
2715 | 2724 | ] |
|
2716 | 2725 | exportMetaObjectRevisions: [0, 0] |
|
2717 | 2726 | Property { name: "series"; type: "QAbstractBarSeries"; isPointer: true } |
|
2718 | 2727 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2719 | 2728 | Property { name: "firstBarSetColumn"; type: "int" } |
|
2720 | 2729 | Property { name: "lastBarSetColumn"; type: "int" } |
|
2721 | 2730 | Property { name: "firstRow"; type: "int" } |
|
2722 | 2731 | Property { name: "rowCount"; type: "int" } |
|
2723 | 2732 | Signal { name: "seriesReplaced" } |
|
2724 | 2733 | Signal { name: "modelReplaced" } |
|
2725 | 2734 | } |
|
2726 | 2735 | Component { |
|
2727 | 2736 | name: "QtCharts::QVBoxPlotModelMapper" |
|
2728 | 2737 | prototype: "QtCharts::QBoxPlotModelMapper" |
|
2729 | 2738 | exports: ["QtCharts/VBoxPlotModelMapper 2.0"] |
|
2730 | 2739 | exportMetaObjectRevisions: [0] |
|
2731 | 2740 | Property { name: "series"; type: "QBoxPlotSeries"; isPointer: true } |
|
2732 | 2741 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2733 | 2742 | Property { name: "firstBoxSetColumn"; type: "int" } |
|
2734 | 2743 | Property { name: "lastBoxSetColumn"; type: "int" } |
|
2735 | 2744 | Property { name: "firstRow"; type: "int" } |
|
2736 | 2745 | Property { name: "rowCount"; type: "int" } |
|
2737 | 2746 | Signal { name: "seriesReplaced" } |
|
2738 | 2747 | Signal { name: "modelReplaced" } |
|
2739 | 2748 | } |
|
2740 | 2749 | Component { |
|
2741 | 2750 | name: "QtCharts::QVPieModelMapper" |
|
2742 | 2751 | prototype: "QtCharts::QPieModelMapper" |
|
2743 | 2752 | exports: [ |
|
2744 | 2753 | "QtCharts/VPieModelMapper 1.0", |
|
2745 | 2754 | "QtCharts/VPieModelMapper 2.0" |
|
2746 | 2755 | ] |
|
2747 | 2756 | exportMetaObjectRevisions: [0, 0] |
|
2748 | 2757 | Property { name: "series"; type: "QPieSeries"; isPointer: true } |
|
2749 | 2758 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2750 | 2759 | Property { name: "valuesColumn"; type: "int" } |
|
2751 | 2760 | Property { name: "labelsColumn"; type: "int" } |
|
2752 | 2761 | Property { name: "firstRow"; type: "int" } |
|
2753 | 2762 | Property { name: "rowCount"; type: "int" } |
|
2754 | 2763 | Signal { name: "seriesReplaced" } |
|
2755 | 2764 | Signal { name: "modelReplaced" } |
|
2756 | 2765 | } |
|
2757 | 2766 | Component { |
|
2758 | 2767 | name: "QtCharts::QVXYModelMapper" |
|
2759 | 2768 | prototype: "QtCharts::QXYModelMapper" |
|
2760 | 2769 | exports: [ |
|
2761 | 2770 | "QtCharts/VXYModelMapper 1.0", |
|
2762 | 2771 | "QtCharts/VXYModelMapper 2.0" |
|
2763 | 2772 | ] |
|
2764 | 2773 | exportMetaObjectRevisions: [0, 0] |
|
2765 | 2774 | Property { name: "series"; type: "QXYSeries"; isPointer: true } |
|
2766 | 2775 | Property { name: "model"; type: "QAbstractItemModel"; isPointer: true } |
|
2767 | 2776 | Property { name: "xColumn"; type: "int" } |
|
2768 | 2777 | Property { name: "yColumn"; type: "int" } |
|
2769 | 2778 | Property { name: "firstRow"; type: "int" } |
|
2770 | 2779 | Property { name: "rowCount"; type: "int" } |
|
2771 | 2780 | Signal { name: "seriesReplaced" } |
|
2772 | 2781 | Signal { name: "modelReplaced" } |
|
2773 | 2782 | } |
|
2774 | 2783 | Component { |
|
2775 | 2784 | name: "QtCharts::QValueAxis" |
|
2776 | 2785 | prototype: "QtCharts::QAbstractAxis" |
|
2777 | 2786 | exports: [ |
|
2778 | 2787 | "QtCharts/ValueAxis 1.1", |
|
2779 | 2788 | "QtCharts/ValueAxis 2.0", |
|
2780 | 2789 | "QtCharts/ValuesAxis 1.0" |
|
2781 | 2790 | ] |
|
2782 | 2791 | exportMetaObjectRevisions: [0, 0, 0] |
|
2783 | 2792 | Property { name: "tickCount"; type: "int" } |
|
2784 | 2793 | Property { name: "min"; type: "double" } |
|
2785 | 2794 | Property { name: "max"; type: "double" } |
|
2786 | 2795 | Property { name: "labelFormat"; type: "string" } |
|
2787 | 2796 | Signal { |
|
2788 | 2797 | name: "minChanged" |
|
2789 | 2798 | Parameter { name: "min"; type: "double" } |
|
2790 | 2799 | } |
|
2791 | 2800 | Signal { |
|
2792 | 2801 | name: "maxChanged" |
|
2793 | 2802 | Parameter { name: "max"; type: "double" } |
|
2794 | 2803 | } |
|
2795 | 2804 | Signal { |
|
2796 | 2805 | name: "rangeChanged" |
|
2797 | 2806 | Parameter { name: "min"; type: "double" } |
|
2798 | 2807 | Parameter { name: "max"; type: "double" } |
|
2799 | 2808 | } |
|
2800 | 2809 | Signal { |
|
2801 | 2810 | name: "tickCountChanged" |
|
2802 | 2811 | Parameter { name: "tickCount"; type: "int" } |
|
2803 | 2812 | } |
|
2804 | 2813 | Signal { |
|
2805 | 2814 | name: "labelFormatChanged" |
|
2806 | 2815 | Parameter { name: "format"; type: "string" } |
|
2807 | 2816 | } |
|
2808 | 2817 | Method { name: "applyNiceNumbers" } |
|
2809 | 2818 | } |
|
2810 | 2819 | Component { |
|
2811 | 2820 | name: "QtCharts::QXYModelMapper" |
|
2812 | 2821 | prototype: "QObject" |
|
2813 | 2822 | exports: ["QtCharts/XYModelMapper 1.0", "QtCharts/XYModelMapper 2.0"] |
|
2814 | 2823 | isCreatable: false |
|
2815 | 2824 | exportMetaObjectRevisions: [0, 0] |
|
2816 | 2825 | } |
|
2817 | 2826 | Component { |
|
2818 | 2827 | name: "QtCharts::QXYSeries" |
|
2819 | 2828 | prototype: "QtCharts::QAbstractSeries" |
|
2820 | 2829 | exports: ["QtCharts/XYSeries 1.0", "QtCharts/XYSeries 2.0"] |
|
2821 | 2830 | isCreatable: false |
|
2822 | 2831 | exportMetaObjectRevisions: [0, 0] |
|
2823 | 2832 | Property { name: "pointsVisible"; type: "bool" } |
|
2824 | 2833 | Property { name: "color"; type: "QColor" } |
|
2825 | 2834 | Property { name: "pointLabelsFormat"; type: "string" } |
|
2826 | 2835 | Property { name: "pointLabelsVisible"; type: "bool" } |
|
2827 | 2836 | Property { name: "pointLabelsFont"; type: "QFont" } |
|
2828 | 2837 | Property { name: "pointLabelsColor"; type: "QColor" } |
|
2829 | 2838 | Signal { |
|
2830 | 2839 | name: "clicked" |
|
2831 | 2840 | Parameter { name: "point"; type: "QPointF" } |
|
2832 | 2841 | } |
|
2833 | 2842 | Signal { |
|
2834 | 2843 | name: "hovered" |
|
2835 | 2844 | Parameter { name: "point"; type: "QPointF" } |
|
2836 | 2845 | Parameter { name: "state"; type: "bool" } |
|
2837 | 2846 | } |
|
2838 | 2847 | Signal { |
|
2839 | 2848 | name: "pressed" |
|
2840 | 2849 | Parameter { name: "point"; type: "QPointF" } |
|
2841 | 2850 | } |
|
2842 | 2851 | Signal { |
|
2843 | 2852 | name: "released" |
|
2844 | 2853 | Parameter { name: "point"; type: "QPointF" } |
|
2845 | 2854 | } |
|
2846 | 2855 | Signal { |
|
2847 | 2856 | name: "doubleClicked" |
|
2848 | 2857 | Parameter { name: "point"; type: "QPointF" } |
|
2849 | 2858 | } |
|
2850 | 2859 | Signal { |
|
2851 | 2860 | name: "pointReplaced" |
|
2852 | 2861 | Parameter { name: "index"; type: "int" } |
|
2853 | 2862 | } |
|
2854 | 2863 | Signal { |
|
2855 | 2864 | name: "pointRemoved" |
|
2856 | 2865 | Parameter { name: "index"; type: "int" } |
|
2857 | 2866 | } |
|
2858 | 2867 | Signal { |
|
2859 | 2868 | name: "pointAdded" |
|
2860 | 2869 | Parameter { name: "index"; type: "int" } |
|
2861 | 2870 | } |
|
2862 | 2871 | Signal { |
|
2863 | 2872 | name: "colorChanged" |
|
2864 | 2873 | Parameter { name: "color"; type: "QColor" } |
|
2865 | 2874 | } |
|
2866 | 2875 | Signal { name: "pointsReplaced" } |
|
2867 | 2876 | Signal { |
|
2868 | 2877 | name: "pointLabelsFormatChanged" |
|
2869 | 2878 | Parameter { name: "format"; type: "string" } |
|
2870 | 2879 | } |
|
2871 | 2880 | Signal { |
|
2872 | 2881 | name: "pointLabelsVisibilityChanged" |
|
2873 | 2882 | Parameter { name: "visible"; type: "bool" } |
|
2874 | 2883 | } |
|
2875 | 2884 | Signal { |
|
2876 | 2885 | name: "pointLabelsFontChanged" |
|
2877 | 2886 | Parameter { name: "font"; type: "QFont" } |
|
2878 | 2887 | } |
|
2879 | 2888 | Signal { |
|
2880 | 2889 | name: "pointLabelsColorChanged" |
|
2881 | 2890 | Parameter { name: "color"; type: "QColor" } |
|
2882 | 2891 | } |
|
2883 | 2892 | } |
|
2884 | 2893 | } |
@@ -1,158 +1,220 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2015 The Qt Company Ltd |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to The Qt Company, please use contact form at http://qt.io |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Charts module. |
|
8 | 8 | ** |
|
9 | 9 | ** Licensees holding valid commercial license for Qt may use this file in |
|
10 | 10 | ** accordance with the Qt License Agreement provided with the Software |
|
11 | 11 | ** or, alternatively, in accordance with the terms contained in a written |
|
12 | 12 | ** agreement between you and The Qt Company. |
|
13 | 13 | ** |
|
14 | 14 | ** If you have questions regarding the use of this file, please use |
|
15 | 15 | ** contact form at http://qt.io |
|
16 | 16 | ** |
|
17 | 17 | ****************************************************************************/ |
|
18 | 18 | |
|
19 | 19 | import QtQuick 2.0 |
|
20 | 20 | import QtTest 1.0 |
|
21 |
import QtCharts 2. |
|
|
21 | import QtCharts 2.1 | |
|
22 | 22 | |
|
23 | 23 | Rectangle { |
|
24 | 24 | width: 400 |
|
25 | 25 | height: 300 |
|
26 | 26 | |
|
27 | 27 | TestCase { |
|
28 | 28 | id: tc1 |
|
29 | 29 | name: "tst_qml-qtquicktest ChartView Functions" |
|
30 | 30 | when: windowShown |
|
31 | property rect zoomRect | |
|
31 | 32 | |
|
32 | 33 | function test_chartViewSeriesAndAxes() { |
|
33 | 34 | // Create XY series |
|
34 | 35 | var line = chartView.createSeries(ChartView.SeriesTypeLine, "line"); |
|
35 | 36 | verify(line != null && line != undefined); |
|
36 | 37 | var spline = chartView.createSeries(ChartView.SeriesTypeSpline, "spline"); |
|
37 | 38 | verify(spline != null && spline != undefined); |
|
38 | 39 | var scatter = chartView.createSeries(ChartView.SeriesTypeScatter, "scatter"); |
|
39 | 40 | verify(scatter != null && scatter != undefined); |
|
40 | 41 | |
|
41 | 42 | // Create a series with specific axes |
|
42 | 43 | var line2 = chartView.createSeries(ChartView.SeriesTypeLine, "line2", chartView.axisX(line), chartView.axisY(line)); |
|
43 | 44 | |
|
44 | 45 | // Check that all the XY series use the same axes |
|
45 | 46 | verify(chartView.axisX(line) != null); |
|
46 | 47 | verify(chartView.axisY(line) != null); |
|
47 | 48 | compare(chartView.axisX(line), chartView.axisX(line2)); |
|
48 | 49 | compare(chartView.axisY(line), chartView.axisY(line2)); |
|
49 | 50 | compare(chartView.axisX(line), chartView.axisX(spline)); |
|
50 | 51 | compare(chartView.axisY(line), chartView.axisY(spline)); |
|
51 | 52 | compare(chartView.axisX(line), chartView.axisX(scatter)); |
|
52 | 53 | compare(chartView.axisY(line), chartView.axisY(scatter)); |
|
53 | 54 | |
|
54 | 55 | var bar = chartView.createSeries(ChartView.SeriesTypeBar, "bar"); |
|
55 | 56 | verify(bar != null && bar != undefined); |
|
56 | 57 | var stackedbar = chartView.createSeries(ChartView.SeriesTypeStackedBar, "stackedbar"); |
|
57 | 58 | verify(stackedbar != null && stackedbar != undefined); |
|
58 | 59 | var percentbar = chartView.createSeries(ChartView.SeriesTypePercentBar, "percentbar"); |
|
59 | 60 | verify(percentbar != null && percentbar != undefined); |
|
60 | 61 | var horizontalbar = chartView.createSeries(ChartView.SeriesTypeHorizontalBar, "horizontalbar"); |
|
61 | 62 | verify(horizontalbar != null && horizontalbar != undefined); |
|
62 | 63 | var horizontalstackedbar = chartView.createSeries(ChartView.SeriesTypeHorizontalStackedBar, "horizontalstackedbar"); |
|
63 | 64 | verify(horizontalstackedbar != null && horizontalstackedbar != undefined); |
|
64 | 65 | var horizontalpercentbar = chartView.createSeries(ChartView.SeriesTypeHorizontalPercentBar, "horizontalpercentbar"); |
|
65 | 66 | verify(horizontalpercentbar != null && horizontalpercentbar != undefined); |
|
66 | 67 | var area = chartView.createSeries(ChartView.SeriesTypeArea, "area"); |
|
67 | 68 | verify(area != null && area != undefined); |
|
68 | 69 | |
|
69 | 70 | // Remove all series |
|
70 | 71 | chartView.removeAllSeries(); |
|
71 | 72 | compare(chartView.count, 0); |
|
72 | 73 | } |
|
73 | 74 | |
|
74 | 75 | function test_chartViewRange() { |
|
75 | 76 | // Set initial values |
|
76 | 77 | chartView.createSeries(ChartView.SeriesTypeLine, "line"); |
|
77 | 78 | verify(chartView.axisX() != null); |
|
78 | 79 | verify(chartView.axisY() != null); |
|
79 | 80 | chartView.axisX().min = 1.0; |
|
80 | 81 | chartView.axisX().max = 2.0; |
|
81 | 82 | chartView.axisY().min = 1.0; |
|
82 | 83 | chartView.axisY().max = 2.0; |
|
83 | 84 | |
|
85 | var xMaxOriginal = chartView.axisX().max; | |
|
86 | var xMinOriginal = chartView.axisX().min; | |
|
87 | var yMaxOriginal = chartView.axisY().max; | |
|
88 | var yMinOriginal = chartView.axisY().min; | |
|
89 | ||
|
84 | 90 | var xMax = chartView.axisX().max; |
|
85 | 91 | var xMin = chartView.axisX().min; |
|
86 | 92 | var yMax = chartView.axisY().max; |
|
87 | 93 | var yMin = chartView.axisY().min; |
|
88 | 94 | |
|
89 | 95 | // zoom x 2.5 |
|
90 | 96 | chartView.zoom(1.5); |
|
91 | 97 | verify(chartView.axisX().max < xMax); |
|
92 | 98 | verify(chartView.axisX().min > xMin); |
|
93 | 99 | verify(chartView.axisY().max < yMax); |
|
94 | 100 | verify(chartView.axisY().min > yMin); |
|
95 | 101 | xMax = chartView.axisX().max; |
|
96 | 102 | xMin = chartView.axisX().min; |
|
97 | 103 | yMax = chartView.axisY().max; |
|
98 | 104 | yMin = chartView.axisY().min; |
|
99 | 105 | |
|
100 | 106 | // zoom x 0.5 |
|
101 | 107 | chartView.zoom(0.5); |
|
102 | 108 | verify(chartView.axisX().max > xMax); |
|
103 | 109 | verify(chartView.axisX().min < xMin); |
|
104 | 110 | verify(chartView.axisY().max > yMax); |
|
105 | 111 | verify(chartView.axisY().min < yMin); |
|
106 | 112 | xMax = chartView.axisX().max; |
|
107 | 113 | xMin = chartView.axisX().min; |
|
108 | 114 | yMax = chartView.axisY().max; |
|
109 | 115 | yMin = chartView.axisY().min; |
|
110 | 116 | |
|
117 | // zoom x -1 | |
|
118 | // negative value has no effect | |
|
119 | chartView.zoom(-1); | |
|
120 | verify(chartView.axisX().max === xMax); | |
|
121 | verify(chartView.axisX().min === xMin); | |
|
122 | verify(chartView.axisY().max === yMax); | |
|
123 | verify(chartView.axisY().min === yMin); | |
|
124 | ||
|
125 | // zoom in | |
|
126 | chartView.zoomIn(); | |
|
127 | verify(chartView.axisX().max < xMax); | |
|
128 | verify(chartView.axisX().min > xMin); | |
|
129 | verify(chartView.axisY().max < yMax); | |
|
130 | verify(chartView.axisY().min > yMin); | |
|
131 | xMax = chartView.axisX().max; | |
|
132 | xMin = chartView.axisX().min; | |
|
133 | yMax = chartView.axisY().max; | |
|
134 | yMin = chartView.axisY().min; | |
|
135 | ||
|
136 | // zoom in rect | |
|
137 | zoomRect.x = 100; | |
|
138 | zoomRect.y = 100; | |
|
139 | zoomRect.width = 120; | |
|
140 | zoomRect.height = 120; | |
|
141 | chartView.zoomIn(zoomRect); | |
|
142 | verify(chartView.axisX().max < xMax); | |
|
143 | verify(chartView.axisX().min > xMin); | |
|
144 | verify(chartView.axisY().max < yMax); | |
|
145 | verify(chartView.axisY().min > yMin); | |
|
146 | xMax = chartView.axisX().max; | |
|
147 | xMin = chartView.axisX().min; | |
|
148 | yMax = chartView.axisY().max; | |
|
149 | yMin = chartView.axisY().min; | |
|
150 | ||
|
151 | // zoom out | |
|
152 | chartView.zoomOut(); | |
|
153 | verify(chartView.axisX().max > xMax); | |
|
154 | verify(chartView.axisX().min < xMin); | |
|
155 | verify(chartView.axisY().max > yMax); | |
|
156 | verify(chartView.axisY().min < yMin); | |
|
157 | xMax = chartView.axisX().max; | |
|
158 | xMin = chartView.axisX().min; | |
|
159 | yMax = chartView.axisY().max; | |
|
160 | yMin = chartView.axisY().min; | |
|
161 | ||
|
162 | // zoom reset | |
|
163 | chartView.zoomReset(); | |
|
164 | verify(chartView.axisX().max === xMaxOriginal); | |
|
165 | verify(chartView.axisX().min === xMinOriginal); | |
|
166 | verify(chartView.axisY().max === yMaxOriginal); | |
|
167 | verify(chartView.axisY().min === yMinOriginal); | |
|
168 | xMax = chartView.axisX().max; | |
|
169 | xMin = chartView.axisX().min; | |
|
170 | yMax = chartView.axisY().max; | |
|
171 | yMin = chartView.axisY().min; | |
|
172 | ||
|
111 | 173 | // Scroll up |
|
112 | 174 | chartView.scrollUp(10); |
|
113 | 175 | compare(chartView.axisX().max, xMax); |
|
114 | 176 | compare(chartView.axisX().min, xMin); |
|
115 | 177 | verify(chartView.axisY().max > yMax); |
|
116 | 178 | verify(chartView.axisY().min > yMin); |
|
117 | 179 | xMax = chartView.axisX().max; |
|
118 | 180 | xMin = chartView.axisX().min; |
|
119 | 181 | yMax = chartView.axisY().max; |
|
120 | 182 | yMin = chartView.axisY().min; |
|
121 | 183 | |
|
122 | 184 | // Scroll down |
|
123 | 185 | chartView.scrollDown(10); |
|
124 | 186 | compare(chartView.axisX().max, xMax); |
|
125 | 187 | compare(chartView.axisX().min, xMin); |
|
126 | 188 | verify(chartView.axisY().max < yMax); |
|
127 | 189 | verify(chartView.axisY().min < yMin); |
|
128 | 190 | xMax = chartView.axisX().max; |
|
129 | 191 | xMin = chartView.axisX().min; |
|
130 | 192 | yMax = chartView.axisY().max; |
|
131 | 193 | yMin = chartView.axisY().min; |
|
132 | 194 | |
|
133 | 195 | // Scroll left |
|
134 | 196 | chartView.scrollLeft(10); |
|
135 | 197 | verify(chartView.axisX().max < xMax); |
|
136 | 198 | verify(chartView.axisX().min < xMin); |
|
137 | 199 | compare(chartView.axisY().max, yMax); |
|
138 | 200 | compare(chartView.axisY().min, yMin); |
|
139 | 201 | xMax = chartView.axisX().max; |
|
140 | 202 | xMin = chartView.axisX().min; |
|
141 | 203 | yMax = chartView.axisY().max; |
|
142 | 204 | yMin = chartView.axisY().min; |
|
143 | 205 | |
|
144 | 206 | // Scroll right |
|
145 | 207 | chartView.scrollRight(10); |
|
146 | 208 | verify(chartView.axisX().max > xMax); |
|
147 | 209 | verify(chartView.axisX().min > xMin); |
|
148 | 210 | compare(chartView.axisY().max, yMax); |
|
149 | 211 | compare(chartView.axisY().min, yMin); |
|
150 | 212 | } |
|
151 | 213 | } |
|
152 | 214 | |
|
153 | 215 | ChartView { |
|
154 | 216 | id: chartView |
|
155 | 217 | anchors.fill: parent |
|
156 | 218 | title: "Chart" |
|
157 | 219 | } |
|
158 | 220 | } |
General Comments 0
You need to be logged in to leave comments.
Login now