##// END OF EJS Templates
Added grid color property for value axis...
Titta Heikkala -
r2810:2db41b8cb90b
parent child
Show More
@@ -1,242 +1,262
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include <private/cartesianchartaxis_p.h>
19 #include <private/cartesianchartaxis_p.h>
20 #include <QtCharts/QAbstractAxis>
20 #include <QtCharts/QAbstractAxis>
21 #include <private/qabstractaxis_p.h>
21 #include <private/qabstractaxis_p.h>
22 #include <private/chartpresenter_p.h>
22 #include <private/chartpresenter_p.h>
23 #include <private/abstractchartlayout_p.h>
23 #include <private/abstractchartlayout_p.h>
24 #include <private/abstractdomain_p.h>
24 #include <private/abstractdomain_p.h>
25 #include <private/linearrowitem_p.h>
25 #include <private/linearrowitem_p.h>
26 #include <QtCharts/QValueAxis>
26 #include <QtCharts/QValueAxis>
27 #include <QtCharts/QLogValueAxis>
27 #include <QtCharts/QLogValueAxis>
28 #include <QtWidgets/QGraphicsLayout>
28 #include <QtWidgets/QGraphicsLayout>
29 #include <QtGui/QTextDocument>
29 #include <QtGui/QTextDocument>
30
30
31 QT_CHARTS_BEGIN_NAMESPACE
31 QT_CHARTS_BEGIN_NAMESPACE
32
32
33 CartesianChartAxis::CartesianChartAxis(QAbstractAxis *axis, QGraphicsItem *item , bool intervalAxis)
33 CartesianChartAxis::CartesianChartAxis(QAbstractAxis *axis, QGraphicsItem *item , bool intervalAxis)
34 : ChartAxisElement(axis, item, intervalAxis)
34 : ChartAxisElement(axis, item, intervalAxis)
35 {
35 {
36 Q_ASSERT(item);
36 Q_ASSERT(item);
37 }
37 }
38
38
39
39
40 CartesianChartAxis::~CartesianChartAxis()
40 CartesianChartAxis::~CartesianChartAxis()
41 {
41 {
42 }
42 }
43
43
44 void CartesianChartAxis::createItems(int count)
44 void CartesianChartAxis::createItems(int count)
45 {
45 {
46 if (arrowItems().size() == 0) {
46 if (arrowItems().size() == 0) {
47 QGraphicsLineItem *arrow = new LineArrowItem(this, this);
47 QGraphicsLineItem *arrow = new LineArrowItem(this, this);
48 arrow->setPen(axis()->linePen());
48 arrow->setPen(axis()->linePen());
49 arrowGroup()->addToGroup(arrow);
49 arrowGroup()->addToGroup(arrow);
50 }
50 }
51
51
52 if (intervalAxis() && gridItems().size() == 0) {
52 if (intervalAxis() && gridItems().size() == 0) {
53 for (int i = 0 ; i < 2 ; i ++){
53 for (int i = 0 ; i < 2 ; i ++){
54 QGraphicsLineItem *item = new QGraphicsLineItem(this);
54 QGraphicsLineItem *item = new QGraphicsLineItem(this);
55 item->setPen(axis()->gridLinePen());
55 item->setPen(axis()->gridLinePen());
56 gridGroup()->addToGroup(item);
56 gridGroup()->addToGroup(item);
57 QGraphicsRectItem *shades = new QGraphicsRectItem(this);
57 QGraphicsRectItem *shades = new QGraphicsRectItem(this);
58 shades->setPen(axis()->shadesPen());
58 shades->setPen(axis()->shadesPen());
59 shades->setBrush(axis()->shadesBrush());
59 shades->setBrush(axis()->shadesBrush());
60 shadeGroup()->addToGroup(shades);
60 shadeGroup()->addToGroup(shades);
61 }
61 }
62 }
62 }
63
63
64 QGraphicsTextItem *title = titleItem();
64 QGraphicsTextItem *title = titleItem();
65 title->setFont(axis()->titleFont());
65 title->setFont(axis()->titleFont());
66 title->setDefaultTextColor(axis()->titleBrush().color());
66 title->setDefaultTextColor(axis()->titleBrush().color());
67 title->setHtml(axis()->titleText());
67 title->setHtml(axis()->titleText());
68
68
69 for (int i = 0; i < count; ++i) {
69 for (int i = 0; i < count; ++i) {
70 QGraphicsLineItem *arrow = new QGraphicsLineItem(this);
70 QGraphicsLineItem *arrow = new QGraphicsLineItem(this);
71 QGraphicsLineItem *grid = new QGraphicsLineItem(this);
71 QGraphicsLineItem *grid = new QGraphicsLineItem(this);
72 QGraphicsTextItem *label = new QGraphicsTextItem(this);
72 QGraphicsTextItem *label = new QGraphicsTextItem(this);
73 label->document()->setDocumentMargin(ChartPresenter::textMargin());
73 label->document()->setDocumentMargin(ChartPresenter::textMargin());
74 arrow->setPen(axis()->linePen());
74 arrow->setPen(axis()->linePen());
75 grid->setPen(axis()->gridLinePen());
75 grid->setPen(axis()->gridLinePen());
76 label->setFont(axis()->labelsFont());
76 label->setFont(axis()->labelsFont());
77 label->setDefaultTextColor(axis()->labelsBrush().color());
77 label->setDefaultTextColor(axis()->labelsBrush().color());
78 label->setRotation(axis()->labelsAngle());
78 label->setRotation(axis()->labelsAngle());
79 arrowGroup()->addToGroup(arrow);
79 arrowGroup()->addToGroup(arrow);
80 gridGroup()->addToGroup(grid);
80 gridGroup()->addToGroup(grid);
81 labelGroup()->addToGroup(label);
81 labelGroup()->addToGroup(label);
82
82
83 if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
83 if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
84 QGraphicsRectItem *shades = new QGraphicsRectItem(this);
84 QGraphicsRectItem *shades = new QGraphicsRectItem(this);
85 shades->setPen(axis()->shadesPen());
85 shades->setPen(axis()->shadesPen());
86 shades->setBrush(axis()->shadesBrush());
86 shades->setBrush(axis()->shadesBrush());
87 shadeGroup()->addToGroup(shades);
87 shadeGroup()->addToGroup(shades);
88 }
88 }
89 }
89 }
90 }
90 }
91
91
92 void CartesianChartAxis::updateMinorTickItems()
92 void CartesianChartAxis::updateMinorTickItems()
93 {
93 {
94 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(this->axis());
94 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(this->axis());
95 if (valueAxis) {
95 if (valueAxis) {
96 int currentCount = minorArrowItems().size();
96 int currentCount = minorArrowItems().size();
97 int expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
97 int expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
98 int diff = expectedCount - currentCount;
98 int diff = expectedCount - currentCount;
99 if (diff > 0) {
99 if (diff > 0) {
100 for (int i = 0; i < diff; i++) {
100 for (int i = 0; i < diff; i++) {
101 QGraphicsLineItem *minorArrow = new QGraphicsLineItem(this);
101 QGraphicsLineItem *minorArrow = new QGraphicsLineItem(this);
102 QGraphicsLineItem *minorGrid = new QGraphicsLineItem(this);
102 QGraphicsLineItem *minorGrid = new QGraphicsLineItem(this);
103 minorArrow->setPen(valueAxis->linePen());
103 minorArrow->setPen(valueAxis->linePen());
104 minorGrid->setPen(valueAxis->minorGridLinePen());
104 minorGrid->setPen(valueAxis->minorGridLinePen());
105 minorArrowGroup()->addToGroup(minorArrow);
105 minorArrowGroup()->addToGroup(minorArrow);
106 minorGridGroup()->addToGroup(minorGrid);
106 minorGridGroup()->addToGroup(minorGrid);
107 }
107 }
108 } else {
108 } else {
109 QList<QGraphicsItem *> minorGridLines = minorGridItems();
109 QList<QGraphicsItem *> minorGridLines = minorGridItems();
110 QList<QGraphicsItem *> minorArrows = minorArrowItems();
110 QList<QGraphicsItem *> minorArrows = minorArrowItems();
111 for (int i = 0; i > diff; i--) {
111 for (int i = 0; i > diff; i--) {
112 if (!minorGridLines.isEmpty())
112 if (!minorGridLines.isEmpty())
113 delete(minorGridLines.takeLast());
113 delete(minorGridLines.takeLast());
114 if (!minorArrows.isEmpty())
114 if (!minorArrows.isEmpty())
115 delete(minorArrows.takeLast());
115 delete(minorArrows.takeLast());
116 }
116 }
117 }
117 }
118 }
118 }
119 }
119 }
120
120
121 void CartesianChartAxis::deleteItems(int count)
121 void CartesianChartAxis::deleteItems(int count)
122 {
122 {
123 QList<QGraphicsItem *> lines = gridItems();
123 QList<QGraphicsItem *> lines = gridItems();
124 QList<QGraphicsItem *> labels = labelItems();
124 QList<QGraphicsItem *> labels = labelItems();
125 QList<QGraphicsItem *> shades = shadeItems();
125 QList<QGraphicsItem *> shades = shadeItems();
126 QList<QGraphicsItem *> axis = arrowItems();
126 QList<QGraphicsItem *> axis = arrowItems();
127
127
128 for (int i = 0; i < count; ++i) {
128 for (int i = 0; i < count; ++i) {
129 if (lines.size() == 1 || (((lines.size() + 1) % 2) && lines.size() > 0))
129 if (lines.size() == 1 || (((lines.size() + 1) % 2) && lines.size() > 0))
130 delete(shades.takeLast());
130 delete(shades.takeLast());
131 delete(lines.takeLast());
131 delete(lines.takeLast());
132 delete(labels.takeLast());
132 delete(labels.takeLast());
133 delete(axis.takeLast());
133 delete(axis.takeLast());
134 }
134 }
135 }
135 }
136
136
137 void CartesianChartAxis::updateLayout(QVector<qreal> &layout)
137 void CartesianChartAxis::updateLayout(QVector<qreal> &layout)
138 {
138 {
139 int diff = ChartAxisElement::layout().size() - layout.size();
139 int diff = ChartAxisElement::layout().size() - layout.size();
140
140
141 if (diff > 0)
141 if (diff > 0)
142 deleteItems(diff);
142 deleteItems(diff);
143 else if (diff < 0)
143 else if (diff < 0)
144 createItems(-diff);
144 createItems(-diff);
145
145
146 updateMinorTickItems();
146 updateMinorTickItems();
147
147
148 if (animation()) {
148 if (animation()) {
149 switch (presenter()->state()) {
149 switch (presenter()->state()) {
150 case ChartPresenter::ZoomInState:
150 case ChartPresenter::ZoomInState:
151 animation()->setAnimationType(AxisAnimation::ZoomInAnimation);
151 animation()->setAnimationType(AxisAnimation::ZoomInAnimation);
152 animation()->setAnimationPoint(presenter()->statePoint());
152 animation()->setAnimationPoint(presenter()->statePoint());
153 break;
153 break;
154 case ChartPresenter::ZoomOutState:
154 case ChartPresenter::ZoomOutState:
155 animation()->setAnimationType(AxisAnimation::ZoomOutAnimation);
155 animation()->setAnimationType(AxisAnimation::ZoomOutAnimation);
156 animation()->setAnimationPoint(presenter()->statePoint());
156 animation()->setAnimationPoint(presenter()->statePoint());
157 break;
157 break;
158 case ChartPresenter::ScrollUpState:
158 case ChartPresenter::ScrollUpState:
159 case ChartPresenter::ScrollLeftState:
159 case ChartPresenter::ScrollLeftState:
160 animation()->setAnimationType(AxisAnimation::MoveBackwordAnimation);
160 animation()->setAnimationType(AxisAnimation::MoveBackwordAnimation);
161 break;
161 break;
162 case ChartPresenter::ScrollDownState:
162 case ChartPresenter::ScrollDownState:
163 case ChartPresenter::ScrollRightState:
163 case ChartPresenter::ScrollRightState:
164 animation()->setAnimationType(AxisAnimation::MoveForwardAnimation);
164 animation()->setAnimationType(AxisAnimation::MoveForwardAnimation);
165 break;
165 break;
166 case ChartPresenter::ShowState:
166 case ChartPresenter::ShowState:
167 animation()->setAnimationType(AxisAnimation::DefaultAnimation);
167 animation()->setAnimationType(AxisAnimation::DefaultAnimation);
168 break;
168 break;
169 }
169 }
170 animation()->setValues(ChartAxisElement::layout(), layout);
170 animation()->setValues(ChartAxisElement::layout(), layout);
171 presenter()->startAnimation(animation());
171 presenter()->startAnimation(animation());
172 } else {
172 } else {
173 setLayout(layout);
173 setLayout(layout);
174 updateGeometry();
174 updateGeometry();
175 }
175 }
176 }
176 }
177
177
178 bool CartesianChartAxis::isEmpty()
178 bool CartesianChartAxis::isEmpty()
179 {
179 {
180 return axisGeometry().isEmpty()
180 return axisGeometry().isEmpty()
181 || gridGeometry().isEmpty()
181 || gridGeometry().isEmpty()
182 || qFuzzyCompare(min(), max());
182 || qFuzzyCompare(min(), max());
183 }
183 }
184
184
185 void CartesianChartAxis::setGeometry(const QRectF &axis, const QRectF &grid)
185 void CartesianChartAxis::setGeometry(const QRectF &axis, const QRectF &grid)
186 {
186 {
187 m_gridRect = grid;
187 m_gridRect = grid;
188 setAxisGeometry(axis);
188 setAxisGeometry(axis);
189
189
190 if (isEmpty())
190 if (isEmpty())
191 return;
191 return;
192
192
193 QVector<qreal> layout = calculateLayout();
193 QVector<qreal> layout = calculateLayout();
194 updateLayout(layout);
194 updateLayout(layout);
195 }
195 }
196
196
197 QSizeF CartesianChartAxis::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
197 QSizeF CartesianChartAxis::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
198 {
198 {
199 Q_UNUSED(which);
199 Q_UNUSED(which);
200 Q_UNUSED(constraint);
200 Q_UNUSED(constraint);
201 return QSizeF();
201 return QSizeF();
202 }
202 }
203
203
204 void CartesianChartAxis::handleArrowPenChanged(const QPen &pen)
204 void CartesianChartAxis::handleArrowPenChanged(const QPen &pen)
205 {
205 {
206 foreach (QGraphicsItem *item, arrowItems())
206 foreach (QGraphicsItem *item, arrowItems())
207 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
207 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
208 }
208 }
209
209
210 void CartesianChartAxis::handleGridPenChanged(const QPen &pen)
210 void CartesianChartAxis::handleGridPenChanged(const QPen &pen)
211 {
211 {
212 foreach (QGraphicsItem *item, gridItems())
212 foreach (QGraphicsItem *item, gridItems())
213 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
213 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
214 }
214 }
215
215
216 void CartesianChartAxis::handleMinorArrowPenChanged(const QPen &pen)
216 void CartesianChartAxis::handleMinorArrowPenChanged(const QPen &pen)
217 {
217 {
218 foreach (QGraphicsItem *item, minorArrowItems())
218 foreach (QGraphicsItem *item, minorArrowItems())
219 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
219 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
220 }
220 }
221
221
222 void CartesianChartAxis::handleMinorGridPenChanged(const QPen &pen)
222 void CartesianChartAxis::handleMinorGridPenChanged(const QPen &pen)
223 {
223 {
224 foreach (QGraphicsItem *item, minorGridItems())
224 foreach (QGraphicsItem *item, minorGridItems())
225 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
225 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
226 }
226 }
227
227
228 void CartesianChartAxis::handleGridLineColorChanged(const QColor &color)
229 {
230 foreach (QGraphicsItem *item, gridItems()) {
231 QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
232 QPen pen = lineItem->pen();
233 pen.setColor(color);
234 lineItem->setPen(pen);
235 }
236 }
237
238 void CartesianChartAxis::handleMinorGridLineColorChanged(const QColor &color)
239 {
240 foreach (QGraphicsItem *item, minorGridItems()) {
241 QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
242 QPen pen = lineItem->pen();
243 pen.setColor(color);
244 lineItem->setPen(pen);
245 }
246 }
247
228 void CartesianChartAxis::handleShadesBrushChanged(const QBrush &brush)
248 void CartesianChartAxis::handleShadesBrushChanged(const QBrush &brush)
229 {
249 {
230 foreach (QGraphicsItem *item, shadeItems())
250 foreach (QGraphicsItem *item, shadeItems())
231 static_cast<QGraphicsRectItem *>(item)->setBrush(brush);
251 static_cast<QGraphicsRectItem *>(item)->setBrush(brush);
232 }
252 }
233
253
234 void CartesianChartAxis::handleShadesPenChanged(const QPen &pen)
254 void CartesianChartAxis::handleShadesPenChanged(const QPen &pen)
235 {
255 {
236 foreach (QGraphicsItem *item, shadeItems())
256 foreach (QGraphicsItem *item, shadeItems())
237 static_cast<QGraphicsRectItem *>(item)->setPen(pen);
257 static_cast<QGraphicsRectItem *>(item)->setPen(pen);
238 }
258 }
239
259
240 #include "moc_cartesianchartaxis_p.cpp"
260 #include "moc_cartesianchartaxis_p.cpp"
241
261
242 QT_CHARTS_END_NAMESPACE
262 QT_CHARTS_END_NAMESPACE
@@ -1,80 +1,82
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 // W A R N I N G
19 // W A R N I N G
20 // -------------
20 // -------------
21 //
21 //
22 // This file is not part of the Qt Chart API. It exists purely as an
22 // This file is not part of the Qt Chart API. It exists purely as an
23 // implementation detail. This header file may change from version to
23 // implementation detail. This header file may change from version to
24 // version without notice, or even be removed.
24 // version without notice, or even be removed.
25 //
25 //
26 // We mean it.
26 // We mean it.
27
27
28 #ifndef CARTESIANCHARTAXIS_H
28 #ifndef CARTESIANCHARTAXIS_H
29 #define CARTESIANCHARTAXIS_H
29 #define CARTESIANCHARTAXIS_H
30
30
31 #include <QtCharts/QChartGlobal>
31 #include <QtCharts/QChartGlobal>
32 #include <private/chartaxiselement_p.h>
32 #include <private/chartaxiselement_p.h>
33
33
34 QT_CHARTS_BEGIN_NAMESPACE
34 QT_CHARTS_BEGIN_NAMESPACE
35
35
36 class QAbstractAxis;
36 class QAbstractAxis;
37
37
38 class CartesianChartAxis : public ChartAxisElement
38 class CartesianChartAxis : public ChartAxisElement
39 {
39 {
40 Q_OBJECT
40 Q_OBJECT
41 Q_INTERFACES(QGraphicsLayoutItem)
41 Q_INTERFACES(QGraphicsLayoutItem)
42 public:
42 public:
43
43
44 CartesianChartAxis(QAbstractAxis *axis, QGraphicsItem *item = 0, bool intervalAxis = false);
44 CartesianChartAxis(QAbstractAxis *axis, QGraphicsItem *item = 0, bool intervalAxis = false);
45 ~CartesianChartAxis();
45 ~CartesianChartAxis();
46
46
47 void setGeometry(const QRectF &axis, const QRectF &grid);
47 void setGeometry(const QRectF &axis, const QRectF &grid);
48 QRectF gridGeometry() const { return m_gridRect; }
48 QRectF gridGeometry() const { return m_gridRect; }
49 bool isEmpty();
49 bool isEmpty();
50
50
51 virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
51 virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
52
52
53 protected:
53 protected:
54 void setGeometry(const QRectF &size) { Q_UNUSED(size);}
54 void setGeometry(const QRectF &size) { Q_UNUSED(size);}
55 virtual void updateGeometry() = 0;
55 virtual void updateGeometry() = 0;
56 void updateLayout(QVector<qreal> &layout);
56 void updateLayout(QVector<qreal> &layout);
57
57
58 public Q_SLOTS:
58 public Q_SLOTS:
59 virtual void handleArrowPenChanged(const QPen &pen);
59 virtual void handleArrowPenChanged(const QPen &pen);
60 virtual void handleGridPenChanged(const QPen &pen);
60 virtual void handleGridPenChanged(const QPen &pen);
61 virtual void handleShadesBrushChanged(const QBrush &brush);
61 virtual void handleShadesBrushChanged(const QBrush &brush);
62 virtual void handleShadesPenChanged(const QPen &pen);
62 virtual void handleShadesPenChanged(const QPen &pen);
63 virtual void handleMinorArrowPenChanged(const QPen &pen);
63 virtual void handleMinorArrowPenChanged(const QPen &pen);
64 virtual void handleMinorGridPenChanged(const QPen &pen);
64 virtual void handleMinorGridPenChanged(const QPen &pen);
65 virtual void handleGridLineColorChanged(const QColor &color);
66 virtual void handleMinorGridLineColorChanged(const QColor &color);
65
67
66 private:
68 private:
67 void createItems(int count);
69 void createItems(int count);
68 void deleteItems(int count);
70 void deleteItems(int count);
69 void updateMinorTickItems();
71 void updateMinorTickItems();
70
72
71 private:
73 private:
72 QRectF m_gridRect;
74 QRectF m_gridRect;
73
75
74 friend class AxisAnimation;
76 friend class AxisAnimation;
75 friend class LineArrowItem;
77 friend class LineArrowItem;
76 };
78 };
77
79
78 QT_CHARTS_END_NAMESPACE
80 QT_CHARTS_END_NAMESPACE
79
81
80 #endif /* CARTESIANCHARTAXIS_H */
82 #endif /* CARTESIANCHARTAXIS_H */
@@ -1,441 +1,445
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include <private/chartaxiselement_p.h>
19 #include <private/chartaxiselement_p.h>
20 #include <private/qabstractaxis_p.h>
20 #include <private/qabstractaxis_p.h>
21 #include <private/chartpresenter_p.h>
21 #include <private/chartpresenter_p.h>
22 #include <private/abstractchartlayout_p.h>
22 #include <private/abstractchartlayout_p.h>
23 #include <QtCharts/QCategoryAxis>
23 #include <QtCharts/QCategoryAxis>
24 #include <QtCore/QtMath>
24 #include <QtCore/QtMath>
25 #include <QtCore/QDateTime>
25 #include <QtCore/QDateTime>
26 #include <QtGui/QTextDocument>
26 #include <QtGui/QTextDocument>
27 #include <cmath>
27 #include <cmath>
28
28
29 QT_CHARTS_BEGIN_NAMESPACE
29 QT_CHARTS_BEGIN_NAMESPACE
30
30
31 static const char *labelFormatMatchString = "%[\\-\\+#\\s\\d\\.\\'lhjztL]*([dicuoxfegXFEG])";
31 static const char *labelFormatMatchString = "%[\\-\\+#\\s\\d\\.\\'lhjztL]*([dicuoxfegXFEG])";
32 static const char *labelFormatMatchLocalizedString = "^([^%]*)%\\.(\\d+)([defgiEG])(.*)$";
32 static const char *labelFormatMatchLocalizedString = "^([^%]*)%\\.(\\d+)([defgiEG])(.*)$";
33 static QRegExp *labelFormatMatcher = 0;
33 static QRegExp *labelFormatMatcher = 0;
34 static QRegExp *labelFormatMatcherLocalized = 0;
34 static QRegExp *labelFormatMatcherLocalized = 0;
35 class StaticLabelFormatMatcherDeleter
35 class StaticLabelFormatMatcherDeleter
36 {
36 {
37 public:
37 public:
38 StaticLabelFormatMatcherDeleter() {}
38 StaticLabelFormatMatcherDeleter() {}
39 ~StaticLabelFormatMatcherDeleter() {
39 ~StaticLabelFormatMatcherDeleter() {
40 delete labelFormatMatcher;
40 delete labelFormatMatcher;
41 delete labelFormatMatcherLocalized;
41 delete labelFormatMatcherLocalized;
42 }
42 }
43 };
43 };
44 static StaticLabelFormatMatcherDeleter staticLabelFormatMatcherDeleter;
44 static StaticLabelFormatMatcherDeleter staticLabelFormatMatcherDeleter;
45
45
46 ChartAxisElement::ChartAxisElement(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
46 ChartAxisElement::ChartAxisElement(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
47 : ChartElement(item),
47 : ChartElement(item),
48 m_axis(axis),
48 m_axis(axis),
49 m_animation(0),
49 m_animation(0),
50 m_grid(new QGraphicsItemGroup(item)),
50 m_grid(new QGraphicsItemGroup(item)),
51 m_arrow(new QGraphicsItemGroup(item)),
51 m_arrow(new QGraphicsItemGroup(item)),
52 m_minorGrid(new QGraphicsItemGroup(item)),
52 m_minorGrid(new QGraphicsItemGroup(item)),
53 m_minorArrow(new QGraphicsItemGroup(item)),
53 m_minorArrow(new QGraphicsItemGroup(item)),
54 m_shades(new QGraphicsItemGroup(item)),
54 m_shades(new QGraphicsItemGroup(item)),
55 m_labels(new QGraphicsItemGroup(item)),
55 m_labels(new QGraphicsItemGroup(item)),
56 m_title(new QGraphicsTextItem(item)),
56 m_title(new QGraphicsTextItem(item)),
57 m_intervalAxis(intervalAxis)
57 m_intervalAxis(intervalAxis)
58
58
59 {
59 {
60 //initial initialization
60 //initial initialization
61 m_arrow->setHandlesChildEvents(false);
61 m_arrow->setHandlesChildEvents(false);
62 m_arrow->setZValue(ChartPresenter::AxisZValue);
62 m_arrow->setZValue(ChartPresenter::AxisZValue);
63 m_minorArrow->setHandlesChildEvents(false);
63 m_minorArrow->setHandlesChildEvents(false);
64 m_minorArrow->setZValue(ChartPresenter::AxisZValue);
64 m_minorArrow->setZValue(ChartPresenter::AxisZValue);
65 m_labels->setZValue(ChartPresenter::AxisZValue);
65 m_labels->setZValue(ChartPresenter::AxisZValue);
66 m_shades->setZValue(ChartPresenter::ShadesZValue);
66 m_shades->setZValue(ChartPresenter::ShadesZValue);
67 m_grid->setZValue(ChartPresenter::GridZValue);
67 m_grid->setZValue(ChartPresenter::GridZValue);
68 m_minorGrid->setZValue(ChartPresenter::GridZValue);
68 m_minorGrid->setZValue(ChartPresenter::GridZValue);
69 m_title->setZValue(ChartPresenter::GridZValue);
69 m_title->setZValue(ChartPresenter::GridZValue);
70 m_title->document()->setDocumentMargin(ChartPresenter::textMargin());
70 m_title->document()->setDocumentMargin(ChartPresenter::textMargin());
71 handleVisibleChanged(axis->isVisible());
71 handleVisibleChanged(axis->isVisible());
72 connectSlots();
72 connectSlots();
73
73
74 setFlag(QGraphicsItem::ItemHasNoContents, true);
74 setFlag(QGraphicsItem::ItemHasNoContents, true);
75 }
75 }
76
76
77 ChartAxisElement::~ChartAxisElement()
77 ChartAxisElement::~ChartAxisElement()
78 {
78 {
79 }
79 }
80
80
81 void ChartAxisElement::connectSlots()
81 void ChartAxisElement::connectSlots()
82 {
82 {
83 QObject::connect(axis(), SIGNAL(visibleChanged(bool)), this, SLOT(handleVisibleChanged(bool)));
83 QObject::connect(axis(), SIGNAL(visibleChanged(bool)), this, SLOT(handleVisibleChanged(bool)));
84 QObject::connect(axis(), SIGNAL(lineVisibleChanged(bool)), this, SLOT(handleArrowVisibleChanged(bool)));
84 QObject::connect(axis(), SIGNAL(lineVisibleChanged(bool)), this, SLOT(handleArrowVisibleChanged(bool)));
85 QObject::connect(axis(), SIGNAL(gridVisibleChanged(bool)), this, SLOT(handleGridVisibleChanged(bool)));
85 QObject::connect(axis(), SIGNAL(gridVisibleChanged(bool)), this, SLOT(handleGridVisibleChanged(bool)));
86 QObject::connect(axis(), SIGNAL(labelsVisibleChanged(bool)), this, SLOT(handleLabelsVisibleChanged(bool)));
86 QObject::connect(axis(), SIGNAL(labelsVisibleChanged(bool)), this, SLOT(handleLabelsVisibleChanged(bool)));
87 QObject::connect(axis(), SIGNAL(shadesVisibleChanged(bool)), this, SLOT(handleShadesVisibleChanged(bool)));
87 QObject::connect(axis(), SIGNAL(shadesVisibleChanged(bool)), this, SLOT(handleShadesVisibleChanged(bool)));
88 QObject::connect(axis(), SIGNAL(labelsAngleChanged(int)), this, SLOT(handleLabelsAngleChanged(int)));
88 QObject::connect(axis(), SIGNAL(labelsAngleChanged(int)), this, SLOT(handleLabelsAngleChanged(int)));
89 QObject::connect(axis(), SIGNAL(linePenChanged(const QPen&)), this, SLOT(handleArrowPenChanged(const QPen&)));
89 QObject::connect(axis(), SIGNAL(linePenChanged(const QPen&)), this, SLOT(handleArrowPenChanged(const QPen&)));
90 QObject::connect(axis(), SIGNAL(labelsBrushChanged(const QBrush&)), this, SLOT(handleLabelsBrushChanged(const QBrush&)));
90 QObject::connect(axis(), SIGNAL(labelsBrushChanged(const QBrush&)), this, SLOT(handleLabelsBrushChanged(const QBrush&)));
91 QObject::connect(axis(), SIGNAL(labelsFontChanged(const QFont&)), this, SLOT(handleLabelsFontChanged(const QFont&)));
91 QObject::connect(axis(), SIGNAL(labelsFontChanged(const QFont&)), this, SLOT(handleLabelsFontChanged(const QFont&)));
92 QObject::connect(axis(), SIGNAL(gridLinePenChanged(const QPen&)), this, SLOT(handleGridPenChanged(const QPen&)));
92 QObject::connect(axis(), SIGNAL(gridLinePenChanged(const QPen&)), this, SLOT(handleGridPenChanged(const QPen&)));
93 QObject::connect(axis(), SIGNAL(shadesPenChanged(const QPen&)), this, SLOT(handleShadesPenChanged(const QPen&)));
93 QObject::connect(axis(), SIGNAL(shadesPenChanged(const QPen&)), this, SLOT(handleShadesPenChanged(const QPen&)));
94 QObject::connect(axis(), SIGNAL(shadesBrushChanged(const QBrush&)), this, SLOT(handleShadesBrushChanged(const QBrush&)));
94 QObject::connect(axis(), SIGNAL(shadesBrushChanged(const QBrush&)), this, SLOT(handleShadesBrushChanged(const QBrush&)));
95 QObject::connect(axis(), SIGNAL(titleTextChanged(const QString&)), this, SLOT(handleTitleTextChanged(const QString&)));
95 QObject::connect(axis(), SIGNAL(titleTextChanged(const QString&)), this, SLOT(handleTitleTextChanged(const QString&)));
96 QObject::connect(axis(), SIGNAL(titleFontChanged(const QFont&)), this, SLOT(handleTitleFontChanged(const QFont&)));
96 QObject::connect(axis(), SIGNAL(titleFontChanged(const QFont&)), this, SLOT(handleTitleFontChanged(const QFont&)));
97 QObject::connect(axis(), SIGNAL(titleBrushChanged(const QBrush&)), this, SLOT(handleTitleBrushChanged(const QBrush&)));
97 QObject::connect(axis(), SIGNAL(titleBrushChanged(const QBrush&)), this, SLOT(handleTitleBrushChanged(const QBrush&)));
98 QObject::connect(axis(), SIGNAL(titleVisibleChanged(bool)), this, SLOT(handleTitleVisibleChanged(bool)));
98 QObject::connect(axis(), SIGNAL(titleVisibleChanged(bool)), this, SLOT(handleTitleVisibleChanged(bool)));
99 QObject::connect(axis()->d_ptr.data(), SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(handleRangeChanged(qreal, qreal)));
99 QObject::connect(axis()->d_ptr.data(), SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(handleRangeChanged(qreal, qreal)));
100 QObject::connect(axis(), SIGNAL(reverseChanged(bool)), this, SLOT(handleReverseChanged(bool)));
100 QObject::connect(axis(), SIGNAL(reverseChanged(bool)), this, SLOT(handleReverseChanged(bool)));
101 QObject::connect(axis(), SIGNAL(lineVisibleChanged(bool)),
101 QObject::connect(axis(), SIGNAL(lineVisibleChanged(bool)),
102 this, SLOT(handleMinorArrowVisibleChanged(bool)));
102 this, SLOT(handleMinorArrowVisibleChanged(bool)));
103 QObject::connect(axis(), SIGNAL(linePenChanged(const QPen&)), this,
103 QObject::connect(axis(), SIGNAL(linePenChanged(const QPen&)), this,
104 SLOT(handleMinorArrowPenChanged(const QPen&)));
104 SLOT(handleMinorArrowPenChanged(const QPen&)));
105 QObject::connect(axis(), SIGNAL(minorGridVisibleChanged(bool)),
105 QObject::connect(axis(), SIGNAL(minorGridVisibleChanged(bool)),
106 this, SLOT(handleMinorGridVisibleChanged(bool)));
106 this, SLOT(handleMinorGridVisibleChanged(bool)));
107 QObject::connect(axis(), SIGNAL(minorGridLinePenChanged(const QPen&)),
107 QObject::connect(axis(), SIGNAL(minorGridLinePenChanged(const QPen&)),
108 this, SLOT(handleMinorGridPenChanged(const QPen&)));
108 this, SLOT(handleMinorGridPenChanged(const QPen&)));
109 QObject::connect(axis(), SIGNAL(gridLineColorChanged(const QColor&)),
110 this, SLOT(handleGridLineColorChanged(const QColor&)));
111 QObject::connect(axis(), SIGNAL(minorGridLineColorChanged(const QColor&)),
112 this, SLOT(handleMinorGridLineColorChanged(const QColor&)));
109
113
110 if (axis()->type() == QAbstractAxis::AxisTypeCategory) {
114 if (axis()->type() == QAbstractAxis::AxisTypeCategory) {
111 QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
115 QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
112 QObject::connect(categoryAxis,
116 QObject::connect(categoryAxis,
113 SIGNAL(labelsPositionChanged(QCategoryAxis::AxisLabelsPosition)),
117 SIGNAL(labelsPositionChanged(QCategoryAxis::AxisLabelsPosition)),
114 this, SLOT(handleLabelsPositionChanged()));
118 this, SLOT(handleLabelsPositionChanged()));
115 }
119 }
116 }
120 }
117
121
118 void ChartAxisElement::handleArrowVisibleChanged(bool visible)
122 void ChartAxisElement::handleArrowVisibleChanged(bool visible)
119 {
123 {
120 m_arrow->setVisible(visible);
124 m_arrow->setVisible(visible);
121 }
125 }
122
126
123 void ChartAxisElement::handleMinorArrowVisibleChanged(bool visible)
127 void ChartAxisElement::handleMinorArrowVisibleChanged(bool visible)
124 {
128 {
125 m_minorArrow->setVisible(visible);
129 m_minorArrow->setVisible(visible);
126 }
130 }
127
131
128 void ChartAxisElement::handleGridVisibleChanged(bool visible)
132 void ChartAxisElement::handleGridVisibleChanged(bool visible)
129 {
133 {
130 m_grid->setVisible(visible);
134 m_grid->setVisible(visible);
131 }
135 }
132
136
133 void ChartAxisElement::handleMinorGridVisibleChanged(bool visible)
137 void ChartAxisElement::handleMinorGridVisibleChanged(bool visible)
134 {
138 {
135 m_minorGrid->setVisible(visible);
139 m_minorGrid->setVisible(visible);
136 }
140 }
137
141
138 void ChartAxisElement::handleLabelsPositionChanged()
142 void ChartAxisElement::handleLabelsPositionChanged()
139 {
143 {
140 QGraphicsLayoutItem::updateGeometry();
144 QGraphicsLayoutItem::updateGeometry();
141 presenter()->layout()->invalidate();
145 presenter()->layout()->invalidate();
142 }
146 }
143
147
144 void ChartAxisElement::handleLabelsVisibleChanged(bool visible)
148 void ChartAxisElement::handleLabelsVisibleChanged(bool visible)
145 {
149 {
146 QGraphicsLayoutItem::updateGeometry();
150 QGraphicsLayoutItem::updateGeometry();
147 presenter()->layout()->invalidate();
151 presenter()->layout()->invalidate();
148 m_labels->setVisible(visible);
152 m_labels->setVisible(visible);
149 }
153 }
150
154
151 void ChartAxisElement::handleShadesVisibleChanged(bool visible)
155 void ChartAxisElement::handleShadesVisibleChanged(bool visible)
152 {
156 {
153 m_shades->setVisible(visible);
157 m_shades->setVisible(visible);
154 }
158 }
155
159
156 void ChartAxisElement::handleTitleVisibleChanged(bool visible)
160 void ChartAxisElement::handleTitleVisibleChanged(bool visible)
157 {
161 {
158 QGraphicsLayoutItem::updateGeometry();
162 QGraphicsLayoutItem::updateGeometry();
159 presenter()->layout()->invalidate();
163 presenter()->layout()->invalidate();
160 m_title->setVisible(visible);
164 m_title->setVisible(visible);
161 }
165 }
162
166
163 void ChartAxisElement::handleLabelsAngleChanged(int angle)
167 void ChartAxisElement::handleLabelsAngleChanged(int angle)
164 {
168 {
165 foreach (QGraphicsItem *item, m_labels->childItems())
169 foreach (QGraphicsItem *item, m_labels->childItems())
166 item->setRotation(angle);
170 item->setRotation(angle);
167
171
168 QGraphicsLayoutItem::updateGeometry();
172 QGraphicsLayoutItem::updateGeometry();
169 presenter()->layout()->invalidate();
173 presenter()->layout()->invalidate();
170 }
174 }
171
175
172 void ChartAxisElement::handleLabelsBrushChanged(const QBrush &brush)
176 void ChartAxisElement::handleLabelsBrushChanged(const QBrush &brush)
173 {
177 {
174 foreach (QGraphicsItem *item, m_labels->childItems())
178 foreach (QGraphicsItem *item, m_labels->childItems())
175 static_cast<QGraphicsTextItem *>(item)->setDefaultTextColor(brush.color());
179 static_cast<QGraphicsTextItem *>(item)->setDefaultTextColor(brush.color());
176 }
180 }
177
181
178 void ChartAxisElement::handleLabelsFontChanged(const QFont &font)
182 void ChartAxisElement::handleLabelsFontChanged(const QFont &font)
179 {
183 {
180 foreach (QGraphicsItem *item, m_labels->childItems())
184 foreach (QGraphicsItem *item, m_labels->childItems())
181 static_cast<QGraphicsTextItem *>(item)->setFont(font);
185 static_cast<QGraphicsTextItem *>(item)->setFont(font);
182 QGraphicsLayoutItem::updateGeometry();
186 QGraphicsLayoutItem::updateGeometry();
183 presenter()->layout()->invalidate();
187 presenter()->layout()->invalidate();
184 }
188 }
185
189
186 void ChartAxisElement::handleTitleTextChanged(const QString &title)
190 void ChartAxisElement::handleTitleTextChanged(const QString &title)
187 {
191 {
188 QGraphicsLayoutItem::updateGeometry();
192 QGraphicsLayoutItem::updateGeometry();
189 presenter()->layout()->invalidate();
193 presenter()->layout()->invalidate();
190 if (title.isEmpty() || !m_title->isVisible())
194 if (title.isEmpty() || !m_title->isVisible())
191 m_title->setHtml(title);
195 m_title->setHtml(title);
192 }
196 }
193
197
194 void ChartAxisElement::handleTitleBrushChanged(const QBrush &brush)
198 void ChartAxisElement::handleTitleBrushChanged(const QBrush &brush)
195 {
199 {
196 m_title->setDefaultTextColor(brush.color());
200 m_title->setDefaultTextColor(brush.color());
197 }
201 }
198
202
199 void ChartAxisElement::handleTitleFontChanged(const QFont &font)
203 void ChartAxisElement::handleTitleFontChanged(const QFont &font)
200 {
204 {
201 if (m_title->font() != font) {
205 if (m_title->font() != font) {
202 m_title->setFont(font);
206 m_title->setFont(font);
203 QGraphicsLayoutItem::updateGeometry();
207 QGraphicsLayoutItem::updateGeometry();
204 presenter()->layout()->invalidate();
208 presenter()->layout()->invalidate();
205 }
209 }
206 }
210 }
207
211
208 void ChartAxisElement::handleVisibleChanged(bool visible)
212 void ChartAxisElement::handleVisibleChanged(bool visible)
209 {
213 {
210 setVisible(visible);
214 setVisible(visible);
211 if (!visible) {
215 if (!visible) {
212 m_grid->setVisible(visible);
216 m_grid->setVisible(visible);
213 m_arrow->setVisible(visible);
217 m_arrow->setVisible(visible);
214 m_minorGrid->setVisible(visible);
218 m_minorGrid->setVisible(visible);
215 m_minorArrow->setVisible(visible);
219 m_minorArrow->setVisible(visible);
216 m_shades->setVisible(visible);
220 m_shades->setVisible(visible);
217 m_labels->setVisible(visible);
221 m_labels->setVisible(visible);
218 m_title->setVisible(visible);
222 m_title->setVisible(visible);
219 } else {
223 } else {
220 m_grid->setVisible(axis()->isGridLineVisible());
224 m_grid->setVisible(axis()->isGridLineVisible());
221 m_arrow->setVisible(axis()->isLineVisible());
225 m_arrow->setVisible(axis()->isLineVisible());
222 m_minorGrid->setVisible(axis()->isMinorGridLineVisible());
226 m_minorGrid->setVisible(axis()->isMinorGridLineVisible());
223 m_minorArrow->setVisible(axis()->isLineVisible());
227 m_minorArrow->setVisible(axis()->isLineVisible());
224 m_shades->setVisible(axis()->shadesVisible());
228 m_shades->setVisible(axis()->shadesVisible());
225 m_labels->setVisible(axis()->labelsVisible());
229 m_labels->setVisible(axis()->labelsVisible());
226 m_title->setVisible(axis()->isTitleVisible());
230 m_title->setVisible(axis()->isTitleVisible());
227 }
231 }
228
232
229 if (presenter()) presenter()->layout()->invalidate();
233 if (presenter()) presenter()->layout()->invalidate();
230 }
234 }
231
235
232 void ChartAxisElement::handleRangeChanged(qreal min, qreal max)
236 void ChartAxisElement::handleRangeChanged(qreal min, qreal max)
233 {
237 {
234 Q_UNUSED(min);
238 Q_UNUSED(min);
235 Q_UNUSED(max);
239 Q_UNUSED(max);
236
240
237 if (!isEmpty()) {
241 if (!isEmpty()) {
238 QVector<qreal> layout = calculateLayout();
242 QVector<qreal> layout = calculateLayout();
239 updateLayout(layout);
243 updateLayout(layout);
240 QSizeF before = effectiveSizeHint(Qt::PreferredSize);
244 QSizeF before = effectiveSizeHint(Qt::PreferredSize);
241 QSizeF after = sizeHint(Qt::PreferredSize);
245 QSizeF after = sizeHint(Qt::PreferredSize);
242
246
243 if (before != after) {
247 if (before != after) {
244 QGraphicsLayoutItem::updateGeometry();
248 QGraphicsLayoutItem::updateGeometry();
245 // We don't want to call invalidate on layout, since it will change minimum size of
249 // We don't want to call invalidate on layout, since it will change minimum size of
246 // component, which we would like to avoid since it causes nasty flips when scrolling
250 // component, which we would like to avoid since it causes nasty flips when scrolling
247 // or zooming, instead recalculate layout and use plotArea for extra space.
251 // or zooming, instead recalculate layout and use plotArea for extra space.
248 presenter()->layout()->setGeometry(presenter()->layout()->geometry());
252 presenter()->layout()->setGeometry(presenter()->layout()->geometry());
249 }
253 }
250 }
254 }
251 }
255 }
252
256
253 void ChartAxisElement::handleReverseChanged(bool reverse)
257 void ChartAxisElement::handleReverseChanged(bool reverse)
254 {
258 {
255 Q_UNUSED(reverse);
259 Q_UNUSED(reverse);
256
260
257 QGraphicsLayoutItem::updateGeometry();
261 QGraphicsLayoutItem::updateGeometry();
258 presenter()->layout()->invalidate();
262 presenter()->layout()->invalidate();
259 }
263 }
260
264
261 bool ChartAxisElement::isEmpty()
265 bool ChartAxisElement::isEmpty()
262 {
266 {
263 return axisGeometry().isEmpty()
267 return axisGeometry().isEmpty()
264 || gridGeometry().isEmpty()
268 || gridGeometry().isEmpty()
265 || qFuzzyCompare(min(), max());
269 || qFuzzyCompare(min(), max());
266 }
270 }
267
271
268 qreal ChartAxisElement::min() const
272 qreal ChartAxisElement::min() const
269 {
273 {
270 return m_axis->d_ptr->min();
274 return m_axis->d_ptr->min();
271 }
275 }
272
276
273 qreal ChartAxisElement::max() const
277 qreal ChartAxisElement::max() const
274 {
278 {
275 return m_axis->d_ptr->max();
279 return m_axis->d_ptr->max();
276 }
280 }
277
281
278 QString ChartAxisElement::formatLabel(const QString &formatSpec, const QByteArray &array,
282 QString ChartAxisElement::formatLabel(const QString &formatSpec, const QByteArray &array,
279 qreal value, int precision, const QString &preStr,
283 qreal value, int precision, const QString &preStr,
280 const QString &postStr) const
284 const QString &postStr) const
281 {
285 {
282 QString retVal;
286 QString retVal;
283 if (!formatSpec.isEmpty()) {
287 if (!formatSpec.isEmpty()) {
284 if (formatSpec.at(0) == QLatin1Char('d')
288 if (formatSpec.at(0) == QLatin1Char('d')
285 || formatSpec.at(0) == QLatin1Char('i')
289 || formatSpec.at(0) == QLatin1Char('i')
286 || formatSpec.at(0) == QLatin1Char('c')) {
290 || formatSpec.at(0) == QLatin1Char('c')) {
287 if (presenter()->localizeNumbers())
291 if (presenter()->localizeNumbers())
288 retVal = preStr + presenter()->locale().toString(qint64(value)) + postStr;
292 retVal = preStr + presenter()->locale().toString(qint64(value)) + postStr;
289 else
293 else
290 retVal = QString().sprintf(array, qint64(value));
294 retVal = QString().sprintf(array, qint64(value));
291 } else if (formatSpec.at(0) == QLatin1Char('u')
295 } else if (formatSpec.at(0) == QLatin1Char('u')
292 || formatSpec.at(0) == QLatin1Char('o')
296 || formatSpec.at(0) == QLatin1Char('o')
293 || formatSpec.at(0) == QLatin1Char('x')
297 || formatSpec.at(0) == QLatin1Char('x')
294 || formatSpec.at(0) == QLatin1Char('X')) {
298 || formatSpec.at(0) == QLatin1Char('X')) {
295 // These formats are not supported by localized numbers
299 // These formats are not supported by localized numbers
296 retVal = QString().sprintf(array, quint64(value));
300 retVal = QString().sprintf(array, quint64(value));
297 } else if (formatSpec.at(0) == QLatin1Char('f')
301 } else if (formatSpec.at(0) == QLatin1Char('f')
298 || formatSpec.at(0) == QLatin1Char('F')
302 || formatSpec.at(0) == QLatin1Char('F')
299 || formatSpec.at(0) == QLatin1Char('e')
303 || formatSpec.at(0) == QLatin1Char('e')
300 || formatSpec.at(0) == QLatin1Char('E')
304 || formatSpec.at(0) == QLatin1Char('E')
301 || formatSpec.at(0) == QLatin1Char('g')
305 || formatSpec.at(0) == QLatin1Char('g')
302 || formatSpec.at(0) == QLatin1Char('G')) {
306 || formatSpec.at(0) == QLatin1Char('G')) {
303 if (presenter()->localizeNumbers()) {
307 if (presenter()->localizeNumbers()) {
304 retVal = preStr
308 retVal = preStr
305 + presenter()->locale().toString(value, formatSpec.at(0).toLatin1(),
309 + presenter()->locale().toString(value, formatSpec.at(0).toLatin1(),
306 precision)
310 precision)
307 + postStr;
311 + postStr;
308 } else {
312 } else {
309 retVal = QString().sprintf(array, value);
313 retVal = QString().sprintf(array, value);
310 }
314 }
311 }
315 }
312 }
316 }
313 return retVal;
317 return retVal;
314 }
318 }
315
319
316 QStringList ChartAxisElement::createValueLabels(qreal min, qreal max, int ticks,
320 QStringList ChartAxisElement::createValueLabels(qreal min, qreal max, int ticks,
317 const QString &format) const
321 const QString &format) const
318 {
322 {
319 QStringList labels;
323 QStringList labels;
320
324
321 if (max <= min || ticks < 1)
325 if (max <= min || ticks < 1)
322 return labels;
326 return labels;
323
327
324 if (format.isNull()) {
328 if (format.isNull()) {
325 int n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0) + 1;
329 int n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0) + 1;
326 for (int i = 0; i < ticks; i++) {
330 for (int i = 0; i < ticks; i++) {
327 qreal value = min + (i * (max - min) / (ticks - 1));
331 qreal value = min + (i * (max - min) / (ticks - 1));
328 labels << presenter()->numberToString(value, 'f', n);
332 labels << presenter()->numberToString(value, 'f', n);
329 }
333 }
330 } else {
334 } else {
331 QByteArray array = format.toLatin1();
335 QByteArray array = format.toLatin1();
332 QString formatSpec;
336 QString formatSpec;
333 QString preStr;
337 QString preStr;
334 QString postStr;
338 QString postStr;
335 int precision = 6; // Six is the default precision in Qt API
339 int precision = 6; // Six is the default precision in Qt API
336 if (presenter()->localizeNumbers()) {
340 if (presenter()->localizeNumbers()) {
337 if (!labelFormatMatcherLocalized)
341 if (!labelFormatMatcherLocalized)
338 labelFormatMatcherLocalized
342 labelFormatMatcherLocalized
339 = new QRegExp(QString::fromLatin1(labelFormatMatchLocalizedString));
343 = new QRegExp(QString::fromLatin1(labelFormatMatchLocalizedString));
340 if (labelFormatMatcherLocalized->indexIn(format, 0) != -1) {
344 if (labelFormatMatcherLocalized->indexIn(format, 0) != -1) {
341 preStr = labelFormatMatcherLocalized->cap(1);
345 preStr = labelFormatMatcherLocalized->cap(1);
342 if (!labelFormatMatcherLocalized->cap(2).isEmpty())
346 if (!labelFormatMatcherLocalized->cap(2).isEmpty())
343 precision = labelFormatMatcherLocalized->cap(2).toInt();
347 precision = labelFormatMatcherLocalized->cap(2).toInt();
344 formatSpec = labelFormatMatcherLocalized->cap(3);
348 formatSpec = labelFormatMatcherLocalized->cap(3);
345 postStr = labelFormatMatcherLocalized->cap(4);
349 postStr = labelFormatMatcherLocalized->cap(4);
346 }
350 }
347 } else {
351 } else {
348 if (!labelFormatMatcher)
352 if (!labelFormatMatcher)
349 labelFormatMatcher = new QRegExp(QString::fromLatin1(labelFormatMatchString));
353 labelFormatMatcher = new QRegExp(QString::fromLatin1(labelFormatMatchString));
350 if (labelFormatMatcher->indexIn(format, 0) != -1)
354 if (labelFormatMatcher->indexIn(format, 0) != -1)
351 formatSpec = labelFormatMatcher->cap(1);
355 formatSpec = labelFormatMatcher->cap(1);
352 }
356 }
353 for (int i = 0; i < ticks; i++) {
357 for (int i = 0; i < ticks; i++) {
354 qreal value = min + (i * (max - min) / (ticks - 1));
358 qreal value = min + (i * (max - min) / (ticks - 1));
355 labels << formatLabel(formatSpec, array, value, precision, preStr, postStr);
359 labels << formatLabel(formatSpec, array, value, precision, preStr, postStr);
356 }
360 }
357 }
361 }
358
362
359 return labels;
363 return labels;
360 }
364 }
361
365
362 QStringList ChartAxisElement::createLogValueLabels(qreal min, qreal max, qreal base, int ticks,
366 QStringList ChartAxisElement::createLogValueLabels(qreal min, qreal max, qreal base, int ticks,
363 const QString &format) const
367 const QString &format) const
364 {
368 {
365 QStringList labels;
369 QStringList labels;
366
370
367 if (max <= min || ticks < 1)
371 if (max <= min || ticks < 1)
368 return labels;
372 return labels;
369
373
370 int firstTick;
374 int firstTick;
371 if (base > 1)
375 if (base > 1)
372 firstTick = qCeil(std::log10(min) / std::log10(base));
376 firstTick = qCeil(std::log10(min) / std::log10(base));
373 else
377 else
374 firstTick = qCeil(std::log10(max) / std::log10(base));
378 firstTick = qCeil(std::log10(max) / std::log10(base));
375
379
376 if (format.isNull()) {
380 if (format.isNull()) {
377 int n = 0;
381 int n = 0;
378 if (ticks > 1)
382 if (ticks > 1)
379 n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0);
383 n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0);
380 n++;
384 n++;
381 for (int i = firstTick; i < ticks + firstTick; i++) {
385 for (int i = firstTick; i < ticks + firstTick; i++) {
382 qreal value = qPow(base, i);
386 qreal value = qPow(base, i);
383 labels << presenter()->numberToString(value, 'f', n);
387 labels << presenter()->numberToString(value, 'f', n);
384 }
388 }
385 } else {
389 } else {
386 QByteArray array = format.toLatin1();
390 QByteArray array = format.toLatin1();
387 QString formatSpec;
391 QString formatSpec;
388 QString preStr;
392 QString preStr;
389 QString postStr;
393 QString postStr;
390 int precision = 6; // Six is the default precision in Qt API
394 int precision = 6; // Six is the default precision in Qt API
391 if (presenter()->localizeNumbers()) {
395 if (presenter()->localizeNumbers()) {
392 if (!labelFormatMatcherLocalized)
396 if (!labelFormatMatcherLocalized)
393 labelFormatMatcherLocalized =
397 labelFormatMatcherLocalized =
394 new QRegExp(QString::fromLatin1(labelFormatMatchLocalizedString));
398 new QRegExp(QString::fromLatin1(labelFormatMatchLocalizedString));
395 if (labelFormatMatcherLocalized->indexIn(format, 0) != -1) {
399 if (labelFormatMatcherLocalized->indexIn(format, 0) != -1) {
396 preStr = labelFormatMatcherLocalized->cap(1);
400 preStr = labelFormatMatcherLocalized->cap(1);
397 if (!labelFormatMatcherLocalized->cap(2).isEmpty())
401 if (!labelFormatMatcherLocalized->cap(2).isEmpty())
398 precision = labelFormatMatcherLocalized->cap(2).toInt();
402 precision = labelFormatMatcherLocalized->cap(2).toInt();
399 formatSpec = labelFormatMatcherLocalized->cap(3);
403 formatSpec = labelFormatMatcherLocalized->cap(3);
400 postStr = labelFormatMatcherLocalized->cap(4);
404 postStr = labelFormatMatcherLocalized->cap(4);
401 }
405 }
402 } else {
406 } else {
403 if (!labelFormatMatcher)
407 if (!labelFormatMatcher)
404 labelFormatMatcher = new QRegExp(QString::fromLatin1(labelFormatMatchString));
408 labelFormatMatcher = new QRegExp(QString::fromLatin1(labelFormatMatchString));
405 if (labelFormatMatcher->indexIn(format, 0) != -1)
409 if (labelFormatMatcher->indexIn(format, 0) != -1)
406 formatSpec = labelFormatMatcher->cap(1);
410 formatSpec = labelFormatMatcher->cap(1);
407 }
411 }
408 for (int i = firstTick; i < ticks + firstTick; i++) {
412 for (int i = firstTick; i < ticks + firstTick; i++) {
409 qreal value = qPow(base, i);
413 qreal value = qPow(base, i);
410 labels << formatLabel(formatSpec, array, value, precision, preStr, postStr);
414 labels << formatLabel(formatSpec, array, value, precision, preStr, postStr);
411 }
415 }
412 }
416 }
413
417
414 return labels;
418 return labels;
415 }
419 }
416
420
417 QStringList ChartAxisElement::createDateTimeLabels(qreal min, qreal max,int ticks,
421 QStringList ChartAxisElement::createDateTimeLabels(qreal min, qreal max,int ticks,
418 const QString &format) const
422 const QString &format) const
419 {
423 {
420 QStringList labels;
424 QStringList labels;
421
425
422 if (max <= min || ticks < 1)
426 if (max <= min || ticks < 1)
423 return labels;
427 return labels;
424
428
425 int n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0);
429 int n = qMax(int(-qFloor(std::log10((max - min) / (ticks - 1)))), 0);
426 n++;
430 n++;
427 for (int i = 0; i < ticks; i++) {
431 for (int i = 0; i < ticks; i++) {
428 qreal value = min + (i * (max - min) / (ticks - 1));
432 qreal value = min + (i * (max - min) / (ticks - 1));
429 labels << presenter()->locale().toString(QDateTime::fromMSecsSinceEpoch(value), format);
433 labels << presenter()->locale().toString(QDateTime::fromMSecsSinceEpoch(value), format);
430 }
434 }
431 return labels;
435 return labels;
432 }
436 }
433
437
434 void ChartAxisElement::axisSelected()
438 void ChartAxisElement::axisSelected()
435 {
439 {
436 emit clicked();
440 emit clicked();
437 }
441 }
438
442
439 #include "moc_chartaxiselement_p.cpp"
443 #include "moc_chartaxiselement_p.cpp"
440
444
441 QT_CHARTS_END_NAMESPACE
445 QT_CHARTS_END_NAMESPACE
@@ -1,163 +1,165
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 // W A R N I N G
19 // W A R N I N G
20 // -------------
20 // -------------
21 //
21 //
22 // This file is not part of the Qt Chart API. It exists purely as an
22 // This file is not part of the Qt Chart API. It exists purely as an
23 // implementation detail. This header file may change from version to
23 // implementation detail. This header file may change from version to
24 // version without notice, or even be removed.
24 // version without notice, or even be removed.
25 //
25 //
26 // We mean it.
26 // We mean it.
27
27
28 #ifndef CHARTAXISELEMENT_H
28 #ifndef CHARTAXISELEMENT_H
29 #define CHARTAXISELEMENT_H
29 #define CHARTAXISELEMENT_H
30
30
31 #include <QtCharts/QChartGlobal>
31 #include <QtCharts/QChartGlobal>
32 #include <private/chartelement_p.h>
32 #include <private/chartelement_p.h>
33 #include <private/axisanimation_p.h>
33 #include <private/axisanimation_p.h>
34 #include <QtWidgets/QGraphicsItem>
34 #include <QtWidgets/QGraphicsItem>
35 #include <QtWidgets/QGraphicsLayoutItem>
35 #include <QtWidgets/QGraphicsLayoutItem>
36 #include <QtGui/QFont>
36 #include <QtGui/QFont>
37
37
38 QT_CHARTS_BEGIN_NAMESPACE
38 QT_CHARTS_BEGIN_NAMESPACE
39
39
40 class ChartPresenter;
40 class ChartPresenter;
41 class QAbstractAxis;
41 class QAbstractAxis;
42
42
43 class ChartAxisElement : public ChartElement, public QGraphicsLayoutItem
43 class ChartAxisElement : public ChartElement, public QGraphicsLayoutItem
44 {
44 {
45 Q_OBJECT
45 Q_OBJECT
46
46
47 using QGraphicsLayoutItem::setGeometry;
47 using QGraphicsLayoutItem::setGeometry;
48 public:
48 public:
49 ChartAxisElement(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
49 ChartAxisElement(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
50 ~ChartAxisElement();
50 ~ChartAxisElement();
51
51
52 virtual QRectF gridGeometry() const = 0;
52 virtual QRectF gridGeometry() const = 0;
53 virtual void setGeometry(const QRectF &axis, const QRectF &grid) = 0;
53 virtual void setGeometry(const QRectF &axis, const QRectF &grid) = 0;
54 virtual bool isEmpty() = 0;
54 virtual bool isEmpty() = 0;
55
55
56 void setAnimation(AxisAnimation *animation) { m_animation = animation; }
56 void setAnimation(AxisAnimation *animation) { m_animation = animation; }
57 AxisAnimation *animation() const { return m_animation; }
57 AxisAnimation *animation() const { return m_animation; }
58
58
59 QAbstractAxis *axis() const { return m_axis; }
59 QAbstractAxis *axis() const { return m_axis; }
60 void setLayout(QVector<qreal> &layout) { m_layout = layout; }
60 void setLayout(QVector<qreal> &layout) { m_layout = layout; }
61 QVector<qreal> &layout() { return m_layout; } // Modifiable reference
61 QVector<qreal> &layout() { return m_layout; } // Modifiable reference
62 inline qreal labelPadding() const { return qreal(4.0); }
62 inline qreal labelPadding() const { return qreal(4.0); }
63 inline qreal titlePadding() const { return qreal(2.0); }
63 inline qreal titlePadding() const { return qreal(2.0); }
64 void setLabels(const QStringList &labels) { m_labelsList = labels; }
64 void setLabels(const QStringList &labels) { m_labelsList = labels; }
65 QStringList labels() const { return m_labelsList; }
65 QStringList labels() const { return m_labelsList; }
66
66
67 qreal min() const;
67 qreal min() const;
68 qreal max() const;
68 qreal max() const;
69
69
70 QRectF axisGeometry() const { return m_axisRect; }
70 QRectF axisGeometry() const { return m_axisRect; }
71 void setAxisGeometry(const QRectF &axisGeometry) { m_axisRect = axisGeometry; }
71 void setAxisGeometry(const QRectF &axisGeometry) { m_axisRect = axisGeometry; }
72
72
73 void axisSelected();
73 void axisSelected();
74
74
75 //this flag indicates that axis is used to show intervals it means labels are in between ticks
75 //this flag indicates that axis is used to show intervals it means labels are in between ticks
76 bool intervalAxis() const { return m_intervalAxis; }
76 bool intervalAxis() const { return m_intervalAxis; }
77
77
78 QStringList createValueLabels(qreal max, qreal min, int ticks, const QString &format) const;
78 QStringList createValueLabels(qreal max, qreal min, int ticks, const QString &format) const;
79 QStringList createLogValueLabels(qreal min, qreal max, qreal base, int ticks,
79 QStringList createLogValueLabels(qreal min, qreal max, qreal base, int ticks,
80 const QString &format) const;
80 const QString &format) const;
81 QStringList createDateTimeLabels(qreal max, qreal min, int ticks, const QString &format) const;
81 QStringList createDateTimeLabels(qreal max, qreal min, int ticks, const QString &format) const;
82
82
83 // from QGraphicsLayoutItem
83 // from QGraphicsLayoutItem
84 QRectF boundingRect() const
84 QRectF boundingRect() const
85 {
85 {
86 return QRectF();
86 return QRectF();
87 }
87 }
88
88
89 // from QGraphicsLayoutItem
89 // from QGraphicsLayoutItem
90 void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*)
90 void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*)
91 {
91 {
92 }
92 }
93
93
94 protected:
94 protected:
95 virtual QVector<qreal> calculateLayout() const = 0;
95 virtual QVector<qreal> calculateLayout() const = 0;
96 virtual void updateLayout(QVector<qreal> &layout) = 0;
96 virtual void updateLayout(QVector<qreal> &layout) = 0;
97
97
98 QList<QGraphicsItem *> gridItems() { return m_grid->childItems(); }
98 QList<QGraphicsItem *> gridItems() { return m_grid->childItems(); }
99 QList<QGraphicsItem *> minorGridItems() { return m_minorGrid->childItems(); }
99 QList<QGraphicsItem *> minorGridItems() { return m_minorGrid->childItems(); }
100 QList<QGraphicsItem *> labelItems() { return m_labels->childItems(); }
100 QList<QGraphicsItem *> labelItems() { return m_labels->childItems(); }
101 QList<QGraphicsItem *> shadeItems() { return m_shades->childItems(); }
101 QList<QGraphicsItem *> shadeItems() { return m_shades->childItems(); }
102 QList<QGraphicsItem *> arrowItems() { return m_arrow->childItems(); }
102 QList<QGraphicsItem *> arrowItems() { return m_arrow->childItems(); }
103 QList<QGraphicsItem *> minorArrowItems() { return m_minorArrow->childItems(); }
103 QList<QGraphicsItem *> minorArrowItems() { return m_minorArrow->childItems(); }
104 QGraphicsTextItem *titleItem() const { return m_title.data(); }
104 QGraphicsTextItem *titleItem() const { return m_title.data(); }
105 QGraphicsItemGroup *gridGroup() { return m_grid.data(); }
105 QGraphicsItemGroup *gridGroup() { return m_grid.data(); }
106 QGraphicsItemGroup *minorGridGroup() { return m_minorGrid.data(); }
106 QGraphicsItemGroup *minorGridGroup() { return m_minorGrid.data(); }
107 QGraphicsItemGroup *labelGroup() { return m_labels.data(); }
107 QGraphicsItemGroup *labelGroup() { return m_labels.data(); }
108 QGraphicsItemGroup *shadeGroup() { return m_shades.data(); }
108 QGraphicsItemGroup *shadeGroup() { return m_shades.data(); }
109 QGraphicsItemGroup *arrowGroup() { return m_arrow.data(); }
109 QGraphicsItemGroup *arrowGroup() { return m_arrow.data(); }
110 QGraphicsItemGroup *minorArrowGroup() { return m_minorArrow.data(); }
110 QGraphicsItemGroup *minorArrowGroup() { return m_minorArrow.data(); }
111
111
112 public Q_SLOTS:
112 public Q_SLOTS:
113 void handleVisibleChanged(bool visible);
113 void handleVisibleChanged(bool visible);
114 void handleArrowVisibleChanged(bool visible);
114 void handleArrowVisibleChanged(bool visible);
115 void handleGridVisibleChanged(bool visible);
115 void handleGridVisibleChanged(bool visible);
116 void handleLabelsVisibleChanged(bool visible);
116 void handleLabelsVisibleChanged(bool visible);
117 void handleShadesVisibleChanged(bool visible);
117 void handleShadesVisibleChanged(bool visible);
118 void handleLabelsAngleChanged(int angle);
118 void handleLabelsAngleChanged(int angle);
119 virtual void handleShadesBrushChanged(const QBrush &brush) = 0;
119 virtual void handleShadesBrushChanged(const QBrush &brush) = 0;
120 virtual void handleShadesPenChanged(const QPen &pen) = 0;
120 virtual void handleShadesPenChanged(const QPen &pen) = 0;
121 virtual void handleArrowPenChanged(const QPen &pen) = 0;
121 virtual void handleArrowPenChanged(const QPen &pen) = 0;
122 virtual void handleGridPenChanged(const QPen &pen) = 0;
122 virtual void handleGridPenChanged(const QPen &pen) = 0;
123 virtual void handleMinorArrowPenChanged(const QPen &pen) = 0;
123 virtual void handleMinorArrowPenChanged(const QPen &pen) = 0;
124 virtual void handleMinorGridPenChanged(const QPen &pen) = 0;
124 virtual void handleMinorGridPenChanged(const QPen &pen) = 0;
125 virtual void handleMinorGridLineColorChanged(const QColor &color) = 0;
126 virtual void handleGridLineColorChanged(const QColor &color) = 0;
125 void handleLabelsBrushChanged(const QBrush &brush);
127 void handleLabelsBrushChanged(const QBrush &brush);
126 void handleLabelsFontChanged(const QFont &font);
128 void handleLabelsFontChanged(const QFont &font);
127 void handleTitleBrushChanged(const QBrush &brush);
129 void handleTitleBrushChanged(const QBrush &brush);
128 void handleTitleFontChanged(const QFont &font);
130 void handleTitleFontChanged(const QFont &font);
129 void handleTitleTextChanged(const QString &title);
131 void handleTitleTextChanged(const QString &title);
130 void handleTitleVisibleChanged(bool visible);
132 void handleTitleVisibleChanged(bool visible);
131 void handleRangeChanged(qreal min, qreal max);
133 void handleRangeChanged(qreal min, qreal max);
132 void handleReverseChanged(bool reverse);
134 void handleReverseChanged(bool reverse);
133 void handleMinorArrowVisibleChanged(bool visible);
135 void handleMinorArrowVisibleChanged(bool visible);
134 void handleMinorGridVisibleChanged(bool visible);
136 void handleMinorGridVisibleChanged(bool visible);
135 void handleLabelsPositionChanged();
137 void handleLabelsPositionChanged();
136
138
137 Q_SIGNALS:
139 Q_SIGNALS:
138 void clicked();
140 void clicked();
139
141
140 private:
142 private:
141 void connectSlots();
143 void connectSlots();
142 QString formatLabel(const QString &formatSpec, const QByteArray &array,
144 QString formatLabel(const QString &formatSpec, const QByteArray &array,
143 qreal value, int precision, const QString &preStr,
145 qreal value, int precision, const QString &preStr,
144 const QString &postStr) const;
146 const QString &postStr) const;
145
147
146 QAbstractAxis *m_axis;
148 QAbstractAxis *m_axis;
147 AxisAnimation *m_animation;
149 AxisAnimation *m_animation;
148 QVector<qreal> m_layout;
150 QVector<qreal> m_layout;
149 QStringList m_labelsList;
151 QStringList m_labelsList;
150 QRectF m_axisRect;
152 QRectF m_axisRect;
151 QScopedPointer<QGraphicsItemGroup> m_grid;
153 QScopedPointer<QGraphicsItemGroup> m_grid;
152 QScopedPointer<QGraphicsItemGroup> m_arrow;
154 QScopedPointer<QGraphicsItemGroup> m_arrow;
153 QScopedPointer<QGraphicsItemGroup> m_minorGrid;
155 QScopedPointer<QGraphicsItemGroup> m_minorGrid;
154 QScopedPointer<QGraphicsItemGroup> m_minorArrow;
156 QScopedPointer<QGraphicsItemGroup> m_minorArrow;
155 QScopedPointer<QGraphicsItemGroup> m_shades;
157 QScopedPointer<QGraphicsItemGroup> m_shades;
156 QScopedPointer<QGraphicsItemGroup> m_labels;
158 QScopedPointer<QGraphicsItemGroup> m_labels;
157 QScopedPointer<QGraphicsTextItem> m_title;
159 QScopedPointer<QGraphicsTextItem> m_title;
158 bool m_intervalAxis;
160 bool m_intervalAxis;
159 };
161 };
160
162
161 QT_CHARTS_END_NAMESPACE
163 QT_CHARTS_END_NAMESPACE
162
164
163 #endif /* CHARTAXISELEMENT_H */
165 #endif /* CHARTAXISELEMENT_H */
@@ -1,518 +1,538
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include <private/polarchartaxisangular_p.h>
19 #include <private/polarchartaxisangular_p.h>
20 #include <private/chartpresenter_p.h>
20 #include <private/chartpresenter_p.h>
21 #include <private/abstractchartlayout_p.h>
21 #include <private/abstractchartlayout_p.h>
22 #include <QtCharts/QAbstractAxis>
22 #include <QtCharts/QAbstractAxis>
23 #include <QtCharts/QCategoryAxis>
23 #include <QtCharts/QCategoryAxis>
24 #include <private/qabstractaxis_p.h>
24 #include <private/qabstractaxis_p.h>
25 #include <QtCore/QDebug>
25 #include <QtCore/QDebug>
26 #include <QtCore/QtMath>
26 #include <QtCore/QtMath>
27 #include <QtGui/QTextDocument>
27 #include <QtGui/QTextDocument>
28
28
29 QT_CHARTS_BEGIN_NAMESPACE
29 QT_CHARTS_BEGIN_NAMESPACE
30
30
31 PolarChartAxisAngular::PolarChartAxisAngular(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
31 PolarChartAxisAngular::PolarChartAxisAngular(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
32 : PolarChartAxis(axis, item, intervalAxis)
32 : PolarChartAxis(axis, item, intervalAxis)
33 {
33 {
34 }
34 }
35
35
36 PolarChartAxisAngular::~PolarChartAxisAngular()
36 PolarChartAxisAngular::~PolarChartAxisAngular()
37 {
37 {
38 }
38 }
39
39
40 void PolarChartAxisAngular::updateGeometry()
40 void PolarChartAxisAngular::updateGeometry()
41 {
41 {
42 QGraphicsLayoutItem::updateGeometry();
42 QGraphicsLayoutItem::updateGeometry();
43
43
44 const QVector<qreal> &layout = this->layout();
44 const QVector<qreal> &layout = this->layout();
45 if (layout.isEmpty())
45 if (layout.isEmpty())
46 return;
46 return;
47
47
48 createAxisLabels(layout);
48 createAxisLabels(layout);
49 QStringList labelList = labels();
49 QStringList labelList = labels();
50 QPointF center = axisGeometry().center();
50 QPointF center = axisGeometry().center();
51 QList<QGraphicsItem *> arrowItemList = arrowItems();
51 QList<QGraphicsItem *> arrowItemList = arrowItems();
52 QList<QGraphicsItem *> gridItemList = gridItems();
52 QList<QGraphicsItem *> gridItemList = gridItems();
53 QList<QGraphicsItem *> labelItemList = labelItems();
53 QList<QGraphicsItem *> labelItemList = labelItems();
54 QList<QGraphicsItem *> shadeItemList = shadeItems();
54 QList<QGraphicsItem *> shadeItemList = shadeItems();
55 QList<QGraphicsItem *> minorGridItemList = minorGridItems();
55 QList<QGraphicsItem *> minorGridItemList = minorGridItems();
56 QList<QGraphicsItem *> minorArrowItemList = minorArrowItems();
56 QList<QGraphicsItem *> minorArrowItemList = minorArrowItems();
57 QGraphicsTextItem *title = titleItem();
57 QGraphicsTextItem *title = titleItem();
58
58
59 QGraphicsEllipseItem *axisLine = static_cast<QGraphicsEllipseItem *>(arrowItemList.at(0));
59 QGraphicsEllipseItem *axisLine = static_cast<QGraphicsEllipseItem *>(arrowItemList.at(0));
60 axisLine->setRect(axisGeometry());
60 axisLine->setRect(axisGeometry());
61
61
62 qreal radius = axisGeometry().height() / 2.0;
62 qreal radius = axisGeometry().height() / 2.0;
63
63
64 QRectF previousLabelRect;
64 QRectF previousLabelRect;
65 QRectF firstLabelRect;
65 QRectF firstLabelRect;
66
66
67 qreal labelHeight = 0;
67 qreal labelHeight = 0;
68
68
69 bool firstShade = true;
69 bool firstShade = true;
70 bool nextTickVisible = false;
70 bool nextTickVisible = false;
71 if (layout.size())
71 if (layout.size())
72 nextTickVisible = !(layout.at(0) < 0.0 || layout.at(0) > 360.0);
72 nextTickVisible = !(layout.at(0) < 0.0 || layout.at(0) > 360.0);
73
73
74 for (int i = 0; i < layout.size(); ++i) {
74 for (int i = 0; i < layout.size(); ++i) {
75 qreal angularCoordinate = layout.at(i);
75 qreal angularCoordinate = layout.at(i);
76
76
77 QGraphicsLineItem *gridLineItem = static_cast<QGraphicsLineItem *>(gridItemList.at(i));
77 QGraphicsLineItem *gridLineItem = static_cast<QGraphicsLineItem *>(gridItemList.at(i));
78 QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem *>(arrowItemList.at(i + 1));
78 QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem *>(arrowItemList.at(i + 1));
79 QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labelItemList.at(i));
79 QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labelItemList.at(i));
80 QGraphicsPathItem *shadeItem = 0;
80 QGraphicsPathItem *shadeItem = 0;
81 if (i == 0)
81 if (i == 0)
82 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
82 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
83 else if (i % 2)
83 else if (i % 2)
84 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at((i / 2) + 1));
84 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at((i / 2) + 1));
85
85
86 // Ignore ticks outside valid range
86 // Ignore ticks outside valid range
87 bool currentTickVisible = nextTickVisible;
87 bool currentTickVisible = nextTickVisible;
88 if ((i == layout.size() - 1)
88 if ((i == layout.size() - 1)
89 || layout.at(i + 1) < 0.0
89 || layout.at(i + 1) < 0.0
90 || layout.at(i + 1) > 360.0) {
90 || layout.at(i + 1) > 360.0) {
91 nextTickVisible = false;
91 nextTickVisible = false;
92 } else {
92 } else {
93 nextTickVisible = true;
93 nextTickVisible = true;
94 }
94 }
95
95
96 qreal labelCoordinate = angularCoordinate;
96 qreal labelCoordinate = angularCoordinate;
97 bool labelVisible = currentTickVisible;
97 bool labelVisible = currentTickVisible;
98 if (intervalAxis()) {
98 if (intervalAxis()) {
99 qreal farEdge;
99 qreal farEdge;
100 if (i == (layout.size() - 1))
100 if (i == (layout.size() - 1))
101 farEdge = 360.0;
101 farEdge = 360.0;
102 else
102 else
103 farEdge = qMin(qreal(360.0), layout.at(i + 1));
103 farEdge = qMin(qreal(360.0), layout.at(i + 1));
104
104
105 // Adjust the labelCoordinate to show it if next tick is visible
105 // Adjust the labelCoordinate to show it if next tick is visible
106 if (nextTickVisible)
106 if (nextTickVisible)
107 labelCoordinate = qMax(qreal(0.0), labelCoordinate);
107 labelCoordinate = qMax(qreal(0.0), labelCoordinate);
108
108
109 bool centeredLabel = true;
109 bool centeredLabel = true;
110 if (axis()->type() == QAbstractAxis::AxisTypeCategory) {
110 if (axis()->type() == QAbstractAxis::AxisTypeCategory) {
111 QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
111 QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
112 if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionOnValue)
112 if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionOnValue)
113 centeredLabel = false;
113 centeredLabel = false;
114 }
114 }
115 if (centeredLabel) {
115 if (centeredLabel) {
116 labelCoordinate = (labelCoordinate + farEdge) / 2.0;
116 labelCoordinate = (labelCoordinate + farEdge) / 2.0;
117 // Don't display label once the category gets too small near the axis
117 // Don't display label once the category gets too small near the axis
118 if (labelCoordinate < 5.0 || labelCoordinate > 355.0)
118 if (labelCoordinate < 5.0 || labelCoordinate > 355.0)
119 labelVisible = false;
119 labelVisible = false;
120 else
120 else
121 labelVisible = true;
121 labelVisible = true;
122 } else {
122 } else {
123 labelVisible = nextTickVisible;
123 labelVisible = nextTickVisible;
124 labelCoordinate = farEdge;
124 labelCoordinate = farEdge;
125 }
125 }
126 }
126 }
127
127
128 // Need this also in label calculations, so determine it first
128 // Need this also in label calculations, so determine it first
129 QLineF tickLine(QLineF::fromPolar(radius - tickWidth(), 90.0 - angularCoordinate).p2(),
129 QLineF tickLine(QLineF::fromPolar(radius - tickWidth(), 90.0 - angularCoordinate).p2(),
130 QLineF::fromPolar(radius + tickWidth(), 90.0 - angularCoordinate).p2());
130 QLineF::fromPolar(radius + tickWidth(), 90.0 - angularCoordinate).p2());
131 tickLine.translate(center);
131 tickLine.translate(center);
132
132
133 // Angular axis label
133 // Angular axis label
134 if (axis()->labelsVisible() && labelVisible) {
134 if (axis()->labelsVisible() && labelVisible) {
135 QRectF boundingRect = ChartPresenter::textBoundingRect(axis()->labelsFont(),
135 QRectF boundingRect = ChartPresenter::textBoundingRect(axis()->labelsFont(),
136 labelList.at(i),
136 labelList.at(i),
137 axis()->labelsAngle());
137 axis()->labelsAngle());
138 labelItem->setTextWidth(boundingRect.width());
138 labelItem->setTextWidth(boundingRect.width());
139 labelItem->setHtml(labelList.at(i));
139 labelItem->setHtml(labelList.at(i));
140 const QRectF &rect = labelItem->boundingRect();
140 const QRectF &rect = labelItem->boundingRect();
141 QPointF labelCenter = rect.center();
141 QPointF labelCenter = rect.center();
142 labelItem->setTransformOriginPoint(labelCenter.x(), labelCenter.y());
142 labelItem->setTransformOriginPoint(labelCenter.x(), labelCenter.y());
143 boundingRect.moveCenter(labelCenter);
143 boundingRect.moveCenter(labelCenter);
144 QPointF positionDiff(rect.topLeft() - boundingRect.topLeft());
144 QPointF positionDiff(rect.topLeft() - boundingRect.topLeft());
145
145
146 QPointF labelPoint;
146 QPointF labelPoint;
147 if (intervalAxis()) {
147 if (intervalAxis()) {
148 QLineF labelLine = QLineF::fromPolar(radius + tickWidth(), 90.0 - labelCoordinate);
148 QLineF labelLine = QLineF::fromPolar(radius + tickWidth(), 90.0 - labelCoordinate);
149 labelLine.translate(center);
149 labelLine.translate(center);
150 labelPoint = labelLine.p2();
150 labelPoint = labelLine.p2();
151 } else {
151 } else {
152 labelPoint = tickLine.p2();
152 labelPoint = tickLine.p2();
153 }
153 }
154
154
155 QRectF labelRect = moveLabelToPosition(labelCoordinate, labelPoint, boundingRect);
155 QRectF labelRect = moveLabelToPosition(labelCoordinate, labelPoint, boundingRect);
156 labelItem->setPos(labelRect.topLeft() + positionDiff);
156 labelItem->setPos(labelRect.topLeft() + positionDiff);
157
157
158 // Store height for title calculations
158 // Store height for title calculations
159 qreal labelClearance = axisGeometry().top() - labelRect.top();
159 qreal labelClearance = axisGeometry().top() - labelRect.top();
160 labelHeight = qMax(labelHeight, labelClearance);
160 labelHeight = qMax(labelHeight, labelClearance);
161
161
162 // Label overlap detection
162 // Label overlap detection
163 if (i && (previousLabelRect.intersects(labelRect) || firstLabelRect.intersects(labelRect))) {
163 if (i && (previousLabelRect.intersects(labelRect) || firstLabelRect.intersects(labelRect))) {
164 labelVisible = false;
164 labelVisible = false;
165 } else {
165 } else {
166 // Store labelRect for future comparison. Some area is deducted to make things look
166 // Store labelRect for future comparison. Some area is deducted to make things look
167 // little nicer, as usually intersection happens at label corner with angular labels.
167 // little nicer, as usually intersection happens at label corner with angular labels.
168 labelRect.adjust(-2.0, -4.0, -2.0, -4.0);
168 labelRect.adjust(-2.0, -4.0, -2.0, -4.0);
169 if (firstLabelRect.isEmpty())
169 if (firstLabelRect.isEmpty())
170 firstLabelRect = labelRect;
170 firstLabelRect = labelRect;
171
171
172 previousLabelRect = labelRect;
172 previousLabelRect = labelRect;
173 labelVisible = true;
173 labelVisible = true;
174 }
174 }
175 }
175 }
176
176
177 labelItem->setVisible(labelVisible);
177 labelItem->setVisible(labelVisible);
178 if (!currentTickVisible) {
178 if (!currentTickVisible) {
179 gridLineItem->setVisible(false);
179 gridLineItem->setVisible(false);
180 tickItem->setVisible(false);
180 tickItem->setVisible(false);
181 if (shadeItem)
181 if (shadeItem)
182 shadeItem->setVisible(false);
182 shadeItem->setVisible(false);
183 continue;
183 continue;
184 }
184 }
185
185
186 // Angular grid line
186 // Angular grid line
187 QLineF gridLine = QLineF::fromPolar(radius, 90.0 - angularCoordinate);
187 QLineF gridLine = QLineF::fromPolar(radius, 90.0 - angularCoordinate);
188 gridLine.translate(center);
188 gridLine.translate(center);
189 gridLineItem->setLine(gridLine);
189 gridLineItem->setLine(gridLine);
190 gridLineItem->setVisible(true);
190 gridLineItem->setVisible(true);
191
191
192 // Tick
192 // Tick
193 tickItem->setLine(tickLine);
193 tickItem->setLine(tickLine);
194 tickItem->setVisible(true);
194 tickItem->setVisible(true);
195
195
196 // Shades
196 // Shades
197 if (i % 2 || (i == 0 && !nextTickVisible)) {
197 if (i % 2 || (i == 0 && !nextTickVisible)) {
198 QPainterPath path;
198 QPainterPath path;
199 path.moveTo(center);
199 path.moveTo(center);
200 if (i == 0) {
200 if (i == 0) {
201 // If first tick is also the last, we need to custom fill the first partial arc
201 // If first tick is also the last, we need to custom fill the first partial arc
202 // or it won't get filled.
202 // or it won't get filled.
203 path.arcTo(axisGeometry(), 90.0 - layout.at(0), layout.at(0));
203 path.arcTo(axisGeometry(), 90.0 - layout.at(0), layout.at(0));
204 path.closeSubpath();
204 path.closeSubpath();
205 } else {
205 } else {
206 qreal nextCoordinate;
206 qreal nextCoordinate;
207 if (!nextTickVisible) // Last visible tick
207 if (!nextTickVisible) // Last visible tick
208 nextCoordinate = 360.0;
208 nextCoordinate = 360.0;
209 else
209 else
210 nextCoordinate = layout.at(i + 1);
210 nextCoordinate = layout.at(i + 1);
211 qreal arcSpan = angularCoordinate - nextCoordinate;
211 qreal arcSpan = angularCoordinate - nextCoordinate;
212 path.arcTo(axisGeometry(), 90.0 - angularCoordinate, arcSpan);
212 path.arcTo(axisGeometry(), 90.0 - angularCoordinate, arcSpan);
213 path.closeSubpath();
213 path.closeSubpath();
214
214
215 // Add additional arc for first shade item if there is a partial arc to be filled
215 // Add additional arc for first shade item if there is a partial arc to be filled
216 if (firstShade) {
216 if (firstShade) {
217 QGraphicsPathItem *specialShadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
217 QGraphicsPathItem *specialShadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
218 if (layout.at(i - 1) > 0.0) {
218 if (layout.at(i - 1) > 0.0) {
219 QPainterPath specialPath;
219 QPainterPath specialPath;
220 specialPath.moveTo(center);
220 specialPath.moveTo(center);
221 specialPath.arcTo(axisGeometry(), 90.0 - layout.at(i - 1), layout.at(i - 1));
221 specialPath.arcTo(axisGeometry(), 90.0 - layout.at(i - 1), layout.at(i - 1));
222 specialPath.closeSubpath();
222 specialPath.closeSubpath();
223 specialShadeItem->setPath(specialPath);
223 specialShadeItem->setPath(specialPath);
224 specialShadeItem->setVisible(true);
224 specialShadeItem->setVisible(true);
225 } else {
225 } else {
226 specialShadeItem->setVisible(false);
226 specialShadeItem->setVisible(false);
227 }
227 }
228 }
228 }
229 }
229 }
230 shadeItem->setPath(path);
230 shadeItem->setPath(path);
231 shadeItem->setVisible(true);
231 shadeItem->setVisible(true);
232 firstShade = false;
232 firstShade = false;
233 }
233 }
234
234
235 // Minor ticks
235 // Minor ticks
236 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
236 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
237 if ((i + 1) != layout.size() && valueAxis) {
237 if ((i + 1) != layout.size() && valueAxis) {
238 int minorTickCount = valueAxis->minorTickCount();
238 int minorTickCount = valueAxis->minorTickCount();
239 if (minorTickCount != 0) {
239 if (minorTickCount != 0) {
240 qreal minorAngularCoordinate = (layout[i + 1] - layout[i])
240 qreal minorAngularCoordinate = (layout[i + 1] - layout[i])
241 / qreal(minorTickCount + 1);
241 / qreal(minorTickCount + 1);
242 for (int j = 0; j < minorTickCount; j++) {
242 for (int j = 0; j < minorTickCount; j++) {
243 QGraphicsLineItem *minorGridItem =
243 QGraphicsLineItem *minorGridItem =
244 static_cast<QGraphicsLineItem *>(minorGridItemList.at(i * minorTickCount + j));
244 static_cast<QGraphicsLineItem *>(minorGridItemList.at(i * minorTickCount + j));
245 QGraphicsLineItem *minorTickItem =
245 QGraphicsLineItem *minorTickItem =
246 static_cast<QGraphicsLineItem *>(minorArrowItemList.at(i * minorTickCount + j));
246 static_cast<QGraphicsLineItem *>(minorArrowItemList.at(i * minorTickCount + j));
247 qreal minorAngle = 90.0 - angularCoordinate
247 qreal minorAngle = 90.0 - angularCoordinate
248 - minorAngularCoordinate * qreal(j + 1);
248 - minorAngularCoordinate * qreal(j + 1);
249 QLineF minorGridLine = QLineF::fromPolar(radius, minorAngle);
249 QLineF minorGridLine = QLineF::fromPolar(radius, minorAngle);
250 minorGridLine.translate(center);
250 minorGridLine.translate(center);
251 minorGridItem->setLine(minorGridLine);
251 minorGridItem->setLine(minorGridLine);
252 minorGridItem->setVisible(true);
252 minorGridItem->setVisible(true);
253
253
254 QLineF minorTickLine(QLineF::fromPolar(radius - tickWidth() + 1,
254 QLineF minorTickLine(QLineF::fromPolar(radius - tickWidth() + 1,
255 minorAngle).p2(),
255 minorAngle).p2(),
256 QLineF::fromPolar(radius + tickWidth() - 1,
256 QLineF::fromPolar(radius + tickWidth() - 1,
257 minorAngle).p2());
257 minorAngle).p2());
258 minorTickLine.translate(center);
258 minorTickLine.translate(center);
259 minorTickItem->setLine(minorTickLine);
259 minorTickItem->setLine(minorTickLine);
260 minorTickItem->setVisible(true);
260 minorTickItem->setVisible(true);
261 }
261 }
262 }
262 }
263 }
263 }
264 }
264 }
265
265
266 // Title, centered above the chart
266 // Title, centered above the chart
267 QString titleText = axis()->titleText();
267 QString titleText = axis()->titleText();
268 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
268 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
269 QRectF truncatedRect;
269 QRectF truncatedRect;
270 qreal availableTitleHeight = axisGeometry().height() - labelPadding() - titlePadding() * 2.0;
270 qreal availableTitleHeight = axisGeometry().height() - labelPadding() - titlePadding() * 2.0;
271 qreal minimumLabelHeight = ChartPresenter::textBoundingRect(axis()->labelsFont(),
271 qreal minimumLabelHeight = ChartPresenter::textBoundingRect(axis()->labelsFont(),
272 QStringLiteral("...")).height();
272 QStringLiteral("...")).height();
273 availableTitleHeight -= minimumLabelHeight;
273 availableTitleHeight -= minimumLabelHeight;
274 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0),
274 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0),
275 axisGeometry().width(), availableTitleHeight,
275 axisGeometry().width(), availableTitleHeight,
276 truncatedRect));
276 truncatedRect));
277 title->setTextWidth(truncatedRect.width());
277 title->setTextWidth(truncatedRect.width());
278
278
279 QRectF titleBoundingRect = title->boundingRect();
279 QRectF titleBoundingRect = title->boundingRect();
280 QPointF titleCenter = center - titleBoundingRect.center();
280 QPointF titleCenter = center - titleBoundingRect.center();
281 title->setPos(titleCenter.x(), axisGeometry().top() - titlePadding() * 2.0 - titleBoundingRect.height() - labelHeight);
281 title->setPos(titleCenter.x(), axisGeometry().top() - titlePadding() * 2.0 - titleBoundingRect.height() - labelHeight);
282 }
282 }
283 }
283 }
284
284
285 Qt::Orientation PolarChartAxisAngular::orientation() const
285 Qt::Orientation PolarChartAxisAngular::orientation() const
286 {
286 {
287 return Qt::Horizontal;
287 return Qt::Horizontal;
288 }
288 }
289
289
290 void PolarChartAxisAngular::createItems(int count)
290 void PolarChartAxisAngular::createItems(int count)
291 {
291 {
292 if (arrowItems().count() == 0) {
292 if (arrowItems().count() == 0) {
293 // angular axis line
293 // angular axis line
294 QGraphicsEllipseItem *arrow = new QGraphicsEllipseItem(presenter()->rootItem());
294 QGraphicsEllipseItem *arrow = new QGraphicsEllipseItem(presenter()->rootItem());
295 arrow->setPen(axis()->linePen());
295 arrow->setPen(axis()->linePen());
296 arrowGroup()->addToGroup(arrow);
296 arrowGroup()->addToGroup(arrow);
297 }
297 }
298
298
299 QGraphicsTextItem *title = titleItem();
299 QGraphicsTextItem *title = titleItem();
300 title->setFont(axis()->titleFont());
300 title->setFont(axis()->titleFont());
301 title->setDefaultTextColor(axis()->titleBrush().color());
301 title->setDefaultTextColor(axis()->titleBrush().color());
302 title->setHtml(axis()->titleText());
302 title->setHtml(axis()->titleText());
303
303
304 for (int i = 0; i < count; ++i) {
304 for (int i = 0; i < count; ++i) {
305 QGraphicsLineItem *arrow = new QGraphicsLineItem(presenter()->rootItem());
305 QGraphicsLineItem *arrow = new QGraphicsLineItem(presenter()->rootItem());
306 QGraphicsLineItem *grid = new QGraphicsLineItem(presenter()->rootItem());
306 QGraphicsLineItem *grid = new QGraphicsLineItem(presenter()->rootItem());
307 QGraphicsTextItem *label = new QGraphicsTextItem(presenter()->rootItem());
307 QGraphicsTextItem *label = new QGraphicsTextItem(presenter()->rootItem());
308 label->document()->setDocumentMargin(ChartPresenter::textMargin());
308 label->document()->setDocumentMargin(ChartPresenter::textMargin());
309 arrow->setPen(axis()->linePen());
309 arrow->setPen(axis()->linePen());
310 grid->setPen(axis()->gridLinePen());
310 grid->setPen(axis()->gridLinePen());
311 label->setFont(axis()->labelsFont());
311 label->setFont(axis()->labelsFont());
312 label->setDefaultTextColor(axis()->labelsBrush().color());
312 label->setDefaultTextColor(axis()->labelsBrush().color());
313 label->setRotation(axis()->labelsAngle());
313 label->setRotation(axis()->labelsAngle());
314 arrowGroup()->addToGroup(arrow);
314 arrowGroup()->addToGroup(arrow);
315 gridGroup()->addToGroup(grid);
315 gridGroup()->addToGroup(grid);
316 labelGroup()->addToGroup(label);
316 labelGroup()->addToGroup(label);
317 if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
317 if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
318 QGraphicsPathItem *shade = new QGraphicsPathItem(presenter()->rootItem());
318 QGraphicsPathItem *shade = new QGraphicsPathItem(presenter()->rootItem());
319 shade->setPen(axis()->shadesPen());
319 shade->setPen(axis()->shadesPen());
320 shade->setBrush(axis()->shadesBrush());
320 shade->setBrush(axis()->shadesBrush());
321 shadeGroup()->addToGroup(shade);
321 shadeGroup()->addToGroup(shade);
322 }
322 }
323 }
323 }
324 }
324 }
325
325
326 void PolarChartAxisAngular::handleArrowPenChanged(const QPen &pen)
326 void PolarChartAxisAngular::handleArrowPenChanged(const QPen &pen)
327 {
327 {
328 bool first = true;
328 bool first = true;
329 foreach (QGraphicsItem *item, arrowItems()) {
329 foreach (QGraphicsItem *item, arrowItems()) {
330 if (first) {
330 if (first) {
331 first = false;
331 first = false;
332 // First arrow item is the outer circle of axis
332 // First arrow item is the outer circle of axis
333 static_cast<QGraphicsEllipseItem *>(item)->setPen(pen);
333 static_cast<QGraphicsEllipseItem *>(item)->setPen(pen);
334 } else {
334 } else {
335 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
335 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
336 }
336 }
337 }
337 }
338 }
338 }
339
339
340 void PolarChartAxisAngular::handleGridPenChanged(const QPen &pen)
340 void PolarChartAxisAngular::handleGridPenChanged(const QPen &pen)
341 {
341 {
342 foreach (QGraphicsItem *item, gridItems())
342 foreach (QGraphicsItem *item, gridItems())
343 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
343 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
344 }
344 }
345
345
346 void PolarChartAxisAngular::handleMinorArrowPenChanged(const QPen &pen)
346 void PolarChartAxisAngular::handleMinorArrowPenChanged(const QPen &pen)
347 {
347 {
348 foreach (QGraphicsItem *item, minorArrowItems()) {
348 foreach (QGraphicsItem *item, minorArrowItems()) {
349 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
349 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
350 }
350 }
351 }
351 }
352
352
353 void PolarChartAxisAngular::handleMinorGridPenChanged(const QPen &pen)
353 void PolarChartAxisAngular::handleMinorGridPenChanged(const QPen &pen)
354 {
354 {
355 foreach (QGraphicsItem *item, minorGridItems())
355 foreach (QGraphicsItem *item, minorGridItems())
356 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
356 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
357 }
357 }
358
358
359 void PolarChartAxisAngular::handleGridLineColorChanged(const QColor &color)
360 {
361 foreach (QGraphicsItem *item, gridItems()) {
362 QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
363 QPen pen = lineItem->pen();
364 pen.setColor(color);
365 lineItem->setPen(pen);
366 }
367 }
368
369 void PolarChartAxisAngular::handleMinorGridLineColorChanged(const QColor &color)
370 {
371 foreach (QGraphicsItem *item, minorGridItems()) {
372 QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
373 QPen pen = lineItem->pen();
374 pen.setColor(color);
375 lineItem->setPen(pen);
376 }
377 }
378
359 QSizeF PolarChartAxisAngular::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
379 QSizeF PolarChartAxisAngular::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
360 {
380 {
361 Q_UNUSED(which);
381 Q_UNUSED(which);
362 Q_UNUSED(constraint);
382 Q_UNUSED(constraint);
363 return QSizeF(-1, -1);
383 return QSizeF(-1, -1);
364 }
384 }
365
385
366 qreal PolarChartAxisAngular::preferredAxisRadius(const QSizeF &maxSize)
386 qreal PolarChartAxisAngular::preferredAxisRadius(const QSizeF &maxSize)
367 {
387 {
368 qreal radius = maxSize.height() / 2.0;
388 qreal radius = maxSize.height() / 2.0;
369 if (maxSize.width() < maxSize.height())
389 if (maxSize.width() < maxSize.height())
370 radius = maxSize.width() / 2.0;
390 radius = maxSize.width() / 2.0;
371
391
372 if (axis()->labelsVisible()) {
392 if (axis()->labelsVisible()) {
373 QVector<qreal> layout = calculateLayout();
393 QVector<qreal> layout = calculateLayout();
374 if (layout.isEmpty())
394 if (layout.isEmpty())
375 return radius;
395 return radius;
376
396
377 createAxisLabels(layout);
397 createAxisLabels(layout);
378 QStringList labelList = labels();
398 QStringList labelList = labels();
379 QFont font = axis()->labelsFont();
399 QFont font = axis()->labelsFont();
380
400
381 QRectF maxRect;
401 QRectF maxRect;
382 maxRect.setSize(maxSize);
402 maxRect.setSize(maxSize);
383 maxRect.moveCenter(QPointF(0.0, 0.0));
403 maxRect.moveCenter(QPointF(0.0, 0.0));
384
404
385 // This is a horrible way to find out the maximum radius for angular axis and its labels.
405 // This is a horrible way to find out the maximum radius for angular axis and its labels.
386 // It just increments the radius down until everyhing fits the constraint size.
406 // It just increments the radius down until everyhing fits the constraint size.
387 // Proper way would be to actually calculate it but this seems to work reasonably fast as it is.
407 // Proper way would be to actually calculate it but this seems to work reasonably fast as it is.
388 bool nextTickVisible = false;
408 bool nextTickVisible = false;
389 for (int i = 0; i < layout.size(); ) {
409 for (int i = 0; i < layout.size(); ) {
390 if ((i == layout.size() - 1)
410 if ((i == layout.size() - 1)
391 || layout.at(i + 1) < 0.0
411 || layout.at(i + 1) < 0.0
392 || layout.at(i + 1) > 360.0) {
412 || layout.at(i + 1) > 360.0) {
393 nextTickVisible = false;
413 nextTickVisible = false;
394 } else {
414 } else {
395 nextTickVisible = true;
415 nextTickVisible = true;
396 }
416 }
397
417
398 qreal labelCoordinate = layout.at(i);
418 qreal labelCoordinate = layout.at(i);
399 qreal labelVisible;
419 qreal labelVisible;
400
420
401 if (intervalAxis()) {
421 if (intervalAxis()) {
402 qreal farEdge;
422 qreal farEdge;
403 if (i == (layout.size() - 1))
423 if (i == (layout.size() - 1))
404 farEdge = 360.0;
424 farEdge = 360.0;
405 else
425 else
406 farEdge = qMin(qreal(360.0), layout.at(i + 1));
426 farEdge = qMin(qreal(360.0), layout.at(i + 1));
407
427
408 // Adjust the labelCoordinate to show it if next tick is visible
428 // Adjust the labelCoordinate to show it if next tick is visible
409 if (nextTickVisible)
429 if (nextTickVisible)
410 labelCoordinate = qMax(qreal(0.0), labelCoordinate);
430 labelCoordinate = qMax(qreal(0.0), labelCoordinate);
411
431
412 labelCoordinate = (labelCoordinate + farEdge) / 2.0;
432 labelCoordinate = (labelCoordinate + farEdge) / 2.0;
413 }
433 }
414
434
415 if (labelCoordinate < 0.0 || labelCoordinate > 360.0)
435 if (labelCoordinate < 0.0 || labelCoordinate > 360.0)
416 labelVisible = false;
436 labelVisible = false;
417 else
437 else
418 labelVisible = true;
438 labelVisible = true;
419
439
420 if (!labelVisible) {
440 if (!labelVisible) {
421 i++;
441 i++;
422 continue;
442 continue;
423 }
443 }
424
444
425 QRectF boundingRect = ChartPresenter::textBoundingRect(axis()->labelsFont(), labelList.at(i), axis()->labelsAngle());
445 QRectF boundingRect = ChartPresenter::textBoundingRect(axis()->labelsFont(), labelList.at(i), axis()->labelsAngle());
426 QPointF labelPoint = QLineF::fromPolar(radius + tickWidth(), 90.0 - labelCoordinate).p2();
446 QPointF labelPoint = QLineF::fromPolar(radius + tickWidth(), 90.0 - labelCoordinate).p2();
427
447
428 boundingRect = moveLabelToPosition(labelCoordinate, labelPoint, boundingRect);
448 boundingRect = moveLabelToPosition(labelCoordinate, labelPoint, boundingRect);
429 QRectF intersectRect = maxRect.intersected(boundingRect);
449 QRectF intersectRect = maxRect.intersected(boundingRect);
430 if (boundingRect.isEmpty() || intersectRect == boundingRect) {
450 if (boundingRect.isEmpty() || intersectRect == boundingRect) {
431 i++;
451 i++;
432 } else {
452 } else {
433 qreal reduction(0.0);
453 qreal reduction(0.0);
434 // If there is no intersection, reduce by smallest dimension of label rect to be on the safe side
454 // If there is no intersection, reduce by smallest dimension of label rect to be on the safe side
435 if (intersectRect.isEmpty()) {
455 if (intersectRect.isEmpty()) {
436 reduction = qMin(boundingRect.height(), boundingRect.width());
456 reduction = qMin(boundingRect.height(), boundingRect.width());
437 } else {
457 } else {
438 // Approximate needed radius reduction is the amount label rect exceeds max rect in either dimension.
458 // Approximate needed radius reduction is the amount label rect exceeds max rect in either dimension.
439 // Could be further optimized by figuring out the proper math how to calculate exact needed reduction.
459 // Could be further optimized by figuring out the proper math how to calculate exact needed reduction.
440 reduction = qMax(boundingRect.height() - intersectRect.height(),
460 reduction = qMax(boundingRect.height() - intersectRect.height(),
441 boundingRect.width() - intersectRect.width());
461 boundingRect.width() - intersectRect.width());
442 }
462 }
443 // Typically the approximated reduction is little low, so add one
463 // Typically the approximated reduction is little low, so add one
444 radius -= (reduction + 1.0);
464 radius -= (reduction + 1.0);
445
465
446 if (radius < 1.0) // safeguard
466 if (radius < 1.0) // safeguard
447 return 1.0;
467 return 1.0;
448 }
468 }
449 }
469 }
450 }
470 }
451
471
452 if (!axis()->titleText().isEmpty() && axis()->isTitleVisible()) {
472 if (!axis()->titleText().isEmpty() && axis()->isTitleVisible()) {
453 QRectF titleRect = ChartPresenter::textBoundingRect(axis()->titleFont(), axis()->titleText());
473 QRectF titleRect = ChartPresenter::textBoundingRect(axis()->titleFont(), axis()->titleText());
454
474
455 radius -= titlePadding() + (titleRect.height() / 2.0);
475 radius -= titlePadding() + (titleRect.height() / 2.0);
456 if (radius < 1.0) // safeguard
476 if (radius < 1.0) // safeguard
457 return 1.0;
477 return 1.0;
458 }
478 }
459
479
460 return radius;
480 return radius;
461 }
481 }
462
482
463 QRectF PolarChartAxisAngular::moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const
483 QRectF PolarChartAxisAngular::moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const
464 {
484 {
465 if (angularCoordinate == 0.0)
485 if (angularCoordinate == 0.0)
466 labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0));
486 labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0));
467 else if (angularCoordinate < 90.0)
487 else if (angularCoordinate < 90.0)
468 labelRect.moveBottomLeft(labelPoint);
488 labelRect.moveBottomLeft(labelPoint);
469 else if (angularCoordinate == 90.0)
489 else if (angularCoordinate == 90.0)
470 labelRect.moveCenter(labelPoint + QPointF(labelRect.width() / 2.0 + 2.0, 0)); // +2 so that it does not hit the radial axis
490 labelRect.moveCenter(labelPoint + QPointF(labelRect.width() / 2.0 + 2.0, 0)); // +2 so that it does not hit the radial axis
471 else if (angularCoordinate < 180.0)
491 else if (angularCoordinate < 180.0)
472 labelRect.moveTopLeft(labelPoint);
492 labelRect.moveTopLeft(labelPoint);
473 else if (angularCoordinate == 180.0)
493 else if (angularCoordinate == 180.0)
474 labelRect.moveCenter(labelPoint + QPointF(0, labelRect.height() / 2.0));
494 labelRect.moveCenter(labelPoint + QPointF(0, labelRect.height() / 2.0));
475 else if (angularCoordinate < 270.0)
495 else if (angularCoordinate < 270.0)
476 labelRect.moveTopRight(labelPoint);
496 labelRect.moveTopRight(labelPoint);
477 else if (angularCoordinate == 270.0)
497 else if (angularCoordinate == 270.0)
478 labelRect.moveCenter(labelPoint + QPointF(-labelRect.width() / 2.0 - 2.0, 0)); // -2 so that it does not hit the radial axis
498 labelRect.moveCenter(labelPoint + QPointF(-labelRect.width() / 2.0 - 2.0, 0)); // -2 so that it does not hit the radial axis
479 else if (angularCoordinate < 360.0)
499 else if (angularCoordinate < 360.0)
480 labelRect.moveBottomRight(labelPoint);
500 labelRect.moveBottomRight(labelPoint);
481 else
501 else
482 labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0));
502 labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0));
483 return labelRect;
503 return labelRect;
484 }
504 }
485
505
486 void PolarChartAxisAngular::updateMinorTickItems()
506 void PolarChartAxisAngular::updateMinorTickItems()
487 {
507 {
488 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(this->axis());
508 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(this->axis());
489 if (valueAxis) {
509 if (valueAxis) {
490 int currentCount = minorArrowItems().size();
510 int currentCount = minorArrowItems().size();
491 int expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
511 int expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
492 int diff = expectedCount - currentCount;
512 int diff = expectedCount - currentCount;
493 if (diff > 0) {
513 if (diff > 0) {
494 for (int i = 0; i < diff; i++) {
514 for (int i = 0; i < diff; i++) {
495 QGraphicsLineItem *minorArrow = new QGraphicsLineItem(presenter()->rootItem());
515 QGraphicsLineItem *minorArrow = new QGraphicsLineItem(presenter()->rootItem());
496 QGraphicsLineItem *minorGrid = new QGraphicsLineItem(presenter()->rootItem());
516 QGraphicsLineItem *minorGrid = new QGraphicsLineItem(presenter()->rootItem());
497 minorArrow->setPen(valueAxis->linePen());
517 minorArrow->setPen(valueAxis->linePen());
498 minorGrid->setPen(valueAxis->minorGridLinePen());
518 minorGrid->setPen(valueAxis->minorGridLinePen());
499 minorArrowGroup()->addToGroup(minorArrow);
519 minorArrowGroup()->addToGroup(minorArrow);
500 minorGridGroup()->addToGroup(minorGrid);
520 minorGridGroup()->addToGroup(minorGrid);
501 }
521 }
502 } else {
522 } else {
503 QList<QGraphicsItem *> minorGridLines = minorGridItems();
523 QList<QGraphicsItem *> minorGridLines = minorGridItems();
504 QList<QGraphicsItem *> minorArrows = minorArrowItems();
524 QList<QGraphicsItem *> minorArrows = minorArrowItems();
505 for (int i = 0; i > diff; i--) {
525 for (int i = 0; i > diff; i--) {
506 if (!minorGridLines.isEmpty())
526 if (!minorGridLines.isEmpty())
507 delete(minorGridLines.takeLast());
527 delete(minorGridLines.takeLast());
508 if (!minorArrows.isEmpty())
528 if (!minorArrows.isEmpty())
509 delete(minorArrows.takeLast());
529 delete(minorArrows.takeLast());
510 }
530 }
511 }
531 }
512 }
532 }
513 }
533 }
514
534
515
535
516 #include "moc_polarchartaxisangular_p.cpp"
536 #include "moc_polarchartaxisangular_p.cpp"
517
537
518 QT_CHARTS_END_NAMESPACE
538 QT_CHARTS_END_NAMESPACE
@@ -1,64 +1,66
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 // W A R N I N G
19 // W A R N I N G
20 // -------------
20 // -------------
21 //
21 //
22 // This file is not part of the Qt Chart API. It exists purely as an
22 // This file is not part of the Qt Chart API. It exists purely as an
23 // implementation detail. This header file may change from version to
23 // implementation detail. This header file may change from version to
24 // version without notice, or even be removed.
24 // version without notice, or even be removed.
25 //
25 //
26 // We mean it.
26 // We mean it.
27
27
28 #ifndef POLARCHARTAXISANGULAR_P_H
28 #ifndef POLARCHARTAXISANGULAR_P_H
29 #define POLARCHARTAXISANGULAR_P_H
29 #define POLARCHARTAXISANGULAR_P_H
30
30
31 #include <private/polarchartaxis_p.h>
31 #include <private/polarchartaxis_p.h>
32 #include <QtCharts/QValueAxis>
32 #include <QtCharts/QValueAxis>
33
33
34 QT_CHARTS_BEGIN_NAMESPACE
34 QT_CHARTS_BEGIN_NAMESPACE
35
35
36 class PolarChartAxisAngular : public PolarChartAxis
36 class PolarChartAxisAngular : public PolarChartAxis
37 {
37 {
38 Q_OBJECT
38 Q_OBJECT
39 public:
39 public:
40 PolarChartAxisAngular(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
40 PolarChartAxisAngular(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
41 ~PolarChartAxisAngular();
41 ~PolarChartAxisAngular();
42
42
43 Qt::Orientation orientation() const;
43 Qt::Orientation orientation() const;
44 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
44 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
45
45
46 virtual void updateGeometry();
46 virtual void updateGeometry();
47 virtual void createItems(int count);
47 virtual void createItems(int count);
48 virtual void updateMinorTickItems();
48 virtual void updateMinorTickItems();
49
49
50 qreal preferredAxisRadius(const QSizeF &maxSize);
50 qreal preferredAxisRadius(const QSizeF &maxSize);
51
51
52 public Q_SLOTS:
52 public Q_SLOTS:
53 virtual void handleArrowPenChanged(const QPen &pen);
53 virtual void handleArrowPenChanged(const QPen &pen);
54 virtual void handleGridPenChanged(const QPen &pen);
54 virtual void handleGridPenChanged(const QPen &pen);
55 virtual void handleMinorArrowPenChanged(const QPen &pen);
55 virtual void handleMinorArrowPenChanged(const QPen &pen);
56 virtual void handleMinorGridPenChanged(const QPen &pen);
56 virtual void handleMinorGridPenChanged(const QPen &pen);
57 virtual void handleGridLineColorChanged(const QColor &color);
58 virtual void handleMinorGridLineColorChanged(const QColor &color);
57
59
58 private:
60 private:
59 QRectF moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const;
61 QRectF moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const;
60 };
62 };
61
63
62 QT_CHARTS_END_NAMESPACE
64 QT_CHARTS_END_NAMESPACE
63
65
64 #endif // POLARCHARTAXISANGULAR_P_H
66 #endif // POLARCHARTAXISANGULAR_P_H
@@ -1,381 +1,401
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include <private/polarchartaxisradial_p.h>
19 #include <private/polarchartaxisradial_p.h>
20 #include <private/chartpresenter_p.h>
20 #include <private/chartpresenter_p.h>
21 #include <private/abstractchartlayout_p.h>
21 #include <private/abstractchartlayout_p.h>
22 #include <private/qabstractaxis_p.h>
22 #include <private/qabstractaxis_p.h>
23 #include <private/linearrowitem_p.h>
23 #include <private/linearrowitem_p.h>
24 #include <QtCharts/QCategoryAxis>
24 #include <QtCharts/QCategoryAxis>
25 #include <QtGui/QTextDocument>
25 #include <QtGui/QTextDocument>
26
26
27 QT_CHARTS_BEGIN_NAMESPACE
27 QT_CHARTS_BEGIN_NAMESPACE
28
28
29 PolarChartAxisRadial::PolarChartAxisRadial(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
29 PolarChartAxisRadial::PolarChartAxisRadial(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
30 : PolarChartAxis(axis, item, intervalAxis)
30 : PolarChartAxis(axis, item, intervalAxis)
31 {
31 {
32 }
32 }
33
33
34 PolarChartAxisRadial::~PolarChartAxisRadial()
34 PolarChartAxisRadial::~PolarChartAxisRadial()
35 {
35 {
36 }
36 }
37
37
38 void PolarChartAxisRadial::updateGeometry()
38 void PolarChartAxisRadial::updateGeometry()
39 {
39 {
40 const QVector<qreal> &layout = this->layout();
40 const QVector<qreal> &layout = this->layout();
41 if (layout.isEmpty())
41 if (layout.isEmpty())
42 return;
42 return;
43
43
44 createAxisLabels(layout);
44 createAxisLabels(layout);
45 QStringList labelList = labels();
45 QStringList labelList = labels();
46 QPointF center = axisGeometry().center();
46 QPointF center = axisGeometry().center();
47 QList<QGraphicsItem *> arrowItemList = arrowItems();
47 QList<QGraphicsItem *> arrowItemList = arrowItems();
48 QList<QGraphicsItem *> gridItemList = gridItems();
48 QList<QGraphicsItem *> gridItemList = gridItems();
49 QList<QGraphicsItem *> labelItemList = labelItems();
49 QList<QGraphicsItem *> labelItemList = labelItems();
50 QList<QGraphicsItem *> shadeItemList = shadeItems();
50 QList<QGraphicsItem *> shadeItemList = shadeItems();
51 QList<QGraphicsItem *> minorGridItemList = minorGridItems();
51 QList<QGraphicsItem *> minorGridItemList = minorGridItems();
52 QList<QGraphicsItem *> minorArrowItemList = minorArrowItems();
52 QList<QGraphicsItem *> minorArrowItemList = minorArrowItems();
53 QGraphicsTextItem* title = titleItem();
53 QGraphicsTextItem* title = titleItem();
54 qreal radius = axisGeometry().height() / 2.0;
54 qreal radius = axisGeometry().height() / 2.0;
55
55
56 QLineF line(center, center + QPointF(0, -radius));
56 QLineF line(center, center + QPointF(0, -radius));
57 QGraphicsLineItem *axisLine = static_cast<QGraphicsLineItem *>(arrowItemList.at(0));
57 QGraphicsLineItem *axisLine = static_cast<QGraphicsLineItem *>(arrowItemList.at(0));
58 axisLine->setLine(line);
58 axisLine->setLine(line);
59
59
60 QRectF previousLabelRect;
60 QRectF previousLabelRect;
61 bool firstShade = true;
61 bool firstShade = true;
62 bool nextTickVisible = false;
62 bool nextTickVisible = false;
63 if (layout.size())
63 if (layout.size())
64 nextTickVisible = !(layout.at(0) < 0.0 || layout.at(0) > radius);
64 nextTickVisible = !(layout.at(0) < 0.0 || layout.at(0) > radius);
65
65
66 for (int i = 0; i < layout.size(); ++i) {
66 for (int i = 0; i < layout.size(); ++i) {
67 qreal radialCoordinate = layout.at(i);
67 qreal radialCoordinate = layout.at(i);
68
68
69 QGraphicsEllipseItem *gridItem = static_cast<QGraphicsEllipseItem *>(gridItemList.at(i));
69 QGraphicsEllipseItem *gridItem = static_cast<QGraphicsEllipseItem *>(gridItemList.at(i));
70 QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem *>(arrowItemList.at(i + 1));
70 QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem *>(arrowItemList.at(i + 1));
71 QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labelItemList.at(i));
71 QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labelItemList.at(i));
72 QGraphicsPathItem *shadeItem = 0;
72 QGraphicsPathItem *shadeItem = 0;
73 if (i == 0)
73 if (i == 0)
74 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
74 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
75 else if (i % 2)
75 else if (i % 2)
76 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at((i / 2) + 1));
76 shadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at((i / 2) + 1));
77
77
78 // Ignore ticks outside valid range
78 // Ignore ticks outside valid range
79 bool currentTickVisible = nextTickVisible;
79 bool currentTickVisible = nextTickVisible;
80 if ((i == layout.size() - 1)
80 if ((i == layout.size() - 1)
81 || layout.at(i + 1) < 0.0
81 || layout.at(i + 1) < 0.0
82 || layout.at(i + 1) > radius) {
82 || layout.at(i + 1) > radius) {
83 nextTickVisible = false;
83 nextTickVisible = false;
84 } else {
84 } else {
85 nextTickVisible = true;
85 nextTickVisible = true;
86 }
86 }
87
87
88 qreal labelCoordinate = radialCoordinate;
88 qreal labelCoordinate = radialCoordinate;
89 bool labelVisible = currentTickVisible;
89 bool labelVisible = currentTickVisible;
90 qreal labelPad = labelPadding() / 2.0;
90 qreal labelPad = labelPadding() / 2.0;
91 bool centeredLabel = true; // Only used with interval axes
91 bool centeredLabel = true; // Only used with interval axes
92 if (intervalAxis()) {
92 if (intervalAxis()) {
93 qreal farEdge;
93 qreal farEdge;
94 if (i == (layout.size() - 1))
94 if (i == (layout.size() - 1))
95 farEdge = radius;
95 farEdge = radius;
96 else
96 else
97 farEdge = qMin(radius, layout.at(i + 1));
97 farEdge = qMin(radius, layout.at(i + 1));
98
98
99 // Adjust the labelCoordinate to show it if next tick is visible
99 // Adjust the labelCoordinate to show it if next tick is visible
100 if (nextTickVisible)
100 if (nextTickVisible)
101 labelCoordinate = qMax(qreal(0.0), labelCoordinate);
101 labelCoordinate = qMax(qreal(0.0), labelCoordinate);
102
102
103 if (axis()->type() == QAbstractAxis::AxisTypeCategory) {
103 if (axis()->type() == QAbstractAxis::AxisTypeCategory) {
104 QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
104 QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
105 if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionOnValue)
105 if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionOnValue)
106 centeredLabel = false;
106 centeredLabel = false;
107 }
107 }
108 if (centeredLabel) {
108 if (centeredLabel) {
109 labelCoordinate = (labelCoordinate + farEdge) / 2.0;
109 labelCoordinate = (labelCoordinate + farEdge) / 2.0;
110 if (labelCoordinate > 0.0 && labelCoordinate < radius)
110 if (labelCoordinate > 0.0 && labelCoordinate < radius)
111 labelVisible = true;
111 labelVisible = true;
112 else
112 else
113 labelVisible = false;
113 labelVisible = false;
114 } else {
114 } else {
115 labelVisible = nextTickVisible;
115 labelVisible = nextTickVisible;
116 labelCoordinate = farEdge;
116 labelCoordinate = farEdge;
117 }
117 }
118 }
118 }
119
119
120 // Radial axis label
120 // Radial axis label
121 if (axis()->labelsVisible() && labelVisible) {
121 if (axis()->labelsVisible() && labelVisible) {
122 QRectF boundingRect = ChartPresenter::textBoundingRect(axis()->labelsFont(),
122 QRectF boundingRect = ChartPresenter::textBoundingRect(axis()->labelsFont(),
123 labelList.at(i),
123 labelList.at(i),
124 axis()->labelsAngle());
124 axis()->labelsAngle());
125 labelItem->setTextWidth(boundingRect.width());
125 labelItem->setTextWidth(boundingRect.width());
126 labelItem->setHtml(labelList.at(i));
126 labelItem->setHtml(labelList.at(i));
127 QRectF labelRect = labelItem->boundingRect();
127 QRectF labelRect = labelItem->boundingRect();
128 QPointF labelCenter = labelRect.center();
128 QPointF labelCenter = labelRect.center();
129 labelItem->setTransformOriginPoint(labelCenter.x(), labelCenter.y());
129 labelItem->setTransformOriginPoint(labelCenter.x(), labelCenter.y());
130 boundingRect.moveCenter(labelCenter);
130 boundingRect.moveCenter(labelCenter);
131 QPointF positionDiff(labelRect.topLeft() - boundingRect.topLeft());
131 QPointF positionDiff(labelRect.topLeft() - boundingRect.topLeft());
132 QPointF labelPoint = center;
132 QPointF labelPoint = center;
133 if (intervalAxis() && centeredLabel)
133 if (intervalAxis() && centeredLabel)
134 labelPoint += QPointF(labelPad, -labelCoordinate - (boundingRect.height() / 2.0));
134 labelPoint += QPointF(labelPad, -labelCoordinate - (boundingRect.height() / 2.0));
135 else
135 else
136 labelPoint += QPointF(labelPad, labelPad - labelCoordinate);
136 labelPoint += QPointF(labelPad, labelPad - labelCoordinate);
137 labelRect.moveTopLeft(labelPoint);
137 labelRect.moveTopLeft(labelPoint);
138 labelItem->setPos(labelRect.topLeft() + positionDiff);
138 labelItem->setPos(labelRect.topLeft() + positionDiff);
139
139
140 // Label overlap detection
140 // Label overlap detection
141 labelRect.setSize(boundingRect.size());
141 labelRect.setSize(boundingRect.size());
142 if ((i && previousLabelRect.intersects(labelRect))
142 if ((i && previousLabelRect.intersects(labelRect))
143 || !axisGeometry().contains(labelRect)) {
143 || !axisGeometry().contains(labelRect)) {
144 labelVisible = false;
144 labelVisible = false;
145 } else {
145 } else {
146 previousLabelRect = labelRect;
146 previousLabelRect = labelRect;
147 labelVisible = true;
147 labelVisible = true;
148 }
148 }
149 }
149 }
150
150
151 labelItem->setVisible(labelVisible);
151 labelItem->setVisible(labelVisible);
152 if (!currentTickVisible) {
152 if (!currentTickVisible) {
153 gridItem->setVisible(false);
153 gridItem->setVisible(false);
154 tickItem->setVisible(false);
154 tickItem->setVisible(false);
155 if (shadeItem)
155 if (shadeItem)
156 shadeItem->setVisible(false);
156 shadeItem->setVisible(false);
157 continue;
157 continue;
158 }
158 }
159
159
160 // Radial grid line
160 // Radial grid line
161 QRectF gridRect;
161 QRectF gridRect;
162 gridRect.setWidth(radialCoordinate * 2.0);
162 gridRect.setWidth(radialCoordinate * 2.0);
163 gridRect.setHeight(radialCoordinate * 2.0);
163 gridRect.setHeight(radialCoordinate * 2.0);
164 gridRect.moveCenter(center);
164 gridRect.moveCenter(center);
165
165
166 gridItem->setRect(gridRect);
166 gridItem->setRect(gridRect);
167 gridItem->setVisible(true);
167 gridItem->setVisible(true);
168
168
169 // Tick
169 // Tick
170 QLineF tickLine(-tickWidth(), 0.0, tickWidth(), 0.0);
170 QLineF tickLine(-tickWidth(), 0.0, tickWidth(), 0.0);
171 tickLine.translate(center.rx(), gridRect.top());
171 tickLine.translate(center.rx(), gridRect.top());
172 tickItem->setLine(tickLine);
172 tickItem->setLine(tickLine);
173 tickItem->setVisible(true);
173 tickItem->setVisible(true);
174
174
175 // Shades
175 // Shades
176 if (i % 2 || (i == 0 && !nextTickVisible)) {
176 if (i % 2 || (i == 0 && !nextTickVisible)) {
177 QPainterPath path;
177 QPainterPath path;
178 if (i == 0) {
178 if (i == 0) {
179 // If first tick is also the last, we need to custom fill the inner circle
179 // If first tick is also the last, we need to custom fill the inner circle
180 // or it won't get filled.
180 // or it won't get filled.
181 QRectF innerCircle(0.0, 0.0, layout.at(0) * 2.0, layout.at(0) * 2.0);
181 QRectF innerCircle(0.0, 0.0, layout.at(0) * 2.0, layout.at(0) * 2.0);
182 innerCircle.moveCenter(center);
182 innerCircle.moveCenter(center);
183 path.addEllipse(innerCircle);
183 path.addEllipse(innerCircle);
184 } else {
184 } else {
185 QRectF otherGridRect;
185 QRectF otherGridRect;
186 if (!nextTickVisible) { // Last visible tick
186 if (!nextTickVisible) { // Last visible tick
187 otherGridRect = axisGeometry();
187 otherGridRect = axisGeometry();
188 } else {
188 } else {
189 qreal otherGridRectDimension = layout.at(i + 1) * 2.0;
189 qreal otherGridRectDimension = layout.at(i + 1) * 2.0;
190 otherGridRect.setWidth(otherGridRectDimension);
190 otherGridRect.setWidth(otherGridRectDimension);
191 otherGridRect.setHeight(otherGridRectDimension);
191 otherGridRect.setHeight(otherGridRectDimension);
192 otherGridRect.moveCenter(center);
192 otherGridRect.moveCenter(center);
193 }
193 }
194 path.addEllipse(gridRect);
194 path.addEllipse(gridRect);
195 path.addEllipse(otherGridRect);
195 path.addEllipse(otherGridRect);
196
196
197 // Add additional shading in first visible shade item if there is a partial tick
197 // Add additional shading in first visible shade item if there is a partial tick
198 // to be filled at the center (log & category axes)
198 // to be filled at the center (log & category axes)
199 if (firstShade) {
199 if (firstShade) {
200 QGraphicsPathItem *specialShadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
200 QGraphicsPathItem *specialShadeItem = static_cast<QGraphicsPathItem *>(shadeItemList.at(0));
201 if (layout.at(i - 1) > 0.0) {
201 if (layout.at(i - 1) > 0.0) {
202 QRectF innerCircle(0.0, 0.0, layout.at(i - 1) * 2.0, layout.at(i - 1) * 2.0);
202 QRectF innerCircle(0.0, 0.0, layout.at(i - 1) * 2.0, layout.at(i - 1) * 2.0);
203 innerCircle.moveCenter(center);
203 innerCircle.moveCenter(center);
204 QPainterPath specialPath;
204 QPainterPath specialPath;
205 specialPath.addEllipse(innerCircle);
205 specialPath.addEllipse(innerCircle);
206 specialShadeItem->setPath(specialPath);
206 specialShadeItem->setPath(specialPath);
207 specialShadeItem->setVisible(true);
207 specialShadeItem->setVisible(true);
208 } else {
208 } else {
209 specialShadeItem->setVisible(false);
209 specialShadeItem->setVisible(false);
210 }
210 }
211 }
211 }
212 }
212 }
213 shadeItem->setPath(path);
213 shadeItem->setPath(path);
214 shadeItem->setVisible(true);
214 shadeItem->setVisible(true);
215 firstShade = false;
215 firstShade = false;
216 }
216 }
217
217
218 // Minor ticks
218 // Minor ticks
219 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
219 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
220 if ((i + 1) != layout.size() && valueAxis) {
220 if ((i + 1) != layout.size() && valueAxis) {
221 int minorTickCount = valueAxis->minorTickCount();
221 int minorTickCount = valueAxis->minorTickCount();
222 if (minorTickCount != 0) {
222 if (minorTickCount != 0) {
223 qreal minorRadialCoordinate = (layout[i + 1] - layout[i])
223 qreal minorRadialCoordinate = (layout[i + 1] - layout[i])
224 / qreal(minorTickCount + 1) * 2.0;
224 / qreal(minorTickCount + 1) * 2.0;
225 for (int j = 0; j < minorTickCount; j++) {
225 for (int j = 0; j < minorTickCount; j++) {
226 QGraphicsEllipseItem *minorGridItem =
226 QGraphicsEllipseItem *minorGridItem =
227 static_cast<QGraphicsEllipseItem *>(minorGridItemList.at(i * minorTickCount + j));
227 static_cast<QGraphicsEllipseItem *>(minorGridItemList.at(i * minorTickCount + j));
228 QGraphicsLineItem *minorTickItem =
228 QGraphicsLineItem *minorTickItem =
229 static_cast<QGraphicsLineItem *>(minorArrowItemList.at(i * minorTickCount + j));
229 static_cast<QGraphicsLineItem *>(minorArrowItemList.at(i * minorTickCount + j));
230
230
231 QRectF minorGridRect;
231 QRectF minorGridRect;
232 minorGridRect.setWidth(minorRadialCoordinate * qreal(i + 1)
232 minorGridRect.setWidth(minorRadialCoordinate * qreal(i + 1)
233 + minorRadialCoordinate * qreal(i * minorTickCount + j));
233 + minorRadialCoordinate * qreal(i * minorTickCount + j));
234 minorGridRect.setHeight(minorRadialCoordinate * qreal(i + 1)
234 minorGridRect.setHeight(minorRadialCoordinate * qreal(i + 1)
235 + minorRadialCoordinate
235 + minorRadialCoordinate
236 * qreal(i * minorTickCount + j));
236 * qreal(i * minorTickCount + j));
237 minorGridRect.moveCenter(center);
237 minorGridRect.moveCenter(center);
238 minorGridItem->setRect(minorGridRect);
238 minorGridItem->setRect(minorGridRect);
239 minorGridItem->setVisible(true);
239 minorGridItem->setVisible(true);
240
240
241 QLineF minorTickLine(-tickWidth() + 1, 0.0, tickWidth() - 1, 0.0);
241 QLineF minorTickLine(-tickWidth() + 1, 0.0, tickWidth() - 1, 0.0);
242 tickLine.translate(center.rx(), minorGridRect.top());
242 tickLine.translate(center.rx(), minorGridRect.top());
243 minorTickItem->setLine(minorTickLine);
243 minorTickItem->setLine(minorTickLine);
244 minorTickItem->setVisible(true);
244 minorTickItem->setVisible(true);
245 }
245 }
246 }
246 }
247 }
247 }
248 }
248 }
249
249
250 // Title, along the 0 axis
250 // Title, along the 0 axis
251 QString titleText = axis()->titleText();
251 QString titleText = axis()->titleText();
252 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
252 if (!titleText.isEmpty() && axis()->isTitleVisible()) {
253 QRectF truncatedRect;
253 QRectF truncatedRect;
254 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0),
254 title->setHtml(ChartPresenter::truncatedText(axis()->titleFont(), titleText, qreal(0.0),
255 radius, radius, truncatedRect));
255 radius, radius, truncatedRect));
256 title->setTextWidth(truncatedRect.width());
256 title->setTextWidth(truncatedRect.width());
257
257
258 QRectF titleBoundingRect = title->boundingRect();
258 QRectF titleBoundingRect = title->boundingRect();
259 QPointF titleCenter = titleBoundingRect.center();
259 QPointF titleCenter = titleBoundingRect.center();
260 QPointF arrowCenter = axisLine->boundingRect().center();
260 QPointF arrowCenter = axisLine->boundingRect().center();
261 QPointF titleCenterDiff = arrowCenter - titleCenter;
261 QPointF titleCenterDiff = arrowCenter - titleCenter;
262 title->setPos(titleCenterDiff.x() - titlePadding() - (titleBoundingRect.height() / 2.0), titleCenterDiff.y());
262 title->setPos(titleCenterDiff.x() - titlePadding() - (titleBoundingRect.height() / 2.0), titleCenterDiff.y());
263 title->setTransformOriginPoint(titleCenter);
263 title->setTransformOriginPoint(titleCenter);
264 title->setRotation(270.0);
264 title->setRotation(270.0);
265 }
265 }
266
266
267 QGraphicsLayoutItem::updateGeometry();
267 QGraphicsLayoutItem::updateGeometry();
268 }
268 }
269
269
270 Qt::Orientation PolarChartAxisRadial::orientation() const
270 Qt::Orientation PolarChartAxisRadial::orientation() const
271 {
271 {
272 return Qt::Vertical;
272 return Qt::Vertical;
273 }
273 }
274
274
275 void PolarChartAxisRadial::createItems(int count)
275 void PolarChartAxisRadial::createItems(int count)
276 {
276 {
277 if (arrowItems().count() == 0) {
277 if (arrowItems().count() == 0) {
278 // radial axis center line
278 // radial axis center line
279 QGraphicsLineItem *arrow = new LineArrowItem(this, presenter()->rootItem());
279 QGraphicsLineItem *arrow = new LineArrowItem(this, presenter()->rootItem());
280 arrow->setPen(axis()->linePen());
280 arrow->setPen(axis()->linePen());
281 arrowGroup()->addToGroup(arrow);
281 arrowGroup()->addToGroup(arrow);
282 }
282 }
283
283
284 QGraphicsTextItem *title = titleItem();
284 QGraphicsTextItem *title = titleItem();
285 title->setFont(axis()->titleFont());
285 title->setFont(axis()->titleFont());
286 title->setDefaultTextColor(axis()->titleBrush().color());
286 title->setDefaultTextColor(axis()->titleBrush().color());
287 title->setHtml(axis()->titleText());
287 title->setHtml(axis()->titleText());
288
288
289 for (int i = 0; i < count; ++i) {
289 for (int i = 0; i < count; ++i) {
290 QGraphicsLineItem *arrow = new QGraphicsLineItem(presenter()->rootItem());
290 QGraphicsLineItem *arrow = new QGraphicsLineItem(presenter()->rootItem());
291 QGraphicsEllipseItem *grid = new QGraphicsEllipseItem(presenter()->rootItem());
291 QGraphicsEllipseItem *grid = new QGraphicsEllipseItem(presenter()->rootItem());
292 QGraphicsTextItem *label = new QGraphicsTextItem(presenter()->rootItem());
292 QGraphicsTextItem *label = new QGraphicsTextItem(presenter()->rootItem());
293 label->document()->setDocumentMargin(ChartPresenter::textMargin());
293 label->document()->setDocumentMargin(ChartPresenter::textMargin());
294 arrow->setPen(axis()->linePen());
294 arrow->setPen(axis()->linePen());
295 grid->setPen(axis()->gridLinePen());
295 grid->setPen(axis()->gridLinePen());
296 label->setFont(axis()->labelsFont());
296 label->setFont(axis()->labelsFont());
297 label->setDefaultTextColor(axis()->labelsBrush().color());
297 label->setDefaultTextColor(axis()->labelsBrush().color());
298 label->setRotation(axis()->labelsAngle());
298 label->setRotation(axis()->labelsAngle());
299 arrowGroup()->addToGroup(arrow);
299 arrowGroup()->addToGroup(arrow);
300 gridGroup()->addToGroup(grid);
300 gridGroup()->addToGroup(grid);
301 labelGroup()->addToGroup(label);
301 labelGroup()->addToGroup(label);
302 if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
302 if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
303 QGraphicsPathItem *shade = new QGraphicsPathItem(presenter()->rootItem());
303 QGraphicsPathItem *shade = new QGraphicsPathItem(presenter()->rootItem());
304 shade->setPen(axis()->shadesPen());
304 shade->setPen(axis()->shadesPen());
305 shade->setBrush(axis()->shadesBrush());
305 shade->setBrush(axis()->shadesBrush());
306 shadeGroup()->addToGroup(shade);
306 shadeGroup()->addToGroup(shade);
307 }
307 }
308 }
308 }
309 }
309 }
310
310
311 void PolarChartAxisRadial::handleArrowPenChanged(const QPen &pen)
311 void PolarChartAxisRadial::handleArrowPenChanged(const QPen &pen)
312 {
312 {
313 foreach (QGraphicsItem *item, arrowItems())
313 foreach (QGraphicsItem *item, arrowItems())
314 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
314 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
315 }
315 }
316
316
317 void PolarChartAxisRadial::handleGridPenChanged(const QPen &pen)
317 void PolarChartAxisRadial::handleGridPenChanged(const QPen &pen)
318 {
318 {
319 foreach (QGraphicsItem *item, gridItems())
319 foreach (QGraphicsItem *item, gridItems())
320 static_cast<QGraphicsEllipseItem *>(item)->setPen(pen);
320 static_cast<QGraphicsEllipseItem *>(item)->setPen(pen);
321 }
321 }
322
322
323 void PolarChartAxisRadial::handleMinorArrowPenChanged(const QPen &pen)
323 void PolarChartAxisRadial::handleMinorArrowPenChanged(const QPen &pen)
324 {
324 {
325 foreach (QGraphicsItem *item, minorArrowItems())
325 foreach (QGraphicsItem *item, minorArrowItems())
326 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
326 static_cast<QGraphicsLineItem *>(item)->setPen(pen);
327 }
327 }
328
328
329 void PolarChartAxisRadial::handleMinorGridPenChanged(const QPen &pen)
329 void PolarChartAxisRadial::handleMinorGridPenChanged(const QPen &pen)
330 {
330 {
331 foreach (QGraphicsItem *item, minorGridItems())
331 foreach (QGraphicsItem *item, minorGridItems())
332 static_cast<QGraphicsEllipseItem *>(item)->setPen(pen);
332 static_cast<QGraphicsEllipseItem *>(item)->setPen(pen);
333 }
333 }
334
334
335 void PolarChartAxisRadial::handleGridLineColorChanged(const QColor &color)
336 {
337 foreach (QGraphicsItem *item, gridItems()) {
338 QGraphicsEllipseItem *ellipseItem = static_cast<QGraphicsEllipseItem *>(item);
339 QPen pen = ellipseItem->pen();
340 pen.setColor(color);
341 ellipseItem->setPen(pen);
342 }
343 }
344
345 void PolarChartAxisRadial::handleMinorGridLineColorChanged(const QColor &color)
346 {
347 foreach (QGraphicsItem *item, minorGridItems()) {
348 QGraphicsEllipseItem *ellipseItem = static_cast<QGraphicsEllipseItem *>(item);
349 QPen pen = ellipseItem->pen();
350 pen.setColor(color);
351 ellipseItem->setPen(pen);
352 }
353 }
354
335 QSizeF PolarChartAxisRadial::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
355 QSizeF PolarChartAxisRadial::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
336 {
356 {
337 Q_UNUSED(which);
357 Q_UNUSED(which);
338 Q_UNUSED(constraint);
358 Q_UNUSED(constraint);
339 return QSizeF(-1.0, -1.0);
359 return QSizeF(-1.0, -1.0);
340 }
360 }
341
361
342 qreal PolarChartAxisRadial::preferredAxisRadius(const QSizeF &maxSize)
362 qreal PolarChartAxisRadial::preferredAxisRadius(const QSizeF &maxSize)
343 {
363 {
344 qreal radius = maxSize.height() / 2.0;
364 qreal radius = maxSize.height() / 2.0;
345 if (maxSize.width() < maxSize.height())
365 if (maxSize.width() < maxSize.height())
346 radius = maxSize.width() / 2.0;
366 radius = maxSize.width() / 2.0;
347 return radius;
367 return radius;
348 }
368 }
349
369
350 void PolarChartAxisRadial::updateMinorTickItems()
370 void PolarChartAxisRadial::updateMinorTickItems()
351 {
371 {
352 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(this->axis());
372 QValueAxis *valueAxis = qobject_cast<QValueAxis *>(this->axis());
353 if (valueAxis) {
373 if (valueAxis) {
354 int currentCount = minorArrowItems().size();
374 int currentCount = minorArrowItems().size();
355 int expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
375 int expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
356 int diff = expectedCount - currentCount;
376 int diff = expectedCount - currentCount;
357 if (diff > 0) {
377 if (diff > 0) {
358 for (int i = 0; i < diff; i++) {
378 for (int i = 0; i < diff; i++) {
359 QGraphicsLineItem *minorArrow = new QGraphicsLineItem(presenter()->rootItem());
379 QGraphicsLineItem *minorArrow = new QGraphicsLineItem(presenter()->rootItem());
360 QGraphicsEllipseItem *minorGrid = new QGraphicsEllipseItem(presenter()->rootItem());
380 QGraphicsEllipseItem *minorGrid = new QGraphicsEllipseItem(presenter()->rootItem());
361 minorArrow->setPen(valueAxis->linePen());
381 minorArrow->setPen(valueAxis->linePen());
362 minorGrid->setPen(valueAxis->minorGridLinePen());
382 minorGrid->setPen(valueAxis->minorGridLinePen());
363 minorArrowGroup()->addToGroup(minorArrow);
383 minorArrowGroup()->addToGroup(minorArrow);
364 minorGridGroup()->addToGroup(minorGrid);
384 minorGridGroup()->addToGroup(minorGrid);
365 }
385 }
366 } else {
386 } else {
367 QList<QGraphicsItem *> minorGridLines = minorGridItems();
387 QList<QGraphicsItem *> minorGridLines = minorGridItems();
368 QList<QGraphicsItem *> minorArrows = minorArrowItems();
388 QList<QGraphicsItem *> minorArrows = minorArrowItems();
369 for (int i = 0; i > diff; i--) {
389 for (int i = 0; i > diff; i--) {
370 if (!minorGridLines.isEmpty())
390 if (!minorGridLines.isEmpty())
371 delete(minorGridLines.takeLast());
391 delete(minorGridLines.takeLast());
372 if (!minorArrows.isEmpty())
392 if (!minorArrows.isEmpty())
373 delete(minorArrows.takeLast());
393 delete(minorArrows.takeLast());
374 }
394 }
375 }
395 }
376 }
396 }
377 }
397 }
378
398
379 #include "moc_polarchartaxisradial_p.cpp"
399 #include "moc_polarchartaxisradial_p.cpp"
380
400
381 QT_CHARTS_END_NAMESPACE
401 QT_CHARTS_END_NAMESPACE
@@ -1,61 +1,63
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 // W A R N I N G
19 // W A R N I N G
20 // -------------
20 // -------------
21 //
21 //
22 // This file is not part of the Qt Chart API. It exists purely as an
22 // This file is not part of the Qt Chart API. It exists purely as an
23 // implementation detail. This header file may change from version to
23 // implementation detail. This header file may change from version to
24 // version without notice, or even be removed.
24 // version without notice, or even be removed.
25 //
25 //
26 // We mean it.
26 // We mean it.
27
27
28 #ifndef POLARCHARTAXISRADIAL_P_H
28 #ifndef POLARCHARTAXISRADIAL_P_H
29 #define POLARCHARTAXISRADIAL_P_H
29 #define POLARCHARTAXISRADIAL_P_H
30
30
31 #include <private/polarchartaxis_p.h>
31 #include <private/polarchartaxis_p.h>
32 #include <QtCharts/QValueAxis>
32 #include <QtCharts/QValueAxis>
33
33
34 QT_CHARTS_BEGIN_NAMESPACE
34 QT_CHARTS_BEGIN_NAMESPACE
35
35
36 class PolarChartAxisRadial : public PolarChartAxis
36 class PolarChartAxisRadial : public PolarChartAxis
37 {
37 {
38 Q_OBJECT
38 Q_OBJECT
39 public:
39 public:
40 PolarChartAxisRadial(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
40 PolarChartAxisRadial(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
41 ~PolarChartAxisRadial();
41 ~PolarChartAxisRadial();
42
42
43 Qt::Orientation orientation() const;
43 Qt::Orientation orientation() const;
44 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
44 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
45
45
46 virtual void updateGeometry();
46 virtual void updateGeometry();
47 virtual void createItems(int count);
47 virtual void createItems(int count);
48 virtual void updateMinorTickItems();
48 virtual void updateMinorTickItems();
49
49
50 qreal preferredAxisRadius(const QSizeF &maxSize);
50 qreal preferredAxisRadius(const QSizeF &maxSize);
51
51
52 public Q_SLOTS:
52 public Q_SLOTS:
53 virtual void handleArrowPenChanged(const QPen &pen);
53 virtual void handleArrowPenChanged(const QPen &pen);
54 virtual void handleGridPenChanged(const QPen &pen);
54 virtual void handleGridPenChanged(const QPen &pen);
55 virtual void handleMinorArrowPenChanged(const QPen &pen);
55 virtual void handleMinorArrowPenChanged(const QPen &pen);
56 virtual void handleMinorGridPenChanged(const QPen &pen);
56 virtual void handleMinorGridPenChanged(const QPen &pen);
57 virtual void handleGridLineColorChanged(const QColor &color);
58 virtual void handleMinorGridLineColorChanged(const QColor &color);
57 };
59 };
58
60
59 QT_CHARTS_END_NAMESPACE
61 QT_CHARTS_END_NAMESPACE
60
62
61 #endif // POLARCHARTAXISRADIAL_P_H
63 #endif // POLARCHARTAXISRADIAL_P_H
@@ -1,1040 +1,1090
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include <QtCharts/QAbstractAxis>
19 #include <QtCharts/QAbstractAxis>
20 #include <private/qabstractaxis_p.h>
20 #include <private/qabstractaxis_p.h>
21 #include <private/chartdataset_p.h>
21 #include <private/chartdataset_p.h>
22 #include <private/charttheme_p.h>
22 #include <private/charttheme_p.h>
23 #include <private/qchart_p.h>
23 #include <private/qchart_p.h>
24
24
25 QT_CHARTS_BEGIN_NAMESPACE
25 QT_CHARTS_BEGIN_NAMESPACE
26
26
27 /*!
27 /*!
28 \class QAbstractAxis
28 \class QAbstractAxis
29 \inmodule Qt Charts
29 \inmodule Qt Charts
30 \brief The QAbstractAxis class is used for manipulating chart's axis.
30 \brief The QAbstractAxis class is used for manipulating chart's axis.
31
31
32 Each series can be bound to one or more horizontal and vertical axes, but mixing axis types
32 Each series can be bound to one or more horizontal and vertical axes, but mixing axis types
33 that would result in different domains is not supported, such as specifying
33 that would result in different domains is not supported, such as specifying
34 QValueAxis and QLogValueAxis on the same orientation.
34 QValueAxis and QLogValueAxis on the same orientation.
35
35
36 Properties and visibility of various axis elements such as axis line, title, labels, grid lines,
36 Properties and visibility of various axis elements such as axis line, title, labels, grid lines,
37 and shades can be individually controlled.
37 and shades can be individually controlled.
38 */
38 */
39 /*!
39 /*!
40 \qmltype AbstractAxis
40 \qmltype AbstractAxis
41 \instantiates QAbstractAxis
41 \instantiates QAbstractAxis
42 \inqmlmodule QtCharts
42 \inqmlmodule QtCharts
43
43
44 \brief The AbstractAxis is a base element used for specialized axis elements.
44 \brief The AbstractAxis is a base element used for specialized axis elements.
45
45
46 Each series can be bound to only one horizontal and vertical axis.
46 Each series can be bound to only one horizontal and vertical axis.
47
47
48 Properties and visibility of various axis elements such as axis line, title, labels, grid lines,
48 Properties and visibility of various axis elements such as axis line, title, labels, grid lines,
49 and shades can be individually controlled.
49 and shades can be individually controlled.
50 */
50 */
51
51
52 /*!
52 /*!
53 \enum QAbstractAxis::AxisType
53 \enum QAbstractAxis::AxisType
54
54
55 The type of the axis object.
55 The type of the axis object.
56
56
57 \value AxisTypeNoAxis
57 \value AxisTypeNoAxis
58 \value AxisTypeValue
58 \value AxisTypeValue
59 \value AxisTypeBarCategory
59 \value AxisTypeBarCategory
60 \value AxisTypeCategory
60 \value AxisTypeCategory
61 \value AxisTypeDateTime
61 \value AxisTypeDateTime
62 \value AxisTypeLogValue
62 \value AxisTypeLogValue
63 */
63 */
64
64
65 /*!
65 /*!
66 *\fn void QAbstractAxis::type() const
66 *\fn void QAbstractAxis::type() const
67 Returns the type of the axis
67 Returns the type of the axis
68 */
68 */
69
69
70 /*!
70 /*!
71 \property QAbstractAxis::lineVisible
71 \property QAbstractAxis::lineVisible
72 The visibility of the axis line
72 The visibility of the axis line
73 */
73 */
74 /*!
74 /*!
75 \qmlproperty bool AbstractAxis::lineVisible
75 \qmlproperty bool AbstractAxis::lineVisible
76 The visibility of the axis line
76 The visibility of the axis line
77 */
77 */
78
78
79 /*!
79 /*!
80 \property QAbstractAxis::linePen
80 \property QAbstractAxis::linePen
81 The pen of the line.
81 The pen of the line.
82 */
82 */
83
83
84 /*!
84 /*!
85 \property QAbstractAxis::labelsVisible
85 \property QAbstractAxis::labelsVisible
86 Defines if axis labels are visible.
86 Defines if axis labels are visible.
87 */
87 */
88 /*!
88 /*!
89 \qmlproperty bool AbstractAxis::labelsVisible
89 \qmlproperty bool AbstractAxis::labelsVisible
90 Defines if axis labels are visible.
90 Defines if axis labels are visible.
91 */
91 */
92
92
93 /*!
93 /*!
94 \property QAbstractAxis::labelsBrush
94 \property QAbstractAxis::labelsBrush
95 The brush of the labels. Only the color of the brush is relevant.
95 The brush of the labels. Only the color of the brush is relevant.
96 */
96 */
97
97
98 /*!
98 /*!
99 \property QAbstractAxis::visible
99 \property QAbstractAxis::visible
100 The visibility of the axis.
100 The visibility of the axis.
101 */
101 */
102 /*!
102 /*!
103 \qmlproperty bool AbstractAxis::visible
103 \qmlproperty bool AbstractAxis::visible
104 The visibility of the axis.
104 The visibility of the axis.
105 */
105 */
106
106
107 /*!
107 /*!
108 \property QAbstractAxis::gridVisible
108 \property QAbstractAxis::gridVisible
109 The visibility of the grid lines.
109 The visibility of the grid lines.
110 */
110 */
111 /*!
111 /*!
112 \qmlproperty bool AbstractAxis::gridVisible
112 \qmlproperty bool AbstractAxis::gridVisible
113 The visibility of the grid lines.
113 The visibility of the grid lines.
114 */
114 */
115
115
116 /*!
116 /*!
117 \property QAbstractAxis::minorGridVisible
117 \property QAbstractAxis::minorGridVisible
118 The visibility of the minor grid lines. Applies only to QValueAxis.
118 The visibility of the minor grid lines. Applies only to QValueAxis.
119 */
119 */
120 /*!
120 /*!
121 \qmlproperty bool AbstractAxis::minorGridVisible
121 \qmlproperty bool AbstractAxis::minorGridVisible
122 The visibility of the minor grid lines. Applies only to QValueAxis.
122 The visibility of the minor grid lines. Applies only to QValueAxis.
123 */
123 */
124
124
125 /*!
125 /*!
126 \property QAbstractAxis::color
126 \property QAbstractAxis::color
127 The color of the axis and ticks.
127 The color of the axis and ticks.
128 */
128 */
129 /*!
129 /*!
130 \qmlproperty color AbstractAxis::color
130 \qmlproperty color AbstractAxis::color
131 The color of the axis and ticks.
131 The color of the axis and ticks.
132 */
132 */
133
133
134 /*!
134 /*!
135 \property QAbstractAxis::gridLinePen
135 \property QAbstractAxis::gridLinePen
136 The pen of the grid line.
136 The pen of the grid line.
137 */
137 */
138
138
139 /*!
139 /*!
140 \property QAbstractAxis::minorGridLinePen
140 \property QAbstractAxis::minorGridLinePen
141 The pen of the minor grid line. Applies only to QValueAxis.
141 The pen of the minor grid line. Applies only to QValueAxis.
142 */
142 */
143
143
144 /*!
144 /*!
145 \property QAbstractAxis::gridLineColor
146 The color of the grid line.
147 */
148
149 /*!
150 \property QAbstractAxis::minorGridLineColor
151 The color of the minor grid line. Applies only to QValueAxis.
152 */
153
154 /*!
145 \property QAbstractAxis::labelsFont
155 \property QAbstractAxis::labelsFont
146 The font of the axis labels.
156 The font of the axis labels.
147 */
157 */
148
158
149 /*!
159 /*!
150 \qmlproperty Font AbstractAxis::labelsFont
160 \qmlproperty Font AbstractAxis::labelsFont
151 The font of the axis labels.
161 The font of the axis labels.
152
162
153 See the Qt documentation for more details of Font.
163 See the Qt documentation for more details of Font.
154 */
164 */
155
165
156 /*!
166 /*!
157 \property QAbstractAxis::labelsColor
167 \property QAbstractAxis::labelsColor
158 The color of the axis labels.
168 The color of the axis labels.
159 */
169 */
160 /*!
170 /*!
161 \qmlproperty color AbstractAxis::labelsColor
171 \qmlproperty color AbstractAxis::labelsColor
162 The color of the axis labels.
172 The color of the axis labels.
163 */
173 */
164
174
165 /*!
175 /*!
166 \property QAbstractAxis::labelsAngle
176 \property QAbstractAxis::labelsAngle
167 The angle of the axis labels in degrees.
177 The angle of the axis labels in degrees.
168 */
178 */
169 /*!
179 /*!
170 \qmlproperty int AbstractAxis::labelsAngle
180 \qmlproperty int AbstractAxis::labelsAngle
171 The angle of the axis labels in degrees.
181 The angle of the axis labels in degrees.
172 */
182 */
173
183
174 /*!
184 /*!
175 \property QAbstractAxis::shadesVisible
185 \property QAbstractAxis::shadesVisible
176 The visibility of the axis shades.
186 The visibility of the axis shades.
177 */
187 */
178 /*!
188 /*!
179 \qmlproperty bool AbstractAxis::shadesVisible
189 \qmlproperty bool AbstractAxis::shadesVisible
180 The visibility of the axis shades.
190 The visibility of the axis shades.
181 */
191 */
182
192
183 /*!
193 /*!
184 \property QAbstractAxis::shadesColor
194 \property QAbstractAxis::shadesColor
185 The fill (brush) color of the axis shades.
195 The fill (brush) color of the axis shades.
186 */
196 */
187 /*!
197 /*!
188 \qmlproperty color AbstractAxis::shadesColor
198 \qmlproperty color AbstractAxis::shadesColor
189 The fill (brush) color of the axis shades.
199 The fill (brush) color of the axis shades.
190 */
200 */
191
201
192 /*!
202 /*!
193 \property QAbstractAxis::shadesBorderColor
203 \property QAbstractAxis::shadesBorderColor
194 The border (pen) color of the axis shades.
204 The border (pen) color of the axis shades.
195 */
205 */
196 /*!
206 /*!
197 \qmlproperty color AbstractAxis::shadesBorderColor
207 \qmlproperty color AbstractAxis::shadesBorderColor
198 The border (pen) color of the axis shades.
208 The border (pen) color of the axis shades.
199 */
209 */
200
210
201 /*!
211 /*!
202 \property QAbstractAxis::shadesPen
212 \property QAbstractAxis::shadesPen
203 The pen of the axis shades (area between grid lines).
213 The pen of the axis shades (area between grid lines).
204 */
214 */
205
215
206 /*!
216 /*!
207 \property QAbstractAxis::shadesBrush
217 \property QAbstractAxis::shadesBrush
208 The brush of the axis shades (area between grid lines).
218 The brush of the axis shades (area between grid lines).
209 */
219 */
210
220
211 /*!
221 /*!
212 \property QAbstractAxis::titleVisible
222 \property QAbstractAxis::titleVisible
213 The visibility of the axis title. By default the value is true.
223 The visibility of the axis title. By default the value is true.
214 */
224 */
215 /*!
225 /*!
216 \qmlproperty bool AbstractAxis::titleVisible
226 \qmlproperty bool AbstractAxis::titleVisible
217 The visibility of the axis title. By default the value is true.
227 The visibility of the axis title. By default the value is true.
218 */
228 */
219
229
220 /*!
230 /*!
221 \property QAbstractAxis::titleText
231 \property QAbstractAxis::titleText
222 The title of the axis. Empty by default. Axis titles support html formatting.
232 The title of the axis. Empty by default. Axis titles support html formatting.
223 */
233 */
224 /*!
234 /*!
225 \qmlproperty String AbstractAxis::titleText
235 \qmlproperty String AbstractAxis::titleText
226 The title of the axis. Empty by default. Axis titles support html formatting.
236 The title of the axis. Empty by default. Axis titles support html formatting.
227 */
237 */
228
238
229 /*!
239 /*!
230 \property QAbstractAxis::titleBrush
240 \property QAbstractAxis::titleBrush
231 The brush of the title text. Only the color of the brush is relevant.
241 The brush of the title text. Only the color of the brush is relevant.
232 */
242 */
233
243
234 /*!
244 /*!
235 \property QAbstractAxis::titleFont
245 \property QAbstractAxis::titleFont
236 The font of the title of the axis.
246 The font of the title of the axis.
237 */
247 */
238 /*!
248 /*!
239 \qmlproperty Font AbstractAxis::titleFont
249 \qmlproperty Font AbstractAxis::titleFont
240 The font of the title of the axis.
250 The font of the title of the axis.
241 */
251 */
242
252
243 /*!
253 /*!
244 \property QAbstractAxis::orientation
254 \property QAbstractAxis::orientation
245 The orientation of the axis. Fixed to either Qt::Horizontal or Qt::Vertical when you add the axis to a chart.
255 The orientation of the axis. Fixed to either Qt::Horizontal or Qt::Vertical when you add the axis to a chart.
246 */
256 */
247 /*!
257 /*!
248 \qmlproperty Qt.Orientation AbstractAxis::orientation
258 \qmlproperty Qt.Orientation AbstractAxis::orientation
249 The orientation of the axis. Fixed to either Qt.Horizontal or Qt.Vertical when the axis is set to a series.
259 The orientation of the axis. Fixed to either Qt.Horizontal or Qt.Vertical when the axis is set to a series.
250 */
260 */
251
261
252 /*!
262 /*!
253 \property QAbstractAxis::alignment
263 \property QAbstractAxis::alignment
254 The alignment of the axis. Can be Qt::AlignLeft, Qt::AlignRight, Qt::AlignBottom, or Qt::AlignTop.
264 The alignment of the axis. Can be Qt::AlignLeft, Qt::AlignRight, Qt::AlignBottom, or Qt::AlignTop.
255 */
265 */
256 /*!
266 /*!
257 \qmlproperty alignment AbstractAxis::alignment
267 \qmlproperty alignment AbstractAxis::alignment
258 The alignment of the axis. Can be Qt.AlignLeft, Qt.AlignRight, Qt.AlignBottom, or Qt.AlignTop.
268 The alignment of the axis. Can be Qt.AlignLeft, Qt.AlignRight, Qt.AlignBottom, or Qt.AlignTop.
259 */
269 */
260
270
261 /*!
271 /*!
262 \property QAbstractAxis::reverse
272 \property QAbstractAxis::reverse
263 The reverse property defines if reverse axis is used. By default the value is false.
273 The reverse property defines if reverse axis is used. By default the value is false.
264
274
265 Reverse axis is supported with line, spline, scatter and area series with cartesian chart.
275 Reverse axis is supported with line, spline, scatter and area series with cartesian chart.
266 All axes of the same orientation attached to same series must be reversed if one is reversed or
276 All axes of the same orientation attached to same series must be reversed if one is reversed or
267 the behavior is undefined.
277 the behavior is undefined.
268 */
278 */
269 /*!
279 /*!
270 \qmlproperty alignment AbstractAxis::reverse
280 \qmlproperty alignment AbstractAxis::reverse
271 The reverse property defines if reverse axis is used. By default the value is false.
281 The reverse property defines if reverse axis is used. By default the value is false.
272
282
273 Reverse axis is supported with line, spline, scatter and area series with cartesian chart.
283 Reverse axis is supported with line, spline, scatter and area series with cartesian chart.
274 All axes of the same orientation attached to same series must be reversed if one is reversed or
284 All axes of the same orientation attached to same series must be reversed if one is reversed or
275 the behavior is undefined.
285 the behavior is undefined.
276 */
286 */
277
287
278 /*!
288 /*!
279 \fn void QAbstractAxis::visibleChanged(bool visible)
289 \fn void QAbstractAxis::visibleChanged(bool visible)
280 Visibility of the axis has changed to \a visible.
290 Visibility of the axis has changed to \a visible.
281 */
291 */
282 /*!
292 /*!
283 \qmlsignal AbstractAxis::onVisibleChanged(bool visible)
293 \qmlsignal AbstractAxis::onVisibleChanged(bool visible)
284 Visibility of the axis has changed to \a visible.
294 Visibility of the axis has changed to \a visible.
285 */
295 */
286
296
287 /*!
297 /*!
288 \fn void QAbstractAxis::linePenChanged(const QPen& pen)
298 \fn void QAbstractAxis::linePenChanged(const QPen& pen)
289 The pen of the line of the axis has changed to \a pen.
299 The pen of the line of the axis has changed to \a pen.
290 */
300 */
291
301
292 /*!
302 /*!
293 \fn void QAbstractAxis::lineVisibleChanged(bool visible)
303 \fn void QAbstractAxis::lineVisibleChanged(bool visible)
294 Visibility of the axis line has changed to \a visible.
304 Visibility of the axis line has changed to \a visible.
295 */
305 */
296 /*!
306 /*!
297 \qmlsignal AbstractAxis::onLineVisibleChanged(bool visible)
307 \qmlsignal AbstractAxis::onLineVisibleChanged(bool visible)
298 Visibility of the axis line has changed to \a visible.
308 Visibility of the axis line has changed to \a visible.
299 */
309 */
300
310
301 /*!
311 /*!
302 \fn void QAbstractAxis::labelsVisibleChanged(bool visible)
312 \fn void QAbstractAxis::labelsVisibleChanged(bool visible)
303 Visibility of the labels of the axis has changed to \a visible.
313 Visibility of the labels of the axis has changed to \a visible.
304 */
314 */
305 /*!
315 /*!
306 \qmlsignal AbstractAxis::onLabelsVisibleChanged(bool visible)
316 \qmlsignal AbstractAxis::onLabelsVisibleChanged(bool visible)
307 Visibility of the labels of the axis has changed to \a visible.
317 Visibility of the labels of the axis has changed to \a visible.
308 */
318 */
309
319
310 /*!
320 /*!
311 \fn void QAbstractAxis::labelsFontChanged(const QFont& font)
321 \fn void QAbstractAxis::labelsFontChanged(const QFont& font)
312 The font of the axis labels has changed to \a font.
322 The font of the axis labels has changed to \a font.
313 */
323 */
314 /*!
324 /*!
315 \qmlsignal AbstractAxis::onLabelsFontChanged(Font font)
325 \qmlsignal AbstractAxis::onLabelsFontChanged(Font font)
316 The font of the axis labels has changed to \a font.
326 The font of the axis labels has changed to \a font.
317 */
327 */
318
328
319 /*!
329 /*!
320 \fn void QAbstractAxis::labelsBrushChanged(const QBrush& brush)
330 \fn void QAbstractAxis::labelsBrushChanged(const QBrush& brush)
321 The brush of the axis labels has changed to \a brush.
331 The brush of the axis labels has changed to \a brush.
322 */
332 */
323
333
324 /*!
334 /*!
325 \fn void QAbstractAxis::labelsAngleChanged(int angle)
335 \fn void QAbstractAxis::labelsAngleChanged(int angle)
326 The angle of the axis labels has changed to \a angle.
336 The angle of the axis labels has changed to \a angle.
327 */
337 */
328 /*!
338 /*!
329 \qmlsignal AbstractAxis::onLabelsAngleChanged(int angle)
339 \qmlsignal AbstractAxis::onLabelsAngleChanged(int angle)
330 The angle of the axis labels has changed to \a angle.
340 The angle of the axis labels has changed to \a angle.
331 */
341 */
332
342
333 /*!
343 /*!
334 \fn void QAbstractAxis::gridVisibleChanged(bool visible)
344 \fn void QAbstractAxis::gridVisibleChanged(bool visible)
335 Visibility of the grid lines of the axis has changed to \a visible.
345 Visibility of the grid lines of the axis has changed to \a visible.
336 */
346 */
337 /*!
347 /*!
338 \qmlsignal AbstractAxis::onGridVisibleChanged(bool visible)
348 \qmlsignal AbstractAxis::onGridVisibleChanged(bool visible)
339 Visibility of the grid lines of the axis has changed to \a visible.
349 Visibility of the grid lines of the axis has changed to \a visible.
340 */
350 */
341
351
342 /*!
352 /*!
343 \fn void QAbstractAxis::minorGridVisibleChanged(bool visible)
353 \fn void QAbstractAxis::minorGridVisibleChanged(bool visible)
344 Visibility of the minor grid lines of the axis has changed to \a visible.
354 Visibility of the minor grid lines of the axis has changed to \a visible.
345 */
355 */
346 /*!
356 /*!
347 \qmlsignal AbstractAxis::onMinorGridVisibleChanged(bool visible)
357 \qmlsignal AbstractAxis::onMinorGridVisibleChanged(bool visible)
348 Visibility of the minor grid lines of the axis has changed to \a visible.
358 Visibility of the minor grid lines of the axis has changed to \a visible.
349 */
359 */
350
360
351 /*!
361 /*!
352 \fn void QAbstractAxis::gridLinePenChanged(const QPen& pen)
362 \fn void QAbstractAxis::gridLinePenChanged(const QPen& pen)
353 The pen of the grid line has changed to \a pen.
363 The pen of the grid line has changed to \a pen.
354 */
364 */
355
365
356 /*!
366 /*!
357 \fn void QAbstractAxis::minorGridLinePenChanged(const QPen& pen)
367 \fn void QAbstractAxis::minorGridLinePenChanged(const QPen& pen)
358 The pen of the minor grid line has changed to \a pen.
368 The pen of the minor grid line has changed to \a pen.
359 */
369 */
360
370
361 /*!
371 /*!
372 \fn void QAbstractAxis::gridLineColorChanged(const QColor &color)
373 The color of the pen of the grid line has changed to \a color.
374 */
375
376 /*!
377 \fn void QAbstractAxis::minorGridLineColorChanged(const QColor &color)
378 The color of the pen of the minor grid line has changed to \a color.
379 */
380
381 /*!
362 \fn void QAbstractAxis::colorChanged(QColor color)
382 \fn void QAbstractAxis::colorChanged(QColor color)
363 Emitted if the \a color of the axis is changed.
383 Emitted if the \a color of the axis is changed.
364 */
384 */
365 /*!
385 /*!
366 \qmlsignal AbstractAxis::onColorChanged(QColor color)
386 \qmlsignal AbstractAxis::onColorChanged(QColor color)
367 Emitted if the \a color of the axis is changed.
387 Emitted if the \a color of the axis is changed.
368 */
388 */
369
389
370 /*!
390 /*!
371 \fn void QAbstractAxis::labelsColorChanged(QColor color)
391 \fn void QAbstractAxis::labelsColorChanged(QColor color)
372 Emitted if the \a color of the axis labels is changed.
392 Emitted if the \a color of the axis labels is changed.
373 */
393 */
374 /*!
394 /*!
375 \qmlsignal AbstractAxis::onLabelsColorChanged(QColor color)
395 \qmlsignal AbstractAxis::onLabelsColorChanged(QColor color)
376 Emitted if the \a color of the axis labels is changed.
396 Emitted if the \a color of the axis labels is changed.
377 */
397 */
378
398
379 /*!
399 /*!
380 \fn void QAbstractAxis::titleVisibleChanged(bool visible)
400 \fn void QAbstractAxis::titleVisibleChanged(bool visible)
381 Visibility of the title text of the axis has changed to \a visible.
401 Visibility of the title text of the axis has changed to \a visible.
382 */
402 */
383 /*!
403 /*!
384 \qmlsignal AbstractAxis::onTitleVisibleChanged(bool visible)
404 \qmlsignal AbstractAxis::onTitleVisibleChanged(bool visible)
385 Visibility of the title text of the axis has changed to \a visible.
405 Visibility of the title text of the axis has changed to \a visible.
386 */
406 */
387
407
388 /*!
408 /*!
389 \fn void QAbstractAxis::titleTextChanged(const QString& text)
409 \fn void QAbstractAxis::titleTextChanged(const QString& text)
390 The text of the axis title has changed to \a text.
410 The text of the axis title has changed to \a text.
391 */
411 */
392 /*!
412 /*!
393 \qmlsignal AbstractAxis::onTitleTextChanged(String text)
413 \qmlsignal AbstractAxis::onTitleTextChanged(String text)
394 The text of the axis title has changed to \a text.
414 The text of the axis title has changed to \a text.
395 */
415 */
396
416
397 /*!
417 /*!
398 \fn void QAbstractAxis::titleBrushChanged(const QBrush& brush)
418 \fn void QAbstractAxis::titleBrushChanged(const QBrush& brush)
399 The brush of the axis title has changed to \a brush.
419 The brush of the axis title has changed to \a brush.
400 */
420 */
401
421
402 /*!
422 /*!
403 \fn void QAbstractAxis::titleFontChanged(const QFont& font)
423 \fn void QAbstractAxis::titleFontChanged(const QFont& font)
404 The font of the axis title has changed to \a font.
424 The font of the axis title has changed to \a font.
405 */
425 */
406 /*!
426 /*!
407 \qmlsignal AbstractAxis::onTitleFontChanged(Font font)
427 \qmlsignal AbstractAxis::onTitleFontChanged(Font font)
408 The font of the axis title has changed to \a font.
428 The font of the axis title has changed to \a font.
409 */
429 */
410
430
411 /*!
431 /*!
412 \fn void QAbstractAxis::shadesVisibleChanged(bool)
432 \fn void QAbstractAxis::shadesVisibleChanged(bool)
413 Emitted if the visibility of the axis shades is changed to \a visible.
433 Emitted if the visibility of the axis shades is changed to \a visible.
414 */
434 */
415 /*!
435 /*!
416 \qmlsignal AbstractAxis::onShadesVisibleChanged(bool visible)
436 \qmlsignal AbstractAxis::onShadesVisibleChanged(bool visible)
417 Emitted if the visibility of the axis shades is changed to \a visible.
437 Emitted if the visibility of the axis shades is changed to \a visible.
418 */
438 */
419
439
420 /*!
440 /*!
421 \fn void QAbstractAxis::shadesColorChanged(QColor color)
441 \fn void QAbstractAxis::shadesColorChanged(QColor color)
422 Emitted if the \a color of the axis shades is changed.
442 Emitted if the \a color of the axis shades is changed.
423 */
443 */
424 /*!
444 /*!
425 \qmlsignal AbstractAxis::onShadesColorChanged(QColor color)
445 \qmlsignal AbstractAxis::onShadesColorChanged(QColor color)
426 Emitted if the \a color of the axis shades is changed.
446 Emitted if the \a color of the axis shades is changed.
427 */
447 */
428
448
429 /*!
449 /*!
430 \fn void QAbstractAxis::shadesBorderColorChanged(QColor)
450 \fn void QAbstractAxis::shadesBorderColorChanged(QColor)
431 Emitted if the border \a color of the axis shades is changed.
451 Emitted if the border \a color of the axis shades is changed.
432 */
452 */
433 /*!
453 /*!
434 \qmlsignal AbstractAxis::onBorderColorChanged(QColor color)
454 \qmlsignal AbstractAxis::onBorderColorChanged(QColor color)
435 Emitted if the border \a color of the axis shades is changed.
455 Emitted if the border \a color of the axis shades is changed.
436 */
456 */
437
457
438 /*!
458 /*!
439 \fn void QAbstractAxis::shadesBrushChanged(const QBrush& brush)
459 \fn void QAbstractAxis::shadesBrushChanged(const QBrush& brush)
440 The brush of the axis shades has changed to \a brush.
460 The brush of the axis shades has changed to \a brush.
441 */
461 */
442
462
443 /*!
463 /*!
444 \fn void QAbstractAxis::shadesPenChanged(const QPen& pen)
464 \fn void QAbstractAxis::shadesPenChanged(const QPen& pen)
445 The pen of the axis shades has changed to \a pen.
465 The pen of the axis shades has changed to \a pen.
446 */
466 */
447
467
448 /*!
468 /*!
449 \internal
469 \internal
450 Constructs new axis object which is a child of \a parent. Ownership is taken by
470 Constructs new axis object which is a child of \a parent. Ownership is taken by
451 QChart when axis added.
471 QChart when axis added.
452 */
472 */
453
473
454 QAbstractAxis::QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent)
474 QAbstractAxis::QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent)
455 : QObject(parent),
475 : QObject(parent),
456 d_ptr(&d)
476 d_ptr(&d)
457 {
477 {
458 }
478 }
459
479
460 /*!
480 /*!
461 Destructor of the axis object. When axis is added to chart, chart object takes ownership.
481 Destructor of the axis object. When axis is added to chart, chart object takes ownership.
462 */
482 */
463
483
464 QAbstractAxis::~QAbstractAxis()
484 QAbstractAxis::~QAbstractAxis()
465 {
485 {
466 if (d_ptr->m_chart)
486 if (d_ptr->m_chart)
467 qFatal("Still binded axis detected !");
487 qFatal("Still binded axis detected !");
468 }
488 }
469
489
470 /*!
490 /*!
471 Sets \a pen used to draw axis line and ticks.
491 Sets \a pen used to draw axis line and ticks.
472 */
492 */
473 void QAbstractAxis::setLinePen(const QPen &pen)
493 void QAbstractAxis::setLinePen(const QPen &pen)
474 {
494 {
475 if (d_ptr->m_axisPen != pen) {
495 if (d_ptr->m_axisPen != pen) {
476 d_ptr->m_axisPen = pen;
496 d_ptr->m_axisPen = pen;
477 emit linePenChanged(pen);
497 emit linePenChanged(pen);
478 }
498 }
479 }
499 }
480
500
481 /*!
501 /*!
482 Returns pen used to draw axis and ticks.
502 Returns pen used to draw axis and ticks.
483 */
503 */
484 QPen QAbstractAxis::linePen() const
504 QPen QAbstractAxis::linePen() const
485 {
505 {
486 if (d_ptr->m_axisPen == QChartPrivate::defaultPen())
506 if (d_ptr->m_axisPen == QChartPrivate::defaultPen())
487 return QPen();
507 return QPen();
488 else
508 else
489 return d_ptr->m_axisPen;
509 return d_ptr->m_axisPen;
490 }
510 }
491
511
492 void QAbstractAxis::setLinePenColor(QColor color)
512 void QAbstractAxis::setLinePenColor(QColor color)
493 {
513 {
494 QPen p = d_ptr->m_axisPen;
514 QPen p = d_ptr->m_axisPen;
495 if (p.color() != color) {
515 if (p.color() != color) {
496 p.setColor(color);
516 p.setColor(color);
497 setLinePen(p);
517 setLinePen(p);
498 emit colorChanged(color);
518 emit colorChanged(color);
499 }
519 }
500 }
520 }
501
521
502 QColor QAbstractAxis::linePenColor() const
522 QColor QAbstractAxis::linePenColor() const
503 {
523 {
504 return linePen().color();
524 return linePen().color();
505 }
525 }
506
526
507 /*!
527 /*!
508 Sets if axis and ticks are \a visible.
528 Sets if axis and ticks are \a visible.
509 */
529 */
510 void QAbstractAxis::setLineVisible(bool visible)
530 void QAbstractAxis::setLineVisible(bool visible)
511 {
531 {
512 if (d_ptr->m_arrowVisible != visible) {
532 if (d_ptr->m_arrowVisible != visible) {
513 d_ptr->m_arrowVisible = visible;
533 d_ptr->m_arrowVisible = visible;
514 emit lineVisibleChanged(visible);
534 emit lineVisibleChanged(visible);
515 }
535 }
516 }
536 }
517
537
518 bool QAbstractAxis::isLineVisible() const
538 bool QAbstractAxis::isLineVisible() const
519 {
539 {
520 return d_ptr->m_arrowVisible;
540 return d_ptr->m_arrowVisible;
521 }
541 }
522
542
523 void QAbstractAxis::setGridLineVisible(bool visible)
543 void QAbstractAxis::setGridLineVisible(bool visible)
524 {
544 {
525 if (d_ptr->m_gridLineVisible != visible) {
545 if (d_ptr->m_gridLineVisible != visible) {
526 d_ptr->m_gridLineVisible = visible;
546 d_ptr->m_gridLineVisible = visible;
527 emit gridVisibleChanged(visible);
547 emit gridVisibleChanged(visible);
528 }
548 }
529 }
549 }
530
550
531 bool QAbstractAxis::isGridLineVisible() const
551 bool QAbstractAxis::isGridLineVisible() const
532 {
552 {
533 return d_ptr->m_gridLineVisible;
553 return d_ptr->m_gridLineVisible;
534 }
554 }
535
555
536 void QAbstractAxis::setMinorGridLineVisible(bool visible)
556 void QAbstractAxis::setMinorGridLineVisible(bool visible)
537 {
557 {
538 if (d_ptr->m_minorGridLineVisible != visible) {
558 if (d_ptr->m_minorGridLineVisible != visible) {
539 d_ptr->m_minorGridLineVisible = visible;
559 d_ptr->m_minorGridLineVisible = visible;
540 emit minorGridVisibleChanged(visible);
560 emit minorGridVisibleChanged(visible);
541 }
561 }
542 }
562 }
543
563
544 bool QAbstractAxis::isMinorGridLineVisible() const
564 bool QAbstractAxis::isMinorGridLineVisible() const
545 {
565 {
546 return d_ptr->m_minorGridLineVisible;
566 return d_ptr->m_minorGridLineVisible;
547 }
567 }
548
568
549 /*!
569 /*!
550 Sets \a pen used to draw grid line.
570 Sets \a pen used to draw grid line.
551 */
571 */
552 void QAbstractAxis::setGridLinePen(const QPen &pen)
572 void QAbstractAxis::setGridLinePen(const QPen &pen)
553 {
573 {
554 if (d_ptr->m_gridLinePen != pen) {
574 if (d_ptr->m_gridLinePen != pen) {
555 d_ptr->m_gridLinePen = pen;
575 d_ptr->m_gridLinePen = pen;
556 emit gridLinePenChanged(pen);
576 emit gridLinePenChanged(pen);
557 }
577 }
558 }
578 }
559
579
560 /*!
580 /*!
561 Returns pen used to draw grid.
581 Returns pen used to draw grid.
562 */
582 */
563 QPen QAbstractAxis::gridLinePen() const
583 QPen QAbstractAxis::gridLinePen() const
564 {
584 {
565 if (d_ptr->m_gridLinePen == QChartPrivate::defaultPen())
585 if (d_ptr->m_gridLinePen == QChartPrivate::defaultPen())
566 return QPen();
586 return QPen();
567 else
587 else
568 return d_ptr->m_gridLinePen;
588 return d_ptr->m_gridLinePen;
569 }
589 }
570
590
571 void QAbstractAxis::setMinorGridLinePen(const QPen &pen)
591 void QAbstractAxis::setMinorGridLinePen(const QPen &pen)
572 {
592 {
573 if (d_ptr->m_minorGridLinePen != pen) {
593 if (d_ptr->m_minorGridLinePen != pen) {
574 d_ptr->m_minorGridLinePen = pen;
594 d_ptr->m_minorGridLinePen = pen;
575 emit minorGridLinePenChanged(pen);
595 emit minorGridLinePenChanged(pen);
576 }
596 }
577 }
597 }
578
598
579 QPen QAbstractAxis::minorGridLinePen() const
599 QPen QAbstractAxis::minorGridLinePen() const
580 {
600 {
581 if (d_ptr->m_minorGridLinePen == QChartPrivate::defaultPen())
601 if (d_ptr->m_minorGridLinePen == QChartPrivate::defaultPen())
582 return QPen();
602 return QPen();
583 else
603 else
584 return d_ptr->m_minorGridLinePen;
604 return d_ptr->m_minorGridLinePen;
585 }
605 }
586
606
607 void QAbstractAxis::setGridLineColor(const QColor &color)
608 {
609 QPen pen = d_ptr->m_gridLinePen;
610 if (color != pen.color()) {
611 pen.setColor(color);
612 d_ptr->m_gridLinePen = pen;
613 emit gridLineColorChanged(color);
614 }
615 }
616
617 QColor QAbstractAxis::gridLineColor()
618 {
619 return d_ptr->m_gridLinePen.color();
620 }
621
622 void QAbstractAxis::setMinorGridLineColor(const QColor &color)
623 {
624 QPen pen = d_ptr->m_minorGridLinePen;
625 if (color != pen.color()) {
626 pen.setColor(color);
627 d_ptr->m_minorGridLinePen = pen;
628 emit minorGridLineColorChanged(color);
629 }
630 }
631
632 QColor QAbstractAxis::minorGridLineColor()
633 {
634 return d_ptr->m_minorGridLinePen.color();
635 }
636
587 void QAbstractAxis::setLabelsVisible(bool visible)
637 void QAbstractAxis::setLabelsVisible(bool visible)
588 {
638 {
589 if (d_ptr->m_labelsVisible != visible) {
639 if (d_ptr->m_labelsVisible != visible) {
590 d_ptr->m_labelsVisible = visible;
640 d_ptr->m_labelsVisible = visible;
591 emit labelsVisibleChanged(visible);
641 emit labelsVisibleChanged(visible);
592 }
642 }
593 }
643 }
594
644
595 bool QAbstractAxis::labelsVisible() const
645 bool QAbstractAxis::labelsVisible() const
596 {
646 {
597 return d_ptr->m_labelsVisible;
647 return d_ptr->m_labelsVisible;
598 }
648 }
599
649
600 /*!
650 /*!
601 Sets \a brush used to draw labels.
651 Sets \a brush used to draw labels.
602 */
652 */
603 void QAbstractAxis::setLabelsBrush(const QBrush &brush)
653 void QAbstractAxis::setLabelsBrush(const QBrush &brush)
604 {
654 {
605 if (d_ptr->m_labelsBrush != brush) {
655 if (d_ptr->m_labelsBrush != brush) {
606 d_ptr->m_labelsBrush = brush;
656 d_ptr->m_labelsBrush = brush;
607 emit labelsBrushChanged(brush);
657 emit labelsBrushChanged(brush);
608 }
658 }
609 }
659 }
610
660
611 /*!
661 /*!
612 Returns brush used to draw labels.
662 Returns brush used to draw labels.
613 */
663 */
614 QBrush QAbstractAxis::labelsBrush() const
664 QBrush QAbstractAxis::labelsBrush() const
615 {
665 {
616 if (d_ptr->m_labelsBrush == QChartPrivate::defaultBrush())
666 if (d_ptr->m_labelsBrush == QChartPrivate::defaultBrush())
617 return QBrush();
667 return QBrush();
618 else
668 else
619 return d_ptr->m_labelsBrush;
669 return d_ptr->m_labelsBrush;
620 }
670 }
621
671
622 /*!
672 /*!
623 Sets \a font used to draw labels.
673 Sets \a font used to draw labels.
624 */
674 */
625 void QAbstractAxis::setLabelsFont(const QFont &font)
675 void QAbstractAxis::setLabelsFont(const QFont &font)
626 {
676 {
627 if (d_ptr->m_labelsFont != font) {
677 if (d_ptr->m_labelsFont != font) {
628 d_ptr->m_labelsFont = font;
678 d_ptr->m_labelsFont = font;
629 emit labelsFontChanged(font);
679 emit labelsFontChanged(font);
630 }
680 }
631 }
681 }
632
682
633 /*!
683 /*!
634 Returns font used to draw labels.
684 Returns font used to draw labels.
635 */
685 */
636 QFont QAbstractAxis::labelsFont() const
686 QFont QAbstractAxis::labelsFont() const
637 {
687 {
638 if (d_ptr->m_labelsFont == QChartPrivate::defaultFont())
688 if (d_ptr->m_labelsFont == QChartPrivate::defaultFont())
639 return QFont();
689 return QFont();
640 else
690 else
641 return d_ptr->m_labelsFont;
691 return d_ptr->m_labelsFont;
642 }
692 }
643
693
644 void QAbstractAxis::setLabelsAngle(int angle)
694 void QAbstractAxis::setLabelsAngle(int angle)
645 {
695 {
646 if (d_ptr->m_labelsAngle != angle) {
696 if (d_ptr->m_labelsAngle != angle) {
647 d_ptr->m_labelsAngle = angle;
697 d_ptr->m_labelsAngle = angle;
648 emit labelsAngleChanged(angle);
698 emit labelsAngleChanged(angle);
649 }
699 }
650 }
700 }
651
701
652 int QAbstractAxis::labelsAngle() const
702 int QAbstractAxis::labelsAngle() const
653 {
703 {
654 return d_ptr->m_labelsAngle;
704 return d_ptr->m_labelsAngle;
655 }
705 }
656 void QAbstractAxis::setLabelsColor(QColor color)
706 void QAbstractAxis::setLabelsColor(QColor color)
657 {
707 {
658 QBrush b = d_ptr->m_labelsBrush;
708 QBrush b = d_ptr->m_labelsBrush;
659 if (b.color() != color) {
709 if (b.color() != color) {
660 b.setColor(color);
710 b.setColor(color);
661 setLabelsBrush(b);
711 setLabelsBrush(b);
662 emit labelsColorChanged(color);
712 emit labelsColorChanged(color);
663 }
713 }
664 }
714 }
665
715
666 QColor QAbstractAxis::labelsColor() const
716 QColor QAbstractAxis::labelsColor() const
667 {
717 {
668 return labelsBrush().color();
718 return labelsBrush().color();
669 }
719 }
670
720
671 void QAbstractAxis::setTitleVisible(bool visible)
721 void QAbstractAxis::setTitleVisible(bool visible)
672 {
722 {
673 if (d_ptr->m_titleVisible != visible) {
723 if (d_ptr->m_titleVisible != visible) {
674 d_ptr->m_titleVisible = visible;
724 d_ptr->m_titleVisible = visible;
675 emit titleVisibleChanged(visible);
725 emit titleVisibleChanged(visible);
676 }
726 }
677 }
727 }
678
728
679 bool QAbstractAxis::isTitleVisible() const
729 bool QAbstractAxis::isTitleVisible() const
680 {
730 {
681 return d_ptr->m_titleVisible;
731 return d_ptr->m_titleVisible;
682 }
732 }
683
733
684 /*!
734 /*!
685 Sets \a brush used to draw title.
735 Sets \a brush used to draw title.
686 */
736 */
687 void QAbstractAxis::setTitleBrush(const QBrush &brush)
737 void QAbstractAxis::setTitleBrush(const QBrush &brush)
688 {
738 {
689 if (d_ptr->m_titleBrush != brush) {
739 if (d_ptr->m_titleBrush != brush) {
690 d_ptr->m_titleBrush = brush;
740 d_ptr->m_titleBrush = brush;
691 emit titleBrushChanged(brush);
741 emit titleBrushChanged(brush);
692 }
742 }
693 }
743 }
694
744
695 /*!
745 /*!
696 Returns brush used to draw title.
746 Returns brush used to draw title.
697 */
747 */
698 QBrush QAbstractAxis::titleBrush() const
748 QBrush QAbstractAxis::titleBrush() const
699 {
749 {
700 if (d_ptr->m_titleBrush == QChartPrivate::defaultBrush())
750 if (d_ptr->m_titleBrush == QChartPrivate::defaultBrush())
701 return QBrush();
751 return QBrush();
702 else
752 else
703 return d_ptr->m_titleBrush;
753 return d_ptr->m_titleBrush;
704 }
754 }
705
755
706 /*!
756 /*!
707 Sets \a font used to draw title.
757 Sets \a font used to draw title.
708 */
758 */
709 void QAbstractAxis::setTitleFont(const QFont &font)
759 void QAbstractAxis::setTitleFont(const QFont &font)
710 {
760 {
711 if (d_ptr->m_titleFont != font) {
761 if (d_ptr->m_titleFont != font) {
712 d_ptr->m_titleFont = font;
762 d_ptr->m_titleFont = font;
713 emit titleFontChanged(font);
763 emit titleFontChanged(font);
714 }
764 }
715 }
765 }
716
766
717 /*!
767 /*!
718 Returns font used to draw title.
768 Returns font used to draw title.
719 */
769 */
720 QFont QAbstractAxis::titleFont() const
770 QFont QAbstractAxis::titleFont() const
721 {
771 {
722 if (d_ptr->m_titleFont == QChartPrivate::defaultFont())
772 if (d_ptr->m_titleFont == QChartPrivate::defaultFont())
723 return QFont();
773 return QFont();
724 else
774 else
725 return d_ptr->m_titleFont;
775 return d_ptr->m_titleFont;
726 }
776 }
727
777
728 void QAbstractAxis::setTitleText(const QString &title)
778 void QAbstractAxis::setTitleText(const QString &title)
729 {
779 {
730 if (d_ptr->m_title != title) {
780 if (d_ptr->m_title != title) {
731 d_ptr->m_title = title;
781 d_ptr->m_title = title;
732 emit titleTextChanged(title);
782 emit titleTextChanged(title);
733 }
783 }
734 }
784 }
735
785
736 QString QAbstractAxis::titleText() const
786 QString QAbstractAxis::titleText() const
737 {
787 {
738 return d_ptr->m_title;
788 return d_ptr->m_title;
739 }
789 }
740
790
741
791
742 void QAbstractAxis::setShadesVisible(bool visible)
792 void QAbstractAxis::setShadesVisible(bool visible)
743 {
793 {
744 if (d_ptr->m_shadesVisible != visible) {
794 if (d_ptr->m_shadesVisible != visible) {
745 d_ptr->m_shadesVisible = visible;
795 d_ptr->m_shadesVisible = visible;
746 emit shadesVisibleChanged(visible);
796 emit shadesVisibleChanged(visible);
747 }
797 }
748 }
798 }
749
799
750 bool QAbstractAxis::shadesVisible() const
800 bool QAbstractAxis::shadesVisible() const
751 {
801 {
752 return d_ptr->m_shadesVisible;
802 return d_ptr->m_shadesVisible;
753 }
803 }
754
804
755 /*!
805 /*!
756 Sets \a pen used to draw shades.
806 Sets \a pen used to draw shades.
757 */
807 */
758 void QAbstractAxis::setShadesPen(const QPen &pen)
808 void QAbstractAxis::setShadesPen(const QPen &pen)
759 {
809 {
760 if (d_ptr->m_shadesPen != pen) {
810 if (d_ptr->m_shadesPen != pen) {
761 d_ptr->m_shadesPen = pen;
811 d_ptr->m_shadesPen = pen;
762 emit shadesPenChanged(pen);
812 emit shadesPenChanged(pen);
763 }
813 }
764 }
814 }
765
815
766 /*!
816 /*!
767 Returns pen used to draw shades.
817 Returns pen used to draw shades.
768 */
818 */
769 QPen QAbstractAxis::shadesPen() const
819 QPen QAbstractAxis::shadesPen() const
770 {
820 {
771 if (d_ptr->m_shadesPen == QChartPrivate::defaultPen())
821 if (d_ptr->m_shadesPen == QChartPrivate::defaultPen())
772 return QPen();
822 return QPen();
773 else
823 else
774 return d_ptr->m_shadesPen;
824 return d_ptr->m_shadesPen;
775 }
825 }
776
826
777 /*!
827 /*!
778 Sets \a brush used to draw shades.
828 Sets \a brush used to draw shades.
779 */
829 */
780 void QAbstractAxis::setShadesBrush(const QBrush &brush)
830 void QAbstractAxis::setShadesBrush(const QBrush &brush)
781 {
831 {
782 if (d_ptr->m_shadesBrush != brush) {
832 if (d_ptr->m_shadesBrush != brush) {
783 d_ptr->m_shadesBrush = brush;
833 d_ptr->m_shadesBrush = brush;
784 emit shadesBrushChanged(brush);
834 emit shadesBrushChanged(brush);
785 }
835 }
786 }
836 }
787
837
788 /*!
838 /*!
789 Returns brush used to draw shades.
839 Returns brush used to draw shades.
790 */
840 */
791 QBrush QAbstractAxis::shadesBrush() const
841 QBrush QAbstractAxis::shadesBrush() const
792 {
842 {
793 if (d_ptr->m_shadesBrush == QChartPrivate::defaultBrush())
843 if (d_ptr->m_shadesBrush == QChartPrivate::defaultBrush())
794 return QBrush(Qt::SolidPattern);
844 return QBrush(Qt::SolidPattern);
795 else
845 else
796 return d_ptr->m_shadesBrush;
846 return d_ptr->m_shadesBrush;
797 }
847 }
798
848
799 void QAbstractAxis::setShadesColor(QColor color)
849 void QAbstractAxis::setShadesColor(QColor color)
800 {
850 {
801 QBrush b = d_ptr->m_shadesBrush;
851 QBrush b = d_ptr->m_shadesBrush;
802 if (b.color() != color) {
852 if (b.color() != color) {
803 b.setColor(color);
853 b.setColor(color);
804 setShadesBrush(b);
854 setShadesBrush(b);
805 emit shadesColorChanged(color);
855 emit shadesColorChanged(color);
806 }
856 }
807 }
857 }
808
858
809 QColor QAbstractAxis::shadesColor() const
859 QColor QAbstractAxis::shadesColor() const
810 {
860 {
811 return shadesBrush().color();
861 return shadesBrush().color();
812 }
862 }
813
863
814 void QAbstractAxis::setShadesBorderColor(QColor color)
864 void QAbstractAxis::setShadesBorderColor(QColor color)
815 {
865 {
816 QPen p = d_ptr->m_shadesPen;
866 QPen p = d_ptr->m_shadesPen;
817 if (p.color() != color) {
867 if (p.color() != color) {
818 p.setColor(color);
868 p.setColor(color);
819 setShadesPen(p);
869 setShadesPen(p);
820 emit shadesColorChanged(color);
870 emit shadesColorChanged(color);
821 }
871 }
822 }
872 }
823
873
824 QColor QAbstractAxis::shadesBorderColor() const
874 QColor QAbstractAxis::shadesBorderColor() const
825 {
875 {
826 return shadesPen().color();
876 return shadesPen().color();
827 }
877 }
828
878
829
879
830 bool QAbstractAxis::isVisible() const
880 bool QAbstractAxis::isVisible() const
831 {
881 {
832 return d_ptr->m_visible;
882 return d_ptr->m_visible;
833 }
883 }
834
884
835 /*!
885 /*!
836 Sets axis, shades, labels and grid lines to be visible.
886 Sets axis, shades, labels and grid lines to be visible.
837 */
887 */
838 void QAbstractAxis::setVisible(bool visible)
888 void QAbstractAxis::setVisible(bool visible)
839 {
889 {
840 if (d_ptr->m_visible != visible) {
890 if (d_ptr->m_visible != visible) {
841 d_ptr->m_visible = visible;
891 d_ptr->m_visible = visible;
842 emit visibleChanged(visible);
892 emit visibleChanged(visible);
843 }
893 }
844 }
894 }
845
895
846
896
847 /*!
897 /*!
848 Sets axis, shades, labels and grid lines to be visible.
898 Sets axis, shades, labels and grid lines to be visible.
849 */
899 */
850 void QAbstractAxis::show()
900 void QAbstractAxis::show()
851 {
901 {
852 setVisible(true);
902 setVisible(true);
853 }
903 }
854
904
855 /*!
905 /*!
856 Sets axis, shades, labels and grid lines to not be visible.
906 Sets axis, shades, labels and grid lines to not be visible.
857 */
907 */
858 void QAbstractAxis::hide()
908 void QAbstractAxis::hide()
859 {
909 {
860 setVisible(false);
910 setVisible(false);
861 }
911 }
862
912
863 /*!
913 /*!
864 Sets the minimum value shown on the axis.
914 Sets the minimum value shown on the axis.
865 Depending on the actual axis type the \a min parameter is converted to appropriate type.
915 Depending on the actual axis type the \a min parameter is converted to appropriate type.
866 If the conversion is impossible then the function call does nothing
916 If the conversion is impossible then the function call does nothing
867 */
917 */
868 void QAbstractAxis::setMin(const QVariant &min)
918 void QAbstractAxis::setMin(const QVariant &min)
869 {
919 {
870 d_ptr->setMin(min);
920 d_ptr->setMin(min);
871 }
921 }
872
922
873 /*!
923 /*!
874 Sets the maximum value shown on the axis.
924 Sets the maximum value shown on the axis.
875 Depending on the actual axis type the \a max parameter is converted to appropriate type.
925 Depending on the actual axis type the \a max parameter is converted to appropriate type.
876 If the conversion is impossible then the function call does nothing
926 If the conversion is impossible then the function call does nothing
877 */
927 */
878 void QAbstractAxis::setMax(const QVariant &max)
928 void QAbstractAxis::setMax(const QVariant &max)
879 {
929 {
880 d_ptr->setMax(max);
930 d_ptr->setMax(max);
881 }
931 }
882
932
883 /*!
933 /*!
884 Sets the range shown on the axis.
934 Sets the range shown on the axis.
885 Depending on the actual axis type the \a min and \a max parameters are converted to appropriate types.
935 Depending on the actual axis type the \a min and \a max parameters are converted to appropriate types.
886 If the conversion is impossible then the function call does nothing.
936 If the conversion is impossible then the function call does nothing.
887 */
937 */
888 void QAbstractAxis::setRange(const QVariant &min, const QVariant &max)
938 void QAbstractAxis::setRange(const QVariant &min, const QVariant &max)
889 {
939 {
890 d_ptr->setRange(min, max);
940 d_ptr->setRange(min, max);
891 }
941 }
892
942
893
943
894 /*!
944 /*!
895 Returns the orientation in which the axis is being used (Vertical or Horizontal)
945 Returns the orientation in which the axis is being used (Vertical or Horizontal)
896 */
946 */
897 Qt::Orientation QAbstractAxis::orientation() const
947 Qt::Orientation QAbstractAxis::orientation() const
898 {
948 {
899 return d_ptr->orientation();
949 return d_ptr->orientation();
900 }
950 }
901
951
902 Qt::Alignment QAbstractAxis::alignment() const
952 Qt::Alignment QAbstractAxis::alignment() const
903 {
953 {
904 return d_ptr->alignment();
954 return d_ptr->alignment();
905 }
955 }
906
956
907 bool QAbstractAxis::isReverse() const
957 bool QAbstractAxis::isReverse() const
908 {
958 {
909 return d_ptr->m_reverse;
959 return d_ptr->m_reverse;
910 }
960 }
911
961
912 void QAbstractAxis::setReverse(bool reverse)
962 void QAbstractAxis::setReverse(bool reverse)
913 {
963 {
914 if (d_ptr->m_reverse != reverse && type() != QAbstractAxis::AxisTypeBarCategory) {
964 if (d_ptr->m_reverse != reverse && type() != QAbstractAxis::AxisTypeBarCategory) {
915 d_ptr->m_reverse = reverse;
965 d_ptr->m_reverse = reverse;
916 emit reverseChanged(reverse);
966 emit reverseChanged(reverse);
917 }
967 }
918 }
968 }
919
969
920 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
970 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
921
971
922 QAbstractAxisPrivate::QAbstractAxisPrivate(QAbstractAxis *q)
972 QAbstractAxisPrivate::QAbstractAxisPrivate(QAbstractAxis *q)
923 : q_ptr(q),
973 : q_ptr(q),
924 m_chart(0),
974 m_chart(0),
925 m_alignment(0),
975 m_alignment(0),
926 m_orientation(Qt::Orientation(0)),
976 m_orientation(Qt::Orientation(0)),
927 m_visible(true),
977 m_visible(true),
928 m_arrowVisible(true),
978 m_arrowVisible(true),
929 m_axisPen(QChartPrivate::defaultPen()),
979 m_axisPen(QChartPrivate::defaultPen()),
930 m_axisBrush(QChartPrivate::defaultBrush()),
980 m_axisBrush(QChartPrivate::defaultBrush()),
931 m_gridLineVisible(true),
981 m_gridLineVisible(true),
932 m_gridLinePen(QChartPrivate::defaultPen()),
982 m_gridLinePen(QChartPrivate::defaultPen()),
933 m_minorGridLineVisible(true),
983 m_minorGridLineVisible(true),
934 m_minorGridLinePen(QChartPrivate::defaultPen()),
984 m_minorGridLinePen(QChartPrivate::defaultPen()),
935 m_labelsVisible(true),
985 m_labelsVisible(true),
936 m_labelsBrush(QChartPrivate::defaultBrush()),
986 m_labelsBrush(QChartPrivate::defaultBrush()),
937 m_labelsFont(QChartPrivate::defaultFont()),
987 m_labelsFont(QChartPrivate::defaultFont()),
938 m_labelsAngle(0),
988 m_labelsAngle(0),
939 m_titleVisible(true),
989 m_titleVisible(true),
940 m_titleBrush(QChartPrivate::defaultBrush()),
990 m_titleBrush(QChartPrivate::defaultBrush()),
941 m_titleFont(QChartPrivate::defaultFont()),
991 m_titleFont(QChartPrivate::defaultFont()),
942 m_shadesVisible(false),
992 m_shadesVisible(false),
943 m_shadesPen(QChartPrivate::defaultPen()),
993 m_shadesPen(QChartPrivate::defaultPen()),
944 m_shadesBrush(QChartPrivate::defaultBrush()),
994 m_shadesBrush(QChartPrivate::defaultBrush()),
945 m_shadesOpacity(1.0),
995 m_shadesOpacity(1.0),
946 m_dirty(false),
996 m_dirty(false),
947 m_reverse(false)
997 m_reverse(false)
948 {
998 {
949 }
999 }
950
1000
951 QAbstractAxisPrivate::~QAbstractAxisPrivate()
1001 QAbstractAxisPrivate::~QAbstractAxisPrivate()
952 {
1002 {
953 }
1003 }
954
1004
955 void QAbstractAxisPrivate::setAlignment( Qt::Alignment alignment)
1005 void QAbstractAxisPrivate::setAlignment( Qt::Alignment alignment)
956 {
1006 {
957 switch(alignment) {
1007 switch(alignment) {
958 case Qt::AlignTop:
1008 case Qt::AlignTop:
959 case Qt::AlignBottom:
1009 case Qt::AlignBottom:
960 m_orientation = Qt::Horizontal;
1010 m_orientation = Qt::Horizontal;
961 break;
1011 break;
962 case Qt::AlignLeft:
1012 case Qt::AlignLeft:
963 case Qt::AlignRight:
1013 case Qt::AlignRight:
964 m_orientation = Qt::Vertical;
1014 m_orientation = Qt::Vertical;
965 break;
1015 break;
966 default:
1016 default:
967 qWarning()<<"No alignment specified !";
1017 qWarning()<<"No alignment specified !";
968 break;
1018 break;
969 };
1019 };
970 m_alignment=alignment;
1020 m_alignment=alignment;
971 }
1021 }
972
1022
973 void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced)
1023 void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced)
974 {
1024 {
975 if (forced || QChartPrivate::defaultPen() == m_axisPen)
1025 if (forced || QChartPrivate::defaultPen() == m_axisPen)
976 q_ptr->setLinePen(theme->axisLinePen());
1026 q_ptr->setLinePen(theme->axisLinePen());
977
1027
978 if (forced || QChartPrivate::defaultPen() == m_gridLinePen)
1028 if (forced || QChartPrivate::defaultPen() == m_gridLinePen)
979 q_ptr->setGridLinePen(theme->gridLinePen());
1029 q_ptr->setGridLinePen(theme->gridLinePen());
980 if (forced || QChartPrivate::defaultPen() == m_minorGridLinePen)
1030 if (forced || QChartPrivate::defaultPen() == m_minorGridLinePen)
981 q_ptr->setMinorGridLinePen(theme->minorGridLinePen());
1031 q_ptr->setMinorGridLinePen(theme->minorGridLinePen());
982
1032
983 if (forced || QChartPrivate::defaultBrush() == m_labelsBrush)
1033 if (forced || QChartPrivate::defaultBrush() == m_labelsBrush)
984 q_ptr->setLabelsBrush(theme->labelBrush());
1034 q_ptr->setLabelsBrush(theme->labelBrush());
985 if (forced || QChartPrivate::defaultFont() == m_labelsFont)
1035 if (forced || QChartPrivate::defaultFont() == m_labelsFont)
986 q_ptr->setLabelsFont(theme->labelFont());
1036 q_ptr->setLabelsFont(theme->labelFont());
987
1037
988 if (forced || QChartPrivate::defaultBrush() == m_titleBrush)
1038 if (forced || QChartPrivate::defaultBrush() == m_titleBrush)
989 q_ptr->setTitleBrush(theme->labelBrush());
1039 q_ptr->setTitleBrush(theme->labelBrush());
990 if (forced || QChartPrivate::defaultFont() == m_titleFont) {
1040 if (forced || QChartPrivate::defaultFont() == m_titleFont) {
991 QFont font(m_labelsFont);
1041 QFont font(m_labelsFont);
992 font.setBold(true);
1042 font.setBold(true);
993 q_ptr->setTitleFont(font);
1043 q_ptr->setTitleFont(font);
994 }
1044 }
995
1045
996 if (forced || QChartPrivate::defaultBrush() == m_shadesBrush)
1046 if (forced || QChartPrivate::defaultBrush() == m_shadesBrush)
997 q_ptr->setShadesBrush(theme->backgroundShadesBrush());
1047 q_ptr->setShadesBrush(theme->backgroundShadesBrush());
998 if (forced || QChartPrivate::defaultPen() == m_shadesPen)
1048 if (forced || QChartPrivate::defaultPen() == m_shadesPen)
999 q_ptr->setShadesPen(theme->backgroundShadesPen());
1049 q_ptr->setShadesPen(theme->backgroundShadesPen());
1000
1050
1001 bool axisX = m_orientation == Qt::Horizontal;
1051 bool axisX = m_orientation == Qt::Horizontal;
1002 if (forced && (theme->backgroundShades() == ChartTheme::BackgroundShadesBoth
1052 if (forced && (theme->backgroundShades() == ChartTheme::BackgroundShadesBoth
1003 || (theme->backgroundShades() == ChartTheme::BackgroundShadesVertical && axisX)
1053 || (theme->backgroundShades() == ChartTheme::BackgroundShadesVertical && axisX)
1004 || (theme->backgroundShades() == ChartTheme::BackgroundShadesHorizontal && !axisX))) {
1054 || (theme->backgroundShades() == ChartTheme::BackgroundShadesHorizontal && !axisX))) {
1005 q_ptr->setShadesVisible(true);
1055 q_ptr->setShadesVisible(true);
1006 } else if (forced) {
1056 } else if (forced) {
1007 q_ptr->setShadesVisible(false);
1057 q_ptr->setShadesVisible(false);
1008 }
1058 }
1009 }
1059 }
1010
1060
1011 void QAbstractAxisPrivate::handleRangeChanged(qreal min, qreal max)
1061 void QAbstractAxisPrivate::handleRangeChanged(qreal min, qreal max)
1012 {
1062 {
1013 setRange(min,max);
1063 setRange(min,max);
1014 }
1064 }
1015
1065
1016 void QAbstractAxisPrivate::initializeGraphics(QGraphicsItem* parent)
1066 void QAbstractAxisPrivate::initializeGraphics(QGraphicsItem* parent)
1017 {
1067 {
1018 Q_UNUSED(parent);
1068 Q_UNUSED(parent);
1019 }
1069 }
1020
1070
1021 void QAbstractAxisPrivate::initializeAnimations(QChart::AnimationOptions options, int duration,
1071 void QAbstractAxisPrivate::initializeAnimations(QChart::AnimationOptions options, int duration,
1022 QEasingCurve &curve)
1072 QEasingCurve &curve)
1023 {
1073 {
1024 ChartAxisElement *axis = m_item.data();
1074 ChartAxisElement *axis = m_item.data();
1025 Q_ASSERT(axis);
1075 Q_ASSERT(axis);
1026 if (axis->animation())
1076 if (axis->animation())
1027 axis->animation()->stopAndDestroyLater();
1077 axis->animation()->stopAndDestroyLater();
1028
1078
1029 if (options.testFlag(QChart::GridAxisAnimations))
1079 if (options.testFlag(QChart::GridAxisAnimations))
1030 axis->setAnimation(new AxisAnimation(axis, duration, curve));
1080 axis->setAnimation(new AxisAnimation(axis, duration, curve));
1031 else
1081 else
1032 axis->setAnimation(0);
1082 axis->setAnimation(0);
1033 }
1083 }
1034
1084
1035
1085
1036
1086
1037 #include "moc_qabstractaxis.cpp"
1087 #include "moc_qabstractaxis.cpp"
1038 #include "moc_qabstractaxis_p.cpp"
1088 #include "moc_qabstractaxis_p.cpp"
1039
1089
1040 QT_CHARTS_END_NAMESPACE
1090 QT_CHARTS_END_NAMESPACE
@@ -1,199 +1,207
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #ifndef QABSTRACTAXIS_H
19 #ifndef QABSTRACTAXIS_H
20 #define QABSTRACTAXIS_H
20 #define QABSTRACTAXIS_H
21
21
22 #include <QtCharts/QChartGlobal>
22 #include <QtCharts/QChartGlobal>
23 #include <QtGui/QPen>
23 #include <QtGui/QPen>
24 #include <QtGui/QFont>
24 #include <QtGui/QFont>
25 #include <QtCore/QVariant>
25 #include <QtCore/QVariant>
26
26
27 QT_CHARTS_BEGIN_NAMESPACE
27 QT_CHARTS_BEGIN_NAMESPACE
28
28
29 class QAbstractAxisPrivate;
29 class QAbstractAxisPrivate;
30
30
31 class QT_CHARTS_EXPORT QAbstractAxis : public QObject
31 class QT_CHARTS_EXPORT QAbstractAxis : public QObject
32 {
32 {
33 Q_OBJECT
33 Q_OBJECT
34 //visibility
34 //visibility
35 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
35 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
36 //arrow
36 //arrow
37 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
37 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
38 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
38 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
39 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
39 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
40 //labels
40 //labels
41 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
41 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
42 Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
42 Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
43 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
43 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
44 Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
44 Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
45 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
45 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
46 //grid
46 //grid
47 Q_PROPERTY(bool gridVisible READ isGridLineVisible WRITE setGridLineVisible NOTIFY gridVisibleChanged)
47 Q_PROPERTY(bool gridVisible READ isGridLineVisible WRITE setGridLineVisible NOTIFY gridVisibleChanged)
48 Q_PROPERTY(QPen gridLinePen READ gridLinePen WRITE setGridLinePen NOTIFY gridLinePenChanged)
48 Q_PROPERTY(QPen gridLinePen READ gridLinePen WRITE setGridLinePen NOTIFY gridLinePenChanged)
49 Q_PROPERTY(bool minorGridVisible READ isMinorGridLineVisible WRITE setMinorGridLineVisible NOTIFY minorGridVisibleChanged)
49 Q_PROPERTY(bool minorGridVisible READ isMinorGridLineVisible WRITE setMinorGridLineVisible NOTIFY minorGridVisibleChanged)
50 Q_PROPERTY(QPen minorGridLinePen READ minorGridLinePen WRITE setMinorGridLinePen NOTIFY minorGridLinePenChanged)
50 Q_PROPERTY(QPen minorGridLinePen READ minorGridLinePen WRITE setMinorGridLinePen NOTIFY minorGridLinePenChanged)
51 Q_PROPERTY(QColor gridLineColor READ gridLineColor WRITE setGridLineColor NOTIFY gridLineColorChanged)
52 Q_PROPERTY(QColor minorGridLineColor READ minorGridLineColor WRITE setMinorGridLineColor NOTIFY minorGridLineColorChanged)
51 //shades
53 //shades
52 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
54 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
53 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
55 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
54 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
56 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
55 Q_PROPERTY(QPen shadesPen READ shadesPen WRITE setShadesPen NOTIFY shadesPenChanged)
57 Q_PROPERTY(QPen shadesPen READ shadesPen WRITE setShadesPen NOTIFY shadesPenChanged)
56 Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged)
58 Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged)
57 //title
59 //title
58 Q_PROPERTY(QString titleText READ titleText WRITE setTitleText NOTIFY titleTextChanged)
60 Q_PROPERTY(QString titleText READ titleText WRITE setTitleText NOTIFY titleTextChanged)
59 Q_PROPERTY(QBrush titleBrush READ titleBrush WRITE setTitleBrush NOTIFY titleBrushChanged)
61 Q_PROPERTY(QBrush titleBrush READ titleBrush WRITE setTitleBrush NOTIFY titleBrushChanged)
60 Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibleChanged)
62 Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibleChanged)
61 Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont NOTIFY titleFontChanged)
63 Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont NOTIFY titleFontChanged)
62 //orientation
64 //orientation
63 Q_PROPERTY(Qt::Orientation orientation READ orientation)
65 Q_PROPERTY(Qt::Orientation orientation READ orientation)
64 //aligment
66 //aligment
65 Q_PROPERTY(Qt::Alignment alignment READ alignment)
67 Q_PROPERTY(Qt::Alignment alignment READ alignment)
66 Q_PROPERTY(bool reverse READ isReverse WRITE setReverse NOTIFY reverseChanged)
68 Q_PROPERTY(bool reverse READ isReverse WRITE setReverse NOTIFY reverseChanged)
67
69
68 public:
70 public:
69
71
70 enum AxisType {
72 enum AxisType {
71 AxisTypeNoAxis = 0x0,
73 AxisTypeNoAxis = 0x0,
72 AxisTypeValue = 0x1,
74 AxisTypeValue = 0x1,
73 AxisTypeBarCategory = 0x2,
75 AxisTypeBarCategory = 0x2,
74 AxisTypeCategory = 0x4,
76 AxisTypeCategory = 0x4,
75 AxisTypeDateTime = 0x8,
77 AxisTypeDateTime = 0x8,
76 AxisTypeLogValue = 0x10
78 AxisTypeLogValue = 0x10
77 };
79 };
78
80
79 Q_DECLARE_FLAGS(AxisTypes, AxisType)
81 Q_DECLARE_FLAGS(AxisTypes, AxisType)
80
82
81 protected:
83 protected:
82 explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = 0);
84 explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = 0);
83
85
84 public:
86 public:
85 ~QAbstractAxis();
87 ~QAbstractAxis();
86
88
87 virtual AxisType type() const = 0;
89 virtual AxisType type() const = 0;
88
90
89 //visibility handling
91 //visibility handling
90 bool isVisible() const;
92 bool isVisible() const;
91 void setVisible(bool visible = true);
93 void setVisible(bool visible = true);
92 void show();
94 void show();
93 void hide();
95 void hide();
94
96
95 //arrow handling
97 //arrow handling
96 bool isLineVisible() const;
98 bool isLineVisible() const;
97 void setLineVisible(bool visible = true);
99 void setLineVisible(bool visible = true);
98 void setLinePen(const QPen &pen);
100 void setLinePen(const QPen &pen);
99 QPen linePen() const;
101 QPen linePen() const;
100 void setLinePenColor(QColor color);
102 void setLinePenColor(QColor color);
101 QColor linePenColor() const;
103 QColor linePenColor() const;
102
104
103 //grid handling
105 //grid handling
104 bool isGridLineVisible() const;
106 bool isGridLineVisible() const;
105 void setGridLineVisible(bool visible = true);
107 void setGridLineVisible(bool visible = true);
106 void setGridLinePen(const QPen &pen);
108 void setGridLinePen(const QPen &pen);
107 QPen gridLinePen() const;
109 QPen gridLinePen() const;
108 bool isMinorGridLineVisible() const;
110 bool isMinorGridLineVisible() const;
109 void setMinorGridLineVisible(bool visible = true);
111 void setMinorGridLineVisible(bool visible = true);
110 void setMinorGridLinePen(const QPen &pen);
112 void setMinorGridLinePen(const QPen &pen);
111 QPen minorGridLinePen() const;
113 QPen minorGridLinePen() const;
114 void setGridLineColor(const QColor &color);
115 QColor gridLineColor();
116 void setMinorGridLineColor(const QColor &color);
117 QColor minorGridLineColor();
112
118
113 //labels handling
119 //labels handling
114 bool labelsVisible() const;
120 bool labelsVisible() const;
115 void setLabelsVisible(bool visible = true);
121 void setLabelsVisible(bool visible = true);
116 void setLabelsBrush(const QBrush &brush);
122 void setLabelsBrush(const QBrush &brush);
117 QBrush labelsBrush() const;
123 QBrush labelsBrush() const;
118 void setLabelsFont(const QFont &font);
124 void setLabelsFont(const QFont &font);
119 QFont labelsFont() const;
125 QFont labelsFont() const;
120 void setLabelsAngle(int angle);
126 void setLabelsAngle(int angle);
121 int labelsAngle() const;
127 int labelsAngle() const;
122 void setLabelsColor(QColor color);
128 void setLabelsColor(QColor color);
123 QColor labelsColor() const;
129 QColor labelsColor() const;
124
130
125 //title handling
131 //title handling
126 bool isTitleVisible() const;
132 bool isTitleVisible() const;
127 void setTitleVisible(bool visible = true);
133 void setTitleVisible(bool visible = true);
128 void setTitleBrush(const QBrush &brush);
134 void setTitleBrush(const QBrush &brush);
129 QBrush titleBrush() const;
135 QBrush titleBrush() const;
130 void setTitleFont(const QFont &font);
136 void setTitleFont(const QFont &font);
131 QFont titleFont() const;
137 QFont titleFont() const;
132 void setTitleText(const QString &title);
138 void setTitleText(const QString &title);
133 QString titleText() const;
139 QString titleText() const;
134
140
135 //shades handling
141 //shades handling
136 bool shadesVisible() const;
142 bool shadesVisible() const;
137 void setShadesVisible(bool visible = true);
143 void setShadesVisible(bool visible = true);
138 void setShadesPen(const QPen &pen);
144 void setShadesPen(const QPen &pen);
139 QPen shadesPen() const;
145 QPen shadesPen() const;
140 void setShadesBrush(const QBrush &brush);
146 void setShadesBrush(const QBrush &brush);
141 QBrush shadesBrush() const;
147 QBrush shadesBrush() const;
142 void setShadesColor(QColor color);
148 void setShadesColor(QColor color);
143 QColor shadesColor() const;
149 QColor shadesColor() const;
144 void setShadesBorderColor(QColor color);
150 void setShadesBorderColor(QColor color);
145 QColor shadesBorderColor() const;
151 QColor shadesBorderColor() const;
146
152
147 Qt::Orientation orientation() const;
153 Qt::Orientation orientation() const;
148 Qt::Alignment alignment() const;
154 Qt::Alignment alignment() const;
149
155
150 //range handling
156 //range handling
151 void setMin(const QVariant &min);
157 void setMin(const QVariant &min);
152 void setMax(const QVariant &max);
158 void setMax(const QVariant &max);
153 void setRange(const QVariant &min, const QVariant &max);
159 void setRange(const QVariant &min, const QVariant &max);
154
160
155 //reverse handling
161 //reverse handling
156 void setReverse(bool reverse = true);
162 void setReverse(bool reverse = true);
157 bool isReverse() const;
163 bool isReverse() const;
158
164
159 Q_SIGNALS:
165 Q_SIGNALS:
160 void visibleChanged(bool visible);
166 void visibleChanged(bool visible);
161 void linePenChanged(const QPen &pen);
167 void linePenChanged(const QPen &pen);
162 void lineVisibleChanged(bool visible);
168 void lineVisibleChanged(bool visible);
163 void labelsVisibleChanged(bool visible);
169 void labelsVisibleChanged(bool visible);
164 void labelsBrushChanged(const QBrush &brush);
170 void labelsBrushChanged(const QBrush &brush);
165 void labelsFontChanged(const QFont &pen);
171 void labelsFontChanged(const QFont &pen);
166 void labelsAngleChanged(int angle);
172 void labelsAngleChanged(int angle);
167 void gridLinePenChanged(const QPen &pen);
173 void gridLinePenChanged(const QPen &pen);
168 void gridVisibleChanged(bool visible);
174 void gridVisibleChanged(bool visible);
169 void minorGridVisibleChanged(bool visible);
175 void minorGridVisibleChanged(bool visible);
170 void minorGridLinePenChanged(const QPen &pen);
176 void minorGridLinePenChanged(const QPen &pen);
177 void gridLineColorChanged(const QColor &color);
178 void minorGridLineColorChanged(const QColor &color);
171 void colorChanged(QColor color);
179 void colorChanged(QColor color);
172 void labelsColorChanged(QColor color);
180 void labelsColorChanged(QColor color);
173 void titleTextChanged(const QString &title);
181 void titleTextChanged(const QString &title);
174 void titleBrushChanged(const QBrush &brush);
182 void titleBrushChanged(const QBrush &brush);
175 void titleVisibleChanged(bool visible);
183 void titleVisibleChanged(bool visible);
176 void titleFontChanged(const QFont &font);
184 void titleFontChanged(const QFont &font);
177 void shadesVisibleChanged(bool visible);
185 void shadesVisibleChanged(bool visible);
178 void shadesColorChanged(QColor color);
186 void shadesColorChanged(QColor color);
179 void shadesBorderColorChanged(QColor color);
187 void shadesBorderColorChanged(QColor color);
180 void shadesPenChanged(const QPen &pen);
188 void shadesPenChanged(const QPen &pen);
181 void shadesBrushChanged(const QBrush &brush);
189 void shadesBrushChanged(const QBrush &brush);
182 void reverseChanged(bool reverse);
190 void reverseChanged(bool reverse);
183
191
184 protected:
192 protected:
185 QScopedPointer<QAbstractAxisPrivate> d_ptr;
193 QScopedPointer<QAbstractAxisPrivate> d_ptr;
186 friend class ChartDataSet;
194 friend class ChartDataSet;
187 friend class ChartPresenter;
195 friend class ChartPresenter;
188 friend class ChartThemeManager;
196 friend class ChartThemeManager;
189 friend class AbstractDomain;
197 friend class AbstractDomain;
190 friend class ChartAxisElement;
198 friend class ChartAxisElement;
191 friend class XYChart;
199 friend class XYChart;
192
200
193 private:
201 private:
194 Q_DISABLE_COPY(QAbstractAxis)
202 Q_DISABLE_COPY(QAbstractAxis)
195 };
203 };
196
204
197 QT_CHARTS_END_NAMESPACE
205 QT_CHARTS_END_NAMESPACE
198
206
199 #endif // QABSTRACTAXIS_H
207 #endif // QABSTRACTAXIS_H
@@ -1,2951 +1,2961
1 import QtQuick.tooling 1.2
1 import QtQuick.tooling 1.2
2
2
3 // This file describes the plugin-supplied types contained in the library.
3 // This file describes the plugin-supplied types contained in the library.
4 // It is used for QML tooling purposes only.
4 // It is used for QML tooling purposes only.
5 //
5 //
6 // This file was auto-generated by:
6 // This file was auto-generated by:
7 // 'qmlplugindump -nonrelocatable QtCharts 2.0'
7 // 'qmlplugindump -nonrelocatable QtCharts 2.0'
8
8
9 Module {
9 Module {
10 dependencies: []
10 dependencies: []
11 Component {
11 Component {
12 name: "QAbstractItemModel"
12 name: "QAbstractItemModel"
13 prototype: "QObject"
13 prototype: "QObject"
14 exports: [
14 exports: [
15 "QtCharts/AbstractItemModel 1.0",
15 "QtCharts/AbstractItemModel 1.0",
16 "QtCharts/AbstractItemModel 2.0"
16 "QtCharts/AbstractItemModel 2.0"
17 ]
17 ]
18 isCreatable: false
18 isCreatable: false
19 exportMetaObjectRevisions: [0, 0]
19 exportMetaObjectRevisions: [0, 0]
20 Enum {
20 Enum {
21 name: "LayoutChangeHint"
21 name: "LayoutChangeHint"
22 values: {
22 values: {
23 "NoLayoutChangeHint": 0,
23 "NoLayoutChangeHint": 0,
24 "VerticalSortHint": 1,
24 "VerticalSortHint": 1,
25 "HorizontalSortHint": 2
25 "HorizontalSortHint": 2
26 }
26 }
27 }
27 }
28 Signal {
28 Signal {
29 name: "dataChanged"
29 name: "dataChanged"
30 Parameter { name: "topLeft"; type: "QModelIndex" }
30 Parameter { name: "topLeft"; type: "QModelIndex" }
31 Parameter { name: "bottomRight"; type: "QModelIndex" }
31 Parameter { name: "bottomRight"; type: "QModelIndex" }
32 Parameter { name: "roles"; type: "QVector<int>" }
32 Parameter { name: "roles"; type: "QVector<int>" }
33 }
33 }
34 Signal {
34 Signal {
35 name: "dataChanged"
35 name: "dataChanged"
36 Parameter { name: "topLeft"; type: "QModelIndex" }
36 Parameter { name: "topLeft"; type: "QModelIndex" }
37 Parameter { name: "bottomRight"; type: "QModelIndex" }
37 Parameter { name: "bottomRight"; type: "QModelIndex" }
38 }
38 }
39 Signal {
39 Signal {
40 name: "headerDataChanged"
40 name: "headerDataChanged"
41 Parameter { name: "orientation"; type: "Qt::Orientation" }
41 Parameter { name: "orientation"; type: "Qt::Orientation" }
42 Parameter { name: "first"; type: "int" }
42 Parameter { name: "first"; type: "int" }
43 Parameter { name: "last"; type: "int" }
43 Parameter { name: "last"; type: "int" }
44 }
44 }
45 Signal {
45 Signal {
46 name: "layoutChanged"
46 name: "layoutChanged"
47 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
47 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
48 Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
48 Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
49 }
49 }
50 Signal {
50 Signal {
51 name: "layoutChanged"
51 name: "layoutChanged"
52 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
52 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
53 }
53 }
54 Signal { name: "layoutChanged" }
54 Signal { name: "layoutChanged" }
55 Signal {
55 Signal {
56 name: "layoutAboutToBeChanged"
56 name: "layoutAboutToBeChanged"
57 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
57 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
58 Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
58 Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
59 }
59 }
60 Signal {
60 Signal {
61 name: "layoutAboutToBeChanged"
61 name: "layoutAboutToBeChanged"
62 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
62 Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
63 }
63 }
64 Signal { name: "layoutAboutToBeChanged" }
64 Signal { name: "layoutAboutToBeChanged" }
65 Signal {
65 Signal {
66 name: "rowsAboutToBeInserted"
66 name: "rowsAboutToBeInserted"
67 Parameter { name: "parent"; type: "QModelIndex" }
67 Parameter { name: "parent"; type: "QModelIndex" }
68 Parameter { name: "first"; type: "int" }
68 Parameter { name: "first"; type: "int" }
69 Parameter { name: "last"; type: "int" }
69 Parameter { name: "last"; type: "int" }
70 }
70 }
71 Signal {
71 Signal {
72 name: "rowsInserted"
72 name: "rowsInserted"
73 Parameter { name: "parent"; type: "QModelIndex" }
73 Parameter { name: "parent"; type: "QModelIndex" }
74 Parameter { name: "first"; type: "int" }
74 Parameter { name: "first"; type: "int" }
75 Parameter { name: "last"; type: "int" }
75 Parameter { name: "last"; type: "int" }
76 }
76 }
77 Signal {
77 Signal {
78 name: "rowsAboutToBeRemoved"
78 name: "rowsAboutToBeRemoved"
79 Parameter { name: "parent"; type: "QModelIndex" }
79 Parameter { name: "parent"; type: "QModelIndex" }
80 Parameter { name: "first"; type: "int" }
80 Parameter { name: "first"; type: "int" }
81 Parameter { name: "last"; type: "int" }
81 Parameter { name: "last"; type: "int" }
82 }
82 }
83 Signal {
83 Signal {
84 name: "rowsRemoved"
84 name: "rowsRemoved"
85 Parameter { name: "parent"; type: "QModelIndex" }
85 Parameter { name: "parent"; type: "QModelIndex" }
86 Parameter { name: "first"; type: "int" }
86 Parameter { name: "first"; type: "int" }
87 Parameter { name: "last"; type: "int" }
87 Parameter { name: "last"; type: "int" }
88 }
88 }
89 Signal {
89 Signal {
90 name: "columnsAboutToBeInserted"
90 name: "columnsAboutToBeInserted"
91 Parameter { name: "parent"; type: "QModelIndex" }
91 Parameter { name: "parent"; type: "QModelIndex" }
92 Parameter { name: "first"; type: "int" }
92 Parameter { name: "first"; type: "int" }
93 Parameter { name: "last"; type: "int" }
93 Parameter { name: "last"; type: "int" }
94 }
94 }
95 Signal {
95 Signal {
96 name: "columnsInserted"
96 name: "columnsInserted"
97 Parameter { name: "parent"; type: "QModelIndex" }
97 Parameter { name: "parent"; type: "QModelIndex" }
98 Parameter { name: "first"; type: "int" }
98 Parameter { name: "first"; type: "int" }
99 Parameter { name: "last"; type: "int" }
99 Parameter { name: "last"; type: "int" }
100 }
100 }
101 Signal {
101 Signal {
102 name: "columnsAboutToBeRemoved"
102 name: "columnsAboutToBeRemoved"
103 Parameter { name: "parent"; type: "QModelIndex" }
103 Parameter { name: "parent"; type: "QModelIndex" }
104 Parameter { name: "first"; type: "int" }
104 Parameter { name: "first"; type: "int" }
105 Parameter { name: "last"; type: "int" }
105 Parameter { name: "last"; type: "int" }
106 }
106 }
107 Signal {
107 Signal {
108 name: "columnsRemoved"
108 name: "columnsRemoved"
109 Parameter { name: "parent"; type: "QModelIndex" }
109 Parameter { name: "parent"; type: "QModelIndex" }
110 Parameter { name: "first"; type: "int" }
110 Parameter { name: "first"; type: "int" }
111 Parameter { name: "last"; type: "int" }
111 Parameter { name: "last"; type: "int" }
112 }
112 }
113 Signal { name: "modelAboutToBeReset" }
113 Signal { name: "modelAboutToBeReset" }
114 Signal { name: "modelReset" }
114 Signal { name: "modelReset" }
115 Signal {
115 Signal {
116 name: "rowsAboutToBeMoved"
116 name: "rowsAboutToBeMoved"
117 Parameter { name: "sourceParent"; type: "QModelIndex" }
117 Parameter { name: "sourceParent"; type: "QModelIndex" }
118 Parameter { name: "sourceStart"; type: "int" }
118 Parameter { name: "sourceStart"; type: "int" }
119 Parameter { name: "sourceEnd"; type: "int" }
119 Parameter { name: "sourceEnd"; type: "int" }
120 Parameter { name: "destinationParent"; type: "QModelIndex" }
120 Parameter { name: "destinationParent"; type: "QModelIndex" }
121 Parameter { name: "destinationRow"; type: "int" }
121 Parameter { name: "destinationRow"; type: "int" }
122 }
122 }
123 Signal {
123 Signal {
124 name: "rowsMoved"
124 name: "rowsMoved"
125 Parameter { name: "parent"; type: "QModelIndex" }
125 Parameter { name: "parent"; type: "QModelIndex" }
126 Parameter { name: "start"; type: "int" }
126 Parameter { name: "start"; type: "int" }
127 Parameter { name: "end"; type: "int" }
127 Parameter { name: "end"; type: "int" }
128 Parameter { name: "destination"; type: "QModelIndex" }
128 Parameter { name: "destination"; type: "QModelIndex" }
129 Parameter { name: "row"; type: "int" }
129 Parameter { name: "row"; type: "int" }
130 }
130 }
131 Signal {
131 Signal {
132 name: "columnsAboutToBeMoved"
132 name: "columnsAboutToBeMoved"
133 Parameter { name: "sourceParent"; type: "QModelIndex" }
133 Parameter { name: "sourceParent"; type: "QModelIndex" }
134 Parameter { name: "sourceStart"; type: "int" }
134 Parameter { name: "sourceStart"; type: "int" }
135 Parameter { name: "sourceEnd"; type: "int" }
135 Parameter { name: "sourceEnd"; type: "int" }
136 Parameter { name: "destinationParent"; type: "QModelIndex" }
136 Parameter { name: "destinationParent"; type: "QModelIndex" }
137 Parameter { name: "destinationColumn"; type: "int" }
137 Parameter { name: "destinationColumn"; type: "int" }
138 }
138 }
139 Signal {
139 Signal {
140 name: "columnsMoved"
140 name: "columnsMoved"
141 Parameter { name: "parent"; type: "QModelIndex" }
141 Parameter { name: "parent"; type: "QModelIndex" }
142 Parameter { name: "start"; type: "int" }
142 Parameter { name: "start"; type: "int" }
143 Parameter { name: "end"; type: "int" }
143 Parameter { name: "end"; type: "int" }
144 Parameter { name: "destination"; type: "QModelIndex" }
144 Parameter { name: "destination"; type: "QModelIndex" }
145 Parameter { name: "column"; type: "int" }
145 Parameter { name: "column"; type: "int" }
146 }
146 }
147 Method { name: "submit"; type: "bool" }
147 Method { name: "submit"; type: "bool" }
148 Method { name: "revert" }
148 Method { name: "revert" }
149 Method {
149 Method {
150 name: "hasIndex"
150 name: "hasIndex"
151 type: "bool"
151 type: "bool"
152 Parameter { name: "row"; type: "int" }
152 Parameter { name: "row"; type: "int" }
153 Parameter { name: "column"; type: "int" }
153 Parameter { name: "column"; type: "int" }
154 Parameter { name: "parent"; type: "QModelIndex" }
154 Parameter { name: "parent"; type: "QModelIndex" }
155 }
155 }
156 Method {
156 Method {
157 name: "hasIndex"
157 name: "hasIndex"
158 type: "bool"
158 type: "bool"
159 Parameter { name: "row"; type: "int" }
159 Parameter { name: "row"; type: "int" }
160 Parameter { name: "column"; type: "int" }
160 Parameter { name: "column"; type: "int" }
161 }
161 }
162 Method {
162 Method {
163 name: "index"
163 name: "index"
164 type: "QModelIndex"
164 type: "QModelIndex"
165 Parameter { name: "row"; type: "int" }
165 Parameter { name: "row"; type: "int" }
166 Parameter { name: "column"; type: "int" }
166 Parameter { name: "column"; type: "int" }
167 Parameter { name: "parent"; type: "QModelIndex" }
167 Parameter { name: "parent"; type: "QModelIndex" }
168 }
168 }
169 Method {
169 Method {
170 name: "index"
170 name: "index"
171 type: "QModelIndex"
171 type: "QModelIndex"
172 Parameter { name: "row"; type: "int" }
172 Parameter { name: "row"; type: "int" }
173 Parameter { name: "column"; type: "int" }
173 Parameter { name: "column"; type: "int" }
174 }
174 }
175 Method {
175 Method {
176 name: "parent"
176 name: "parent"
177 type: "QModelIndex"
177 type: "QModelIndex"
178 Parameter { name: "child"; type: "QModelIndex" }
178 Parameter { name: "child"; type: "QModelIndex" }
179 }
179 }
180 Method {
180 Method {
181 name: "sibling"
181 name: "sibling"
182 type: "QModelIndex"
182 type: "QModelIndex"
183 Parameter { name: "row"; type: "int" }
183 Parameter { name: "row"; type: "int" }
184 Parameter { name: "column"; type: "int" }
184 Parameter { name: "column"; type: "int" }
185 Parameter { name: "idx"; type: "QModelIndex" }
185 Parameter { name: "idx"; type: "QModelIndex" }
186 }
186 }
187 Method {
187 Method {
188 name: "rowCount"
188 name: "rowCount"
189 type: "int"
189 type: "int"
190 Parameter { name: "parent"; type: "QModelIndex" }
190 Parameter { name: "parent"; type: "QModelIndex" }
191 }
191 }
192 Method { name: "rowCount"; type: "int" }
192 Method { name: "rowCount"; type: "int" }
193 Method {
193 Method {
194 name: "columnCount"
194 name: "columnCount"
195 type: "int"
195 type: "int"
196 Parameter { name: "parent"; type: "QModelIndex" }
196 Parameter { name: "parent"; type: "QModelIndex" }
197 }
197 }
198 Method { name: "columnCount"; type: "int" }
198 Method { name: "columnCount"; type: "int" }
199 Method {
199 Method {
200 name: "hasChildren"
200 name: "hasChildren"
201 type: "bool"
201 type: "bool"
202 Parameter { name: "parent"; type: "QModelIndex" }
202 Parameter { name: "parent"; type: "QModelIndex" }
203 }
203 }
204 Method { name: "hasChildren"; type: "bool" }
204 Method { name: "hasChildren"; type: "bool" }
205 Method {
205 Method {
206 name: "data"
206 name: "data"
207 type: "QVariant"
207 type: "QVariant"
208 Parameter { name: "index"; type: "QModelIndex" }
208 Parameter { name: "index"; type: "QModelIndex" }
209 Parameter { name: "role"; type: "int" }
209 Parameter { name: "role"; type: "int" }
210 }
210 }
211 Method {
211 Method {
212 name: "data"
212 name: "data"
213 type: "QVariant"
213 type: "QVariant"
214 Parameter { name: "index"; type: "QModelIndex" }
214 Parameter { name: "index"; type: "QModelIndex" }
215 }
215 }
216 Method {
216 Method {
217 name: "setData"
217 name: "setData"
218 type: "bool"
218 type: "bool"
219 Parameter { name: "index"; type: "QModelIndex" }
219 Parameter { name: "index"; type: "QModelIndex" }
220 Parameter { name: "value"; type: "QVariant" }
220 Parameter { name: "value"; type: "QVariant" }
221 Parameter { name: "role"; type: "int" }
221 Parameter { name: "role"; type: "int" }
222 }
222 }
223 Method {
223 Method {
224 name: "setData"
224 name: "setData"
225 type: "bool"
225 type: "bool"
226 Parameter { name: "index"; type: "QModelIndex" }
226 Parameter { name: "index"; type: "QModelIndex" }
227 Parameter { name: "value"; type: "QVariant" }
227 Parameter { name: "value"; type: "QVariant" }
228 }
228 }
229 Method {
229 Method {
230 name: "headerData"
230 name: "headerData"
231 type: "QVariant"
231 type: "QVariant"
232 Parameter { name: "section"; type: "int" }
232 Parameter { name: "section"; type: "int" }
233 Parameter { name: "orientation"; type: "Qt::Orientation" }
233 Parameter { name: "orientation"; type: "Qt::Orientation" }
234 Parameter { name: "role"; type: "int" }
234 Parameter { name: "role"; type: "int" }
235 }
235 }
236 Method {
236 Method {
237 name: "headerData"
237 name: "headerData"
238 type: "QVariant"
238 type: "QVariant"
239 Parameter { name: "section"; type: "int" }
239 Parameter { name: "section"; type: "int" }
240 Parameter { name: "orientation"; type: "Qt::Orientation" }
240 Parameter { name: "orientation"; type: "Qt::Orientation" }
241 }
241 }
242 Method {
242 Method {
243 name: "fetchMore"
243 name: "fetchMore"
244 Parameter { name: "parent"; type: "QModelIndex" }
244 Parameter { name: "parent"; type: "QModelIndex" }
245 }
245 }
246 Method {
246 Method {
247 name: "canFetchMore"
247 name: "canFetchMore"
248 type: "bool"
248 type: "bool"
249 Parameter { name: "parent"; type: "QModelIndex" }
249 Parameter { name: "parent"; type: "QModelIndex" }
250 }
250 }
251 Method {
251 Method {
252 name: "flags"
252 name: "flags"
253 type: "Qt::ItemFlags"
253 type: "Qt::ItemFlags"
254 Parameter { name: "index"; type: "QModelIndex" }
254 Parameter { name: "index"; type: "QModelIndex" }
255 }
255 }
256 Method {
256 Method {
257 name: "match"
257 name: "match"
258 type: "QModelIndexList"
258 type: "QModelIndexList"
259 Parameter { name: "start"; type: "QModelIndex" }
259 Parameter { name: "start"; type: "QModelIndex" }
260 Parameter { name: "role"; type: "int" }
260 Parameter { name: "role"; type: "int" }
261 Parameter { name: "value"; type: "QVariant" }
261 Parameter { name: "value"; type: "QVariant" }
262 Parameter { name: "hits"; type: "int" }
262 Parameter { name: "hits"; type: "int" }
263 Parameter { name: "flags"; type: "Qt::MatchFlags" }
263 Parameter { name: "flags"; type: "Qt::MatchFlags" }
264 }
264 }
265 Method {
265 Method {
266 name: "match"
266 name: "match"
267 type: "QModelIndexList"
267 type: "QModelIndexList"
268 Parameter { name: "start"; type: "QModelIndex" }
268 Parameter { name: "start"; type: "QModelIndex" }
269 Parameter { name: "role"; type: "int" }
269 Parameter { name: "role"; type: "int" }
270 Parameter { name: "value"; type: "QVariant" }
270 Parameter { name: "value"; type: "QVariant" }
271 Parameter { name: "hits"; type: "int" }
271 Parameter { name: "hits"; type: "int" }
272 }
272 }
273 Method {
273 Method {
274 name: "match"
274 name: "match"
275 type: "QModelIndexList"
275 type: "QModelIndexList"
276 Parameter { name: "start"; type: "QModelIndex" }
276 Parameter { name: "start"; type: "QModelIndex" }
277 Parameter { name: "role"; type: "int" }
277 Parameter { name: "role"; type: "int" }
278 Parameter { name: "value"; type: "QVariant" }
278 Parameter { name: "value"; type: "QVariant" }
279 }
279 }
280 }
280 }
281 Component {
281 Component {
282 name: "QGraphicsObject"
282 name: "QGraphicsObject"
283 defaultProperty: "children"
283 defaultProperty: "children"
284 prototype: "QObject"
284 prototype: "QObject"
285 Property { name: "parent"; type: "QGraphicsObject"; isPointer: true }
285 Property { name: "parent"; type: "QGraphicsObject"; isPointer: true }
286 Property { name: "opacity"; type: "double" }
286 Property { name: "opacity"; type: "double" }
287 Property { name: "enabled"; type: "bool" }
287 Property { name: "enabled"; type: "bool" }
288 Property { name: "visible"; type: "bool" }
288 Property { name: "visible"; type: "bool" }
289 Property { name: "pos"; type: "QPointF" }
289 Property { name: "pos"; type: "QPointF" }
290 Property { name: "x"; type: "double" }
290 Property { name: "x"; type: "double" }
291 Property { name: "y"; type: "double" }
291 Property { name: "y"; type: "double" }
292 Property { name: "z"; type: "double" }
292 Property { name: "z"; type: "double" }
293 Property { name: "rotation"; type: "double" }
293 Property { name: "rotation"; type: "double" }
294 Property { name: "scale"; type: "double" }
294 Property { name: "scale"; type: "double" }
295 Property { name: "transformOriginPoint"; type: "QPointF" }
295 Property { name: "transformOriginPoint"; type: "QPointF" }
296 Property { name: "effect"; type: "QGraphicsEffect"; isPointer: true }
296 Property { name: "effect"; type: "QGraphicsEffect"; isPointer: true }
297 Property {
297 Property {
298 name: "children"
298 name: "children"
299 type: "QDeclarativeListProperty<QGraphicsObject>"
299 type: "QDeclarativeListProperty<QGraphicsObject>"
300 isReadonly: true
300 isReadonly: true
301 }
301 }
302 Property { name: "width"; type: "double" }
302 Property { name: "width"; type: "double" }
303 Property { name: "height"; type: "double" }
303 Property { name: "height"; type: "double" }
304 }
304 }
305 Component {
305 Component {
306 name: "QGraphicsWidget"
306 name: "QGraphicsWidget"
307 defaultProperty: "children"
307 defaultProperty: "children"
308 prototype: "QGraphicsObject"
308 prototype: "QGraphicsObject"
309 Property { name: "palette"; type: "QPalette" }
309 Property { name: "palette"; type: "QPalette" }
310 Property { name: "font"; type: "QFont" }
310 Property { name: "font"; type: "QFont" }
311 Property { name: "layoutDirection"; type: "Qt::LayoutDirection" }
311 Property { name: "layoutDirection"; type: "Qt::LayoutDirection" }
312 Property { name: "size"; type: "QSizeF" }
312 Property { name: "size"; type: "QSizeF" }
313 Property { name: "minimumSize"; type: "QSizeF" }
313 Property { name: "minimumSize"; type: "QSizeF" }
314 Property { name: "preferredSize"; type: "QSizeF" }
314 Property { name: "preferredSize"; type: "QSizeF" }
315 Property { name: "maximumSize"; type: "QSizeF" }
315 Property { name: "maximumSize"; type: "QSizeF" }
316 Property { name: "sizePolicy"; type: "QSizePolicy" }
316 Property { name: "sizePolicy"; type: "QSizePolicy" }
317 Property { name: "focusPolicy"; type: "Qt::FocusPolicy" }
317 Property { name: "focusPolicy"; type: "Qt::FocusPolicy" }
318 Property { name: "windowFlags"; type: "Qt::WindowFlags" }
318 Property { name: "windowFlags"; type: "Qt::WindowFlags" }
319 Property { name: "windowTitle"; type: "string" }
319 Property { name: "windowTitle"; type: "string" }
320 Property { name: "geometry"; type: "QRectF" }
320 Property { name: "geometry"; type: "QRectF" }
321 Property { name: "autoFillBackground"; type: "bool" }
321 Property { name: "autoFillBackground"; type: "bool" }
322 Property { name: "layout"; type: "QGraphicsLayout"; isPointer: true }
322 Property { name: "layout"; type: "QGraphicsLayout"; isPointer: true }
323 Method { name: "close"; type: "bool" }
323 Method { name: "close"; type: "bool" }
324 }
324 }
325 Component {
325 Component {
326 name: "QQuickItem"
326 name: "QQuickItem"
327 defaultProperty: "data"
327 defaultProperty: "data"
328 prototype: "QObject"
328 prototype: "QObject"
329 Enum {
329 Enum {
330 name: "TransformOrigin"
330 name: "TransformOrigin"
331 values: {
331 values: {
332 "TopLeft": 0,
332 "TopLeft": 0,
333 "Top": 1,
333 "Top": 1,
334 "TopRight": 2,
334 "TopRight": 2,
335 "Left": 3,
335 "Left": 3,
336 "Center": 4,
336 "Center": 4,
337 "Right": 5,
337 "Right": 5,
338 "BottomLeft": 6,
338 "BottomLeft": 6,
339 "Bottom": 7,
339 "Bottom": 7,
340 "BottomRight": 8
340 "BottomRight": 8
341 }
341 }
342 }
342 }
343 Property { name: "parent"; type: "QQuickItem"; isPointer: true }
343 Property { name: "parent"; type: "QQuickItem"; isPointer: true }
344 Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
344 Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
345 Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
345 Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
346 Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true }
346 Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true }
347 Property { name: "x"; type: "double" }
347 Property { name: "x"; type: "double" }
348 Property { name: "y"; type: "double" }
348 Property { name: "y"; type: "double" }
349 Property { name: "z"; type: "double" }
349 Property { name: "z"; type: "double" }
350 Property { name: "width"; type: "double" }
350 Property { name: "width"; type: "double" }
351 Property { name: "height"; type: "double" }
351 Property { name: "height"; type: "double" }
352 Property { name: "opacity"; type: "double" }
352 Property { name: "opacity"; type: "double" }
353 Property { name: "enabled"; type: "bool" }
353 Property { name: "enabled"; type: "bool" }
354 Property { name: "visible"; type: "bool" }
354 Property { name: "visible"; type: "bool" }
355 Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
355 Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
356 Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true }
356 Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true }
357 Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true }
357 Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true }
358 Property { name: "state"; type: "string" }
358 Property { name: "state"; type: "string" }
359 Property { name: "childrenRect"; type: "QRectF"; isReadonly: true }
359 Property { name: "childrenRect"; type: "QRectF"; isReadonly: true }
360 Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true }
360 Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true }
361 Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true }
361 Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true }
362 Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true }
362 Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true }
363 Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
363 Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
364 Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true }
364 Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true }
365 Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true }
365 Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true }
366 Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
366 Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true }
367 Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true }
367 Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true }
368 Property { name: "baselineOffset"; type: "double" }
368 Property { name: "baselineOffset"; type: "double" }
369 Property { name: "clip"; type: "bool" }
369 Property { name: "clip"; type: "bool" }
370 Property { name: "focus"; type: "bool" }
370 Property { name: "focus"; type: "bool" }
371 Property { name: "activeFocus"; type: "bool"; isReadonly: true }
371 Property { name: "activeFocus"; type: "bool"; isReadonly: true }
372 Property { name: "activeFocusOnTab"; revision: 1; type: "bool" }
372 Property { name: "activeFocusOnTab"; revision: 1; type: "bool" }
373 Property { name: "rotation"; type: "double" }
373 Property { name: "rotation"; type: "double" }
374 Property { name: "scale"; type: "double" }
374 Property { name: "scale"; type: "double" }
375 Property { name: "transformOrigin"; type: "TransformOrigin" }
375 Property { name: "transformOrigin"; type: "TransformOrigin" }
376 Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true }
376 Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true }
377 Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true }
377 Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true }
378 Property { name: "smooth"; type: "bool" }
378 Property { name: "smooth"; type: "bool" }
379 Property { name: "antialiasing"; type: "bool" }
379 Property { name: "antialiasing"; type: "bool" }
380 Property { name: "implicitWidth"; type: "double" }
380 Property { name: "implicitWidth"; type: "double" }
381 Property { name: "implicitHeight"; type: "double" }
381 Property { name: "implicitHeight"; type: "double" }
382 Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true }
382 Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true }
383 Signal {
383 Signal {
384 name: "childrenRectChanged"
384 name: "childrenRectChanged"
385 Parameter { type: "QRectF" }
385 Parameter { type: "QRectF" }
386 }
386 }
387 Signal {
387 Signal {
388 name: "baselineOffsetChanged"
388 name: "baselineOffsetChanged"
389 Parameter { type: "double" }
389 Parameter { type: "double" }
390 }
390 }
391 Signal {
391 Signal {
392 name: "stateChanged"
392 name: "stateChanged"
393 Parameter { type: "string" }
393 Parameter { type: "string" }
394 }
394 }
395 Signal {
395 Signal {
396 name: "focusChanged"
396 name: "focusChanged"
397 Parameter { type: "bool" }
397 Parameter { type: "bool" }
398 }
398 }
399 Signal {
399 Signal {
400 name: "activeFocusChanged"
400 name: "activeFocusChanged"
401 Parameter { type: "bool" }
401 Parameter { type: "bool" }
402 }
402 }
403 Signal {
403 Signal {
404 name: "activeFocusOnTabChanged"
404 name: "activeFocusOnTabChanged"
405 revision: 1
405 revision: 1
406 Parameter { type: "bool" }
406 Parameter { type: "bool" }
407 }
407 }
408 Signal {
408 Signal {
409 name: "parentChanged"
409 name: "parentChanged"
410 Parameter { type: "QQuickItem"; isPointer: true }
410 Parameter { type: "QQuickItem"; isPointer: true }
411 }
411 }
412 Signal {
412 Signal {
413 name: "transformOriginChanged"
413 name: "transformOriginChanged"
414 Parameter { type: "TransformOrigin" }
414 Parameter { type: "TransformOrigin" }
415 }
415 }
416 Signal {
416 Signal {
417 name: "smoothChanged"
417 name: "smoothChanged"
418 Parameter { type: "bool" }
418 Parameter { type: "bool" }
419 }
419 }
420 Signal {
420 Signal {
421 name: "antialiasingChanged"
421 name: "antialiasingChanged"
422 Parameter { type: "bool" }
422 Parameter { type: "bool" }
423 }
423 }
424 Signal {
424 Signal {
425 name: "clipChanged"
425 name: "clipChanged"
426 Parameter { type: "bool" }
426 Parameter { type: "bool" }
427 }
427 }
428 Signal {
428 Signal {
429 name: "windowChanged"
429 name: "windowChanged"
430 revision: 1
430 revision: 1
431 Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
431 Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
432 }
432 }
433 Method { name: "update" }
433 Method { name: "update" }
434 Method {
434 Method {
435 name: "grabToImage"
435 name: "grabToImage"
436 revision: 2
436 revision: 2
437 type: "bool"
437 type: "bool"
438 Parameter { name: "callback"; type: "QJSValue" }
438 Parameter { name: "callback"; type: "QJSValue" }
439 Parameter { name: "targetSize"; type: "QSize" }
439 Parameter { name: "targetSize"; type: "QSize" }
440 }
440 }
441 Method {
441 Method {
442 name: "grabToImage"
442 name: "grabToImage"
443 revision: 2
443 revision: 2
444 type: "bool"
444 type: "bool"
445 Parameter { name: "callback"; type: "QJSValue" }
445 Parameter { name: "callback"; type: "QJSValue" }
446 }
446 }
447 Method {
447 Method {
448 name: "contains"
448 name: "contains"
449 type: "bool"
449 type: "bool"
450 Parameter { name: "point"; type: "QPointF" }
450 Parameter { name: "point"; type: "QPointF" }
451 }
451 }
452 Method {
452 Method {
453 name: "mapFromItem"
453 name: "mapFromItem"
454 Parameter { type: "QQmlV4Function"; isPointer: true }
454 Parameter { type: "QQmlV4Function"; isPointer: true }
455 }
455 }
456 Method {
456 Method {
457 name: "mapToItem"
457 name: "mapToItem"
458 Parameter { type: "QQmlV4Function"; isPointer: true }
458 Parameter { type: "QQmlV4Function"; isPointer: true }
459 }
459 }
460 Method { name: "forceActiveFocus" }
460 Method { name: "forceActiveFocus" }
461 Method {
461 Method {
462 name: "forceActiveFocus"
462 name: "forceActiveFocus"
463 Parameter { name: "reason"; type: "Qt::FocusReason" }
463 Parameter { name: "reason"; type: "Qt::FocusReason" }
464 }
464 }
465 Method {
465 Method {
466 name: "nextItemInFocusChain"
466 name: "nextItemInFocusChain"
467 revision: 1
467 revision: 1
468 type: "QQuickItem*"
468 type: "QQuickItem*"
469 Parameter { name: "forward"; type: "bool" }
469 Parameter { name: "forward"; type: "bool" }
470 }
470 }
471 Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" }
471 Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" }
472 Method {
472 Method {
473 name: "childAt"
473 name: "childAt"
474 type: "QQuickItem*"
474 type: "QQuickItem*"
475 Parameter { name: "x"; type: "double" }
475 Parameter { name: "x"; type: "double" }
476 Parameter { name: "y"; type: "double" }
476 Parameter { name: "y"; type: "double" }
477 }
477 }
478 }
478 }
479 Component {
479 Component {
480 name: "QQuickPaintedItem"
480 name: "QQuickPaintedItem"
481 defaultProperty: "data"
481 defaultProperty: "data"
482 prototype: "QQuickItem"
482 prototype: "QQuickItem"
483 Enum {
483 Enum {
484 name: "RenderTarget"
484 name: "RenderTarget"
485 values: {
485 values: {
486 "Image": 0,
486 "Image": 0,
487 "FramebufferObject": 1,
487 "FramebufferObject": 1,
488 "InvertedYFramebufferObject": 2
488 "InvertedYFramebufferObject": 2
489 }
489 }
490 }
490 }
491 Property { name: "contentsSize"; type: "QSize" }
491 Property { name: "contentsSize"; type: "QSize" }
492 Property { name: "fillColor"; type: "QColor" }
492 Property { name: "fillColor"; type: "QColor" }
493 Property { name: "contentsScale"; type: "double" }
493 Property { name: "contentsScale"; type: "double" }
494 Property { name: "renderTarget"; type: "RenderTarget" }
494 Property { name: "renderTarget"; type: "RenderTarget" }
495 }
495 }
496 Component {
496 Component {
497 name: "QtCharts::DeclarativeAreaSeries"
497 name: "QtCharts::DeclarativeAreaSeries"
498 prototype: "QtCharts::QAreaSeries"
498 prototype: "QtCharts::QAreaSeries"
499 exports: [
499 exports: [
500 "QtCharts/AreaSeries 1.0",
500 "QtCharts/AreaSeries 1.0",
501 "QtCharts/AreaSeries 1.1",
501 "QtCharts/AreaSeries 1.1",
502 "QtCharts/AreaSeries 1.2",
502 "QtCharts/AreaSeries 1.2",
503 "QtCharts/AreaSeries 1.3",
503 "QtCharts/AreaSeries 1.3",
504 "QtCharts/AreaSeries 1.4",
504 "QtCharts/AreaSeries 1.4",
505 "QtCharts/AreaSeries 2.0"
505 "QtCharts/AreaSeries 2.0"
506 ]
506 ]
507 exportMetaObjectRevisions: [0, 1, 2, 3, 4, 4]
507 exportMetaObjectRevisions: [0, 1, 2, 3, 4, 4]
508 Property { name: "upperSeries"; type: "DeclarativeLineSeries"; isPointer: true }
508 Property { name: "upperSeries"; type: "DeclarativeLineSeries"; isPointer: true }
509 Property { name: "lowerSeries"; type: "DeclarativeLineSeries"; isPointer: true }
509 Property { name: "lowerSeries"; type: "DeclarativeLineSeries"; isPointer: true }
510 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
510 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
511 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
511 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
512 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
512 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
513 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
513 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
514 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
514 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
515 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
515 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
516 Property { name: "borderWidth"; revision: 1; type: "double" }
516 Property { name: "borderWidth"; revision: 1; type: "double" }
517 Property { name: "brushFilename"; revision: 4; type: "string" }
517 Property { name: "brushFilename"; revision: 4; type: "string" }
518 Property { name: "brush"; revision: 4; type: "QBrush" }
518 Property { name: "brush"; revision: 4; type: "QBrush" }
519 Signal {
519 Signal {
520 name: "axisXChanged"
520 name: "axisXChanged"
521 revision: 1
521 revision: 1
522 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
522 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
523 }
523 }
524 Signal {
524 Signal {
525 name: "axisYChanged"
525 name: "axisYChanged"
526 revision: 1
526 revision: 1
527 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
527 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
528 }
528 }
529 Signal {
529 Signal {
530 name: "borderWidthChanged"
530 name: "borderWidthChanged"
531 revision: 1
531 revision: 1
532 Parameter { name: "width"; type: "double" }
532 Parameter { name: "width"; type: "double" }
533 }
533 }
534 Signal {
534 Signal {
535 name: "axisXTopChanged"
535 name: "axisXTopChanged"
536 revision: 2
536 revision: 2
537 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
537 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
538 }
538 }
539 Signal {
539 Signal {
540 name: "axisYRightChanged"
540 name: "axisYRightChanged"
541 revision: 2
541 revision: 2
542 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
542 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
543 }
543 }
544 Signal {
544 Signal {
545 name: "axisAngularChanged"
545 name: "axisAngularChanged"
546 revision: 3
546 revision: 3
547 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
547 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
548 }
548 }
549 Signal {
549 Signal {
550 name: "axisRadialChanged"
550 name: "axisRadialChanged"
551 revision: 3
551 revision: 3
552 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
552 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
553 }
553 }
554 Signal { name: "brushChanged"; revision: 4 }
554 Signal { name: "brushChanged"; revision: 4 }
555 Signal {
555 Signal {
556 name: "brushFilenameChanged"
556 name: "brushFilenameChanged"
557 revision: 4
557 revision: 4
558 Parameter { name: "brushFilename"; type: "string" }
558 Parameter { name: "brushFilename"; type: "string" }
559 }
559 }
560 }
560 }
561 Component {
561 Component {
562 name: "QtCharts::DeclarativeAxes"
562 name: "QtCharts::DeclarativeAxes"
563 prototype: "QObject"
563 prototype: "QObject"
564 exports: [
564 exports: [
565 "QtCharts/DeclarativeAxes 1.0",
565 "QtCharts/DeclarativeAxes 1.0",
566 "QtCharts/DeclarativeAxes 2.0"
566 "QtCharts/DeclarativeAxes 2.0"
567 ]
567 ]
568 isCreatable: false
568 isCreatable: false
569 exportMetaObjectRevisions: [0, 0]
569 exportMetaObjectRevisions: [0, 0]
570 Property { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
570 Property { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
571 Property { name: "axisY"; type: "QAbstractAxis"; isPointer: true }
571 Property { name: "axisY"; type: "QAbstractAxis"; isPointer: true }
572 Property { name: "axisXTop"; type: "QAbstractAxis"; isPointer: true }
572 Property { name: "axisXTop"; type: "QAbstractAxis"; isPointer: true }
573 Property { name: "axisYRight"; type: "QAbstractAxis"; isPointer: true }
573 Property { name: "axisYRight"; type: "QAbstractAxis"; isPointer: true }
574 Signal {
574 Signal {
575 name: "axisXChanged"
575 name: "axisXChanged"
576 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
576 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
577 }
577 }
578 Signal {
578 Signal {
579 name: "axisYChanged"
579 name: "axisYChanged"
580 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
580 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
581 }
581 }
582 Signal {
582 Signal {
583 name: "axisXTopChanged"
583 name: "axisXTopChanged"
584 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
584 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
585 }
585 }
586 Signal {
586 Signal {
587 name: "axisYRightChanged"
587 name: "axisYRightChanged"
588 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
588 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
589 }
589 }
590 }
590 }
591 Component {
591 Component {
592 name: "QtCharts::DeclarativeBarSeries"
592 name: "QtCharts::DeclarativeBarSeries"
593 defaultProperty: "seriesChildren"
593 defaultProperty: "seriesChildren"
594 prototype: "QtCharts::QBarSeries"
594 prototype: "QtCharts::QBarSeries"
595 exports: [
595 exports: [
596 "QtCharts/BarSeries 1.0",
596 "QtCharts/BarSeries 1.0",
597 "QtCharts/BarSeries 1.1",
597 "QtCharts/BarSeries 1.1",
598 "QtCharts/BarSeries 1.2",
598 "QtCharts/BarSeries 1.2",
599 "QtCharts/BarSeries 2.0"
599 "QtCharts/BarSeries 2.0"
600 ]
600 ]
601 exportMetaObjectRevisions: [0, 1, 2, 2]
601 exportMetaObjectRevisions: [0, 1, 2, 2]
602 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
602 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
603 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
603 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
604 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
604 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
605 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
605 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
606 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
606 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
607 Signal {
607 Signal {
608 name: "axisXChanged"
608 name: "axisXChanged"
609 revision: 1
609 revision: 1
610 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
610 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
611 }
611 }
612 Signal {
612 Signal {
613 name: "axisYChanged"
613 name: "axisYChanged"
614 revision: 1
614 revision: 1
615 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
615 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
616 }
616 }
617 Signal {
617 Signal {
618 name: "axisXTopChanged"
618 name: "axisXTopChanged"
619 revision: 2
619 revision: 2
620 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
620 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
621 }
621 }
622 Signal {
622 Signal {
623 name: "axisYRightChanged"
623 name: "axisYRightChanged"
624 revision: 2
624 revision: 2
625 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
625 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
626 }
626 }
627 Method {
627 Method {
628 name: "appendSeriesChildren"
628 name: "appendSeriesChildren"
629 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
629 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
630 Parameter { name: "element"; type: "QObject"; isPointer: true }
630 Parameter { name: "element"; type: "QObject"; isPointer: true }
631 }
631 }
632 Method {
632 Method {
633 name: "at"
633 name: "at"
634 type: "DeclarativeBarSet*"
634 type: "DeclarativeBarSet*"
635 Parameter { name: "index"; type: "int" }
635 Parameter { name: "index"; type: "int" }
636 }
636 }
637 Method {
637 Method {
638 name: "append"
638 name: "append"
639 type: "DeclarativeBarSet*"
639 type: "DeclarativeBarSet*"
640 Parameter { name: "label"; type: "string" }
640 Parameter { name: "label"; type: "string" }
641 Parameter { name: "values"; type: "QVariantList" }
641 Parameter { name: "values"; type: "QVariantList" }
642 }
642 }
643 Method {
643 Method {
644 name: "insert"
644 name: "insert"
645 type: "DeclarativeBarSet*"
645 type: "DeclarativeBarSet*"
646 Parameter { name: "index"; type: "int" }
646 Parameter { name: "index"; type: "int" }
647 Parameter { name: "label"; type: "string" }
647 Parameter { name: "label"; type: "string" }
648 Parameter { name: "values"; type: "QVariantList" }
648 Parameter { name: "values"; type: "QVariantList" }
649 }
649 }
650 Method {
650 Method {
651 name: "remove"
651 name: "remove"
652 type: "bool"
652 type: "bool"
653 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
653 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
654 }
654 }
655 Method { name: "clear" }
655 Method { name: "clear" }
656 }
656 }
657 Component {
657 Component {
658 name: "QtCharts::DeclarativeBarSet"
658 name: "QtCharts::DeclarativeBarSet"
659 prototype: "QtCharts::QBarSet"
659 prototype: "QtCharts::QBarSet"
660 exports: [
660 exports: [
661 "QtCharts/BarSet 1.0",
661 "QtCharts/BarSet 1.0",
662 "QtCharts/BarSet 1.1",
662 "QtCharts/BarSet 1.1",
663 "QtCharts/BarSet 1.4",
663 "QtCharts/BarSet 1.4",
664 "QtCharts/BarSet 2.0"
664 "QtCharts/BarSet 2.0"
665 ]
665 ]
666 exportMetaObjectRevisions: [0, 0, 2, 2]
666 exportMetaObjectRevisions: [0, 0, 2, 2]
667 Property { name: "values"; type: "QVariantList" }
667 Property { name: "values"; type: "QVariantList" }
668 Property { name: "borderWidth"; revision: 1; type: "double" }
668 Property { name: "borderWidth"; revision: 1; type: "double" }
669 Property { name: "count"; type: "int"; isReadonly: true }
669 Property { name: "count"; type: "int"; isReadonly: true }
670 Property { name: "brushFilename"; revision: 2; type: "string" }
670 Property { name: "brushFilename"; revision: 2; type: "string" }
671 Signal {
671 Signal {
672 name: "countChanged"
672 name: "countChanged"
673 Parameter { name: "count"; type: "int" }
673 Parameter { name: "count"; type: "int" }
674 }
674 }
675 Signal {
675 Signal {
676 name: "borderWidthChanged"
676 name: "borderWidthChanged"
677 revision: 1
677 revision: 1
678 Parameter { name: "width"; type: "double" }
678 Parameter { name: "width"; type: "double" }
679 }
679 }
680 Signal {
680 Signal {
681 name: "brushFilenameChanged"
681 name: "brushFilenameChanged"
682 revision: 2
682 revision: 2
683 Parameter { name: "brushFilename"; type: "string" }
683 Parameter { name: "brushFilename"; type: "string" }
684 }
684 }
685 Method {
685 Method {
686 name: "append"
686 name: "append"
687 Parameter { name: "value"; type: "double" }
687 Parameter { name: "value"; type: "double" }
688 }
688 }
689 Method {
689 Method {
690 name: "remove"
690 name: "remove"
691 Parameter { name: "index"; type: "int" }
691 Parameter { name: "index"; type: "int" }
692 Parameter { name: "count"; type: "int" }
692 Parameter { name: "count"; type: "int" }
693 }
693 }
694 Method {
694 Method {
695 name: "remove"
695 name: "remove"
696 Parameter { name: "index"; type: "int" }
696 Parameter { name: "index"; type: "int" }
697 }
697 }
698 Method {
698 Method {
699 name: "replace"
699 name: "replace"
700 Parameter { name: "index"; type: "int" }
700 Parameter { name: "index"; type: "int" }
701 Parameter { name: "value"; type: "double" }
701 Parameter { name: "value"; type: "double" }
702 }
702 }
703 Method {
703 Method {
704 name: "at"
704 name: "at"
705 type: "double"
705 type: "double"
706 Parameter { name: "index"; type: "int" }
706 Parameter { name: "index"; type: "int" }
707 }
707 }
708 }
708 }
709 Component {
709 Component {
710 name: "QtCharts::DeclarativeBoxPlotSeries"
710 name: "QtCharts::DeclarativeBoxPlotSeries"
711 defaultProperty: "seriesChildren"
711 defaultProperty: "seriesChildren"
712 prototype: "QtCharts::QBoxPlotSeries"
712 prototype: "QtCharts::QBoxPlotSeries"
713 exports: [
713 exports: [
714 "QtCharts/BoxPlotSeries 1.3",
714 "QtCharts/BoxPlotSeries 1.3",
715 "QtCharts/BoxPlotSeries 1.4",
715 "QtCharts/BoxPlotSeries 1.4",
716 "QtCharts/BoxPlotSeries 2.0"
716 "QtCharts/BoxPlotSeries 2.0"
717 ]
717 ]
718 exportMetaObjectRevisions: [0, 1, 1]
718 exportMetaObjectRevisions: [0, 1, 1]
719 Property { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
719 Property { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
720 Property { name: "axisY"; type: "QAbstractAxis"; isPointer: true }
720 Property { name: "axisY"; type: "QAbstractAxis"; isPointer: true }
721 Property { name: "axisXTop"; type: "QAbstractAxis"; isPointer: true }
721 Property { name: "axisXTop"; type: "QAbstractAxis"; isPointer: true }
722 Property { name: "axisYRight"; type: "QAbstractAxis"; isPointer: true }
722 Property { name: "axisYRight"; type: "QAbstractAxis"; isPointer: true }
723 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
723 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
724 Property { name: "brushFilename"; revision: 1; type: "string" }
724 Property { name: "brushFilename"; revision: 1; type: "string" }
725 Signal {
725 Signal {
726 name: "axisXChanged"
726 name: "axisXChanged"
727 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
727 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
728 }
728 }
729 Signal {
729 Signal {
730 name: "axisYChanged"
730 name: "axisYChanged"
731 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
731 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
732 }
732 }
733 Signal {
733 Signal {
734 name: "axisXTopChanged"
734 name: "axisXTopChanged"
735 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
735 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
736 }
736 }
737 Signal {
737 Signal {
738 name: "axisYRightChanged"
738 name: "axisYRightChanged"
739 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
739 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
740 }
740 }
741 Signal {
741 Signal {
742 name: "clicked"
742 name: "clicked"
743 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
743 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
744 }
744 }
745 Signal {
745 Signal {
746 name: "hovered"
746 name: "hovered"
747 Parameter { name: "status"; type: "bool" }
747 Parameter { name: "status"; type: "bool" }
748 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
748 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
749 }
749 }
750 Signal {
750 Signal {
751 name: "pressed"
751 name: "pressed"
752 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
752 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
753 }
753 }
754 Signal {
754 Signal {
755 name: "released"
755 name: "released"
756 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
756 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
757 }
757 }
758 Signal {
758 Signal {
759 name: "doubleClicked"
759 name: "doubleClicked"
760 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
760 Parameter { name: "boxset"; type: "DeclarativeBoxSet"; isPointer: true }
761 }
761 }
762 Signal {
762 Signal {
763 name: "brushFilenameChanged"
763 name: "brushFilenameChanged"
764 revision: 1
764 revision: 1
765 Parameter { name: "brushFilename"; type: "string" }
765 Parameter { name: "brushFilename"; type: "string" }
766 }
766 }
767 Method {
767 Method {
768 name: "appendSeriesChildren"
768 name: "appendSeriesChildren"
769 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
769 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
770 Parameter { name: "element"; type: "QObject"; isPointer: true }
770 Parameter { name: "element"; type: "QObject"; isPointer: true }
771 }
771 }
772 Method {
772 Method {
773 name: "onHovered"
773 name: "onHovered"
774 Parameter { name: "status"; type: "bool" }
774 Parameter { name: "status"; type: "bool" }
775 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
775 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
776 }
776 }
777 Method {
777 Method {
778 name: "onClicked"
778 name: "onClicked"
779 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
779 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
780 }
780 }
781 Method {
781 Method {
782 name: "onPressed"
782 name: "onPressed"
783 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
783 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
784 }
784 }
785 Method {
785 Method {
786 name: "onReleased"
786 name: "onReleased"
787 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
787 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
788 }
788 }
789 Method {
789 Method {
790 name: "onDoubleClicked"
790 name: "onDoubleClicked"
791 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
791 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
792 }
792 }
793 Method {
793 Method {
794 name: "at"
794 name: "at"
795 type: "DeclarativeBoxSet*"
795 type: "DeclarativeBoxSet*"
796 Parameter { name: "index"; type: "int" }
796 Parameter { name: "index"; type: "int" }
797 }
797 }
798 Method {
798 Method {
799 name: "append"
799 name: "append"
800 type: "DeclarativeBoxSet*"
800 type: "DeclarativeBoxSet*"
801 Parameter { name: "label"; type: "string" }
801 Parameter { name: "label"; type: "string" }
802 Parameter { name: "values"; type: "QVariantList" }
802 Parameter { name: "values"; type: "QVariantList" }
803 }
803 }
804 Method {
804 Method {
805 name: "append"
805 name: "append"
806 Parameter { name: "box"; type: "DeclarativeBoxSet"; isPointer: true }
806 Parameter { name: "box"; type: "DeclarativeBoxSet"; isPointer: true }
807 }
807 }
808 Method {
808 Method {
809 name: "insert"
809 name: "insert"
810 type: "DeclarativeBoxSet*"
810 type: "DeclarativeBoxSet*"
811 Parameter { name: "index"; type: "int" }
811 Parameter { name: "index"; type: "int" }
812 Parameter { name: "label"; type: "string" }
812 Parameter { name: "label"; type: "string" }
813 Parameter { name: "values"; type: "QVariantList" }
813 Parameter { name: "values"; type: "QVariantList" }
814 }
814 }
815 Method {
815 Method {
816 name: "remove"
816 name: "remove"
817 type: "bool"
817 type: "bool"
818 Parameter { name: "box"; type: "DeclarativeBoxSet"; isPointer: true }
818 Parameter { name: "box"; type: "DeclarativeBoxSet"; isPointer: true }
819 }
819 }
820 Method { name: "clear" }
820 Method { name: "clear" }
821 }
821 }
822 Component {
822 Component {
823 name: "QtCharts::DeclarativeBoxSet"
823 name: "QtCharts::DeclarativeBoxSet"
824 prototype: "QtCharts::QBoxSet"
824 prototype: "QtCharts::QBoxSet"
825 exports: [
825 exports: [
826 "QtCharts/BoxSet 1.3",
826 "QtCharts/BoxSet 1.3",
827 "QtCharts/BoxSet 1.4",
827 "QtCharts/BoxSet 1.4",
828 "QtCharts/BoxSet 2.0"
828 "QtCharts/BoxSet 2.0"
829 ]
829 ]
830 exportMetaObjectRevisions: [0, 1, 1]
830 exportMetaObjectRevisions: [0, 1, 1]
831 Enum {
831 Enum {
832 name: "ValuePositions"
832 name: "ValuePositions"
833 values: {
833 values: {
834 "LowerExtreme": 0,
834 "LowerExtreme": 0,
835 "LowerQuartile": 1,
835 "LowerQuartile": 1,
836 "Median": 2,
836 "Median": 2,
837 "UpperQuartile": 3,
837 "UpperQuartile": 3,
838 "UpperExtreme": 4
838 "UpperExtreme": 4
839 }
839 }
840 }
840 }
841 Property { name: "values"; type: "QVariantList" }
841 Property { name: "values"; type: "QVariantList" }
842 Property { name: "label"; type: "string" }
842 Property { name: "label"; type: "string" }
843 Property { name: "count"; type: "int"; isReadonly: true }
843 Property { name: "count"; type: "int"; isReadonly: true }
844 Property { name: "brushFilename"; revision: 1; type: "string" }
844 Property { name: "brushFilename"; revision: 1; type: "string" }
845 Signal { name: "changedValues" }
845 Signal { name: "changedValues" }
846 Signal {
846 Signal {
847 name: "changedValue"
847 name: "changedValue"
848 Parameter { name: "index"; type: "int" }
848 Parameter { name: "index"; type: "int" }
849 }
849 }
850 Signal {
850 Signal {
851 name: "brushFilenameChanged"
851 name: "brushFilenameChanged"
852 revision: 1
852 revision: 1
853 Parameter { name: "brushFilename"; type: "string" }
853 Parameter { name: "brushFilename"; type: "string" }
854 }
854 }
855 Method {
855 Method {
856 name: "append"
856 name: "append"
857 Parameter { name: "value"; type: "double" }
857 Parameter { name: "value"; type: "double" }
858 }
858 }
859 Method { name: "clear" }
859 Method { name: "clear" }
860 Method {
860 Method {
861 name: "at"
861 name: "at"
862 type: "double"
862 type: "double"
863 Parameter { name: "index"; type: "int" }
863 Parameter { name: "index"; type: "int" }
864 }
864 }
865 Method {
865 Method {
866 name: "setValue"
866 name: "setValue"
867 Parameter { name: "index"; type: "int" }
867 Parameter { name: "index"; type: "int" }
868 Parameter { name: "value"; type: "double" }
868 Parameter { name: "value"; type: "double" }
869 }
869 }
870 }
870 }
871 Component {
871 Component {
872 name: "QtCharts::DeclarativeCategoryAxis"
872 name: "QtCharts::DeclarativeCategoryAxis"
873 defaultProperty: "axisChildren"
873 defaultProperty: "axisChildren"
874 prototype: "QtCharts::QCategoryAxis"
874 prototype: "QtCharts::QCategoryAxis"
875 exports: [
875 exports: [
876 "QtCharts/CategoryAxis 1.1",
876 "QtCharts/CategoryAxis 1.1",
877 "QtCharts/CategoryAxis 2.0",
877 "QtCharts/CategoryAxis 2.0",
878 "QtCharts/CategoryAxis 2.1"
878 "QtCharts/CategoryAxis 2.1"
879 ]
879 ]
880 exportMetaObjectRevisions: [0, 0, 1]
880 exportMetaObjectRevisions: [0, 0, 1]
881 Enum {
881 Enum {
882 name: "AxisLabelsPosition"
882 name: "AxisLabelsPosition"
883 values: {
883 values: {
884 "AxisLabelsPositionCenter": 0,
884 "AxisLabelsPositionCenter": 0,
885 "AxisLabelsPositionOnValue": 1
885 "AxisLabelsPositionOnValue": 1
886 }
886 }
887 }
887 }
888 Property { name: "axisChildren"; type: "QObject"; isList: true; isReadonly: true }
888 Property { name: "axisChildren"; type: "QObject"; isList: true; isReadonly: true }
889 Property { name: "labelsPosition"; revision: 1; type: "AxisLabelsPosition" }
889 Property { name: "labelsPosition"; revision: 1; type: "AxisLabelsPosition" }
890 Signal {
890 Signal {
891 name: "labelsPositionChanged"
891 name: "labelsPositionChanged"
892 revision: 1
892 revision: 1
893 Parameter { name: "position"; type: "AxisLabelsPosition" }
893 Parameter { name: "position"; type: "AxisLabelsPosition" }
894 }
894 }
895 Method {
895 Method {
896 name: "append"
896 name: "append"
897 Parameter { name: "label"; type: "string" }
897 Parameter { name: "label"; type: "string" }
898 Parameter { name: "categoryEndValue"; type: "double" }
898 Parameter { name: "categoryEndValue"; type: "double" }
899 }
899 }
900 Method {
900 Method {
901 name: "remove"
901 name: "remove"
902 Parameter { name: "label"; type: "string" }
902 Parameter { name: "label"; type: "string" }
903 }
903 }
904 Method {
904 Method {
905 name: "replace"
905 name: "replace"
906 Parameter { name: "oldLabel"; type: "string" }
906 Parameter { name: "oldLabel"; type: "string" }
907 Parameter { name: "newLabel"; type: "string" }
907 Parameter { name: "newLabel"; type: "string" }
908 }
908 }
909 Method {
909 Method {
910 name: "appendAxisChildren"
910 name: "appendAxisChildren"
911 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
911 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
912 Parameter { name: "element"; type: "QObject"; isPointer: true }
912 Parameter { name: "element"; type: "QObject"; isPointer: true }
913 }
913 }
914 }
914 }
915 Component {
915 Component {
916 name: "QtCharts::DeclarativeCategoryRange"
916 name: "QtCharts::DeclarativeCategoryRange"
917 prototype: "QObject"
917 prototype: "QObject"
918 exports: ["QtCharts/CategoryRange 1.1", "QtCharts/CategoryRange 2.0"]
918 exports: ["QtCharts/CategoryRange 1.1", "QtCharts/CategoryRange 2.0"]
919 exportMetaObjectRevisions: [0, 0]
919 exportMetaObjectRevisions: [0, 0]
920 Property { name: "endValue"; type: "double" }
920 Property { name: "endValue"; type: "double" }
921 Property { name: "label"; type: "string" }
921 Property { name: "label"; type: "string" }
922 }
922 }
923 Component {
923 Component {
924 name: "QtCharts::DeclarativeChart"
924 name: "QtCharts::DeclarativeChart"
925 defaultProperty: "data"
925 defaultProperty: "data"
926 prototype: "QQuickPaintedItem"
926 prototype: "QQuickPaintedItem"
927 exports: [
927 exports: [
928 "QtCharts/ChartView 1.0",
928 "QtCharts/ChartView 1.0",
929 "QtCharts/ChartView 1.1",
929 "QtCharts/ChartView 1.1",
930 "QtCharts/ChartView 1.2",
930 "QtCharts/ChartView 1.2",
931 "QtCharts/ChartView 1.3",
931 "QtCharts/ChartView 1.3",
932 "QtCharts/ChartView 2.0",
932 "QtCharts/ChartView 2.0",
933 "QtCharts/ChartView 2.1"
933 "QtCharts/ChartView 2.1"
934 ]
934 ]
935 exportMetaObjectRevisions: [0, 1, 2, 3, 4, 5]
935 exportMetaObjectRevisions: [0, 1, 2, 3, 4, 5]
936 Enum {
936 Enum {
937 name: "Theme"
937 name: "Theme"
938 values: {
938 values: {
939 "ChartThemeLight": 0,
939 "ChartThemeLight": 0,
940 "ChartThemeBlueCerulean": 1,
940 "ChartThemeBlueCerulean": 1,
941 "ChartThemeDark": 2,
941 "ChartThemeDark": 2,
942 "ChartThemeBrownSand": 3,
942 "ChartThemeBrownSand": 3,
943 "ChartThemeBlueNcs": 4,
943 "ChartThemeBlueNcs": 4,
944 "ChartThemeHighContrast": 5,
944 "ChartThemeHighContrast": 5,
945 "ChartThemeBlueIcy": 6,
945 "ChartThemeBlueIcy": 6,
946 "ChartThemeQt": 7
946 "ChartThemeQt": 7
947 }
947 }
948 }
948 }
949 Enum {
949 Enum {
950 name: "Animation"
950 name: "Animation"
951 values: {
951 values: {
952 "NoAnimation": 0,
952 "NoAnimation": 0,
953 "GridAxisAnimations": 1,
953 "GridAxisAnimations": 1,
954 "SeriesAnimations": 2,
954 "SeriesAnimations": 2,
955 "AllAnimations": 3
955 "AllAnimations": 3
956 }
956 }
957 }
957 }
958 Enum {
958 Enum {
959 name: "SeriesType"
959 name: "SeriesType"
960 values: {
960 values: {
961 "SeriesTypeLine": 0,
961 "SeriesTypeLine": 0,
962 "SeriesTypeArea": 1,
962 "SeriesTypeArea": 1,
963 "SeriesTypeBar": 2,
963 "SeriesTypeBar": 2,
964 "SeriesTypeStackedBar": 3,
964 "SeriesTypeStackedBar": 3,
965 "SeriesTypePercentBar": 4,
965 "SeriesTypePercentBar": 4,
966 "SeriesTypeBoxPlot": 5,
966 "SeriesTypeBoxPlot": 5,
967 "SeriesTypePie": 6,
967 "SeriesTypePie": 6,
968 "SeriesTypeScatter": 7,
968 "SeriesTypeScatter": 7,
969 "SeriesTypeSpline": 8,
969 "SeriesTypeSpline": 8,
970 "SeriesTypeHorizontalBar": 9,
970 "SeriesTypeHorizontalBar": 9,
971 "SeriesTypeHorizontalStackedBar": 10,
971 "SeriesTypeHorizontalStackedBar": 10,
972 "SeriesTypeHorizontalPercentBar": 11
972 "SeriesTypeHorizontalPercentBar": 11
973 }
973 }
974 }
974 }
975 Property { name: "theme"; type: "Theme" }
975 Property { name: "theme"; type: "Theme" }
976 Property { name: "animationOptions"; type: "Animation" }
976 Property { name: "animationOptions"; type: "Animation" }
977 Property { name: "animationDuration"; revision: 5; type: "int" }
977 Property { name: "animationDuration"; revision: 5; type: "int" }
978 Property { name: "animationEasingCurve"; revision: 5; type: "QEasingCurve" }
978 Property { name: "animationEasingCurve"; revision: 5; type: "QEasingCurve" }
979 Property { name: "title"; type: "string" }
979 Property { name: "title"; type: "string" }
980 Property { name: "titleFont"; type: "QFont" }
980 Property { name: "titleFont"; type: "QFont" }
981 Property { name: "titleColor"; type: "QColor" }
981 Property { name: "titleColor"; type: "QColor" }
982 Property { name: "legend"; type: "QLegend"; isReadonly: true; isPointer: true }
982 Property { name: "legend"; type: "QLegend"; isReadonly: true; isPointer: true }
983 Property { name: "count"; type: "int"; isReadonly: true }
983 Property { name: "count"; type: "int"; isReadonly: true }
984 Property { name: "backgroundColor"; type: "QColor" }
984 Property { name: "backgroundColor"; type: "QColor" }
985 Property { name: "dropShadowEnabled"; type: "bool" }
985 Property { name: "dropShadowEnabled"; type: "bool" }
986 Property { name: "backgroundRoundness"; revision: 3; type: "double" }
986 Property { name: "backgroundRoundness"; revision: 3; type: "double" }
987 Property {
987 Property {
988 name: "margins"
988 name: "margins"
989 revision: 2
989 revision: 2
990 type: "DeclarativeMargins"
990 type: "DeclarativeMargins"
991 isReadonly: true
991 isReadonly: true
992 isPointer: true
992 isPointer: true
993 }
993 }
994 Property { name: "plotArea"; revision: 1; type: "QRectF"; isReadonly: true }
994 Property { name: "plotArea"; revision: 1; type: "QRectF"; isReadonly: true }
995 Property { name: "plotAreaColor"; revision: 3; type: "QColor" }
995 Property { name: "plotAreaColor"; revision: 3; type: "QColor" }
996 Property { name: "axes"; revision: 2; type: "QAbstractAxis"; isList: true; isReadonly: true }
996 Property { name: "axes"; revision: 2; type: "QAbstractAxis"; isList: true; isReadonly: true }
997 Property { name: "localizeNumbers"; revision: 4; type: "bool" }
997 Property { name: "localizeNumbers"; revision: 4; type: "bool" }
998 Property { name: "locale"; revision: 4; type: "QLocale" }
998 Property { name: "locale"; revision: 4; type: "QLocale" }
999 Signal { name: "axisLabelsChanged" }
999 Signal { name: "axisLabelsChanged" }
1000 Signal {
1000 Signal {
1001 name: "titleColorChanged"
1001 name: "titleColorChanged"
1002 Parameter { name: "color"; type: "QColor" }
1002 Parameter { name: "color"; type: "QColor" }
1003 }
1003 }
1004 Signal {
1004 Signal {
1005 name: "dropShadowEnabledChanged"
1005 name: "dropShadowEnabledChanged"
1006 Parameter { name: "enabled"; type: "bool" }
1006 Parameter { name: "enabled"; type: "bool" }
1007 }
1007 }
1008 Signal { name: "marginsChanged"; revision: 2 }
1008 Signal { name: "marginsChanged"; revision: 2 }
1009 Signal {
1009 Signal {
1010 name: "plotAreaChanged"
1010 name: "plotAreaChanged"
1011 Parameter { name: "plotArea"; type: "QRectF" }
1011 Parameter { name: "plotArea"; type: "QRectF" }
1012 }
1012 }
1013 Signal {
1013 Signal {
1014 name: "seriesAdded"
1014 name: "seriesAdded"
1015 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1015 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1016 }
1016 }
1017 Signal {
1017 Signal {
1018 name: "seriesRemoved"
1018 name: "seriesRemoved"
1019 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1019 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1020 }
1020 }
1021 Signal { name: "plotAreaColorChanged"; revision: 3 }
1021 Signal { name: "plotAreaColorChanged"; revision: 3 }
1022 Signal {
1022 Signal {
1023 name: "backgroundRoundnessChanged"
1023 name: "backgroundRoundnessChanged"
1024 revision: 3
1024 revision: 3
1025 Parameter { name: "diameter"; type: "double" }
1025 Parameter { name: "diameter"; type: "double" }
1026 }
1026 }
1027 Signal { name: "localizeNumbersChanged"; revision: 4 }
1027 Signal { name: "localizeNumbersChanged"; revision: 4 }
1028 Signal { name: "localeChanged"; revision: 4 }
1028 Signal { name: "localeChanged"; revision: 4 }
1029 Signal {
1029 Signal {
1030 name: "animationDurationChanged"
1030 name: "animationDurationChanged"
1031 revision: 5
1031 revision: 5
1032 Parameter { name: "msecs"; type: "int" }
1032 Parameter { name: "msecs"; type: "int" }
1033 }
1033 }
1034 Signal {
1034 Signal {
1035 name: "animationEasingCurveChanged"
1035 name: "animationEasingCurveChanged"
1036 revision: 5
1036 revision: 5
1037 Parameter { name: "curve"; type: "QEasingCurve" }
1037 Parameter { name: "curve"; type: "QEasingCurve" }
1038 }
1038 }
1039 Method {
1039 Method {
1040 name: "series"
1040 name: "series"
1041 type: "QAbstractSeries*"
1041 type: "QAbstractSeries*"
1042 Parameter { name: "index"; type: "int" }
1042 Parameter { name: "index"; type: "int" }
1043 }
1043 }
1044 Method {
1044 Method {
1045 name: "series"
1045 name: "series"
1046 type: "QAbstractSeries*"
1046 type: "QAbstractSeries*"
1047 Parameter { name: "seriesName"; type: "string" }
1047 Parameter { name: "seriesName"; type: "string" }
1048 }
1048 }
1049 Method {
1049 Method {
1050 name: "createSeries"
1050 name: "createSeries"
1051 type: "QAbstractSeries*"
1051 type: "QAbstractSeries*"
1052 Parameter { name: "type"; type: "int" }
1052 Parameter { name: "type"; type: "int" }
1053 Parameter { name: "name"; type: "string" }
1053 Parameter { name: "name"; type: "string" }
1054 Parameter { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
1054 Parameter { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
1055 Parameter { name: "axisY"; type: "QAbstractAxis"; isPointer: true }
1055 Parameter { name: "axisY"; type: "QAbstractAxis"; isPointer: true }
1056 }
1056 }
1057 Method {
1057 Method {
1058 name: "createSeries"
1058 name: "createSeries"
1059 type: "QAbstractSeries*"
1059 type: "QAbstractSeries*"
1060 Parameter { name: "type"; type: "int" }
1060 Parameter { name: "type"; type: "int" }
1061 Parameter { name: "name"; type: "string" }
1061 Parameter { name: "name"; type: "string" }
1062 Parameter { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
1062 Parameter { name: "axisX"; type: "QAbstractAxis"; isPointer: true }
1063 }
1063 }
1064 Method {
1064 Method {
1065 name: "createSeries"
1065 name: "createSeries"
1066 type: "QAbstractSeries*"
1066 type: "QAbstractSeries*"
1067 Parameter { name: "type"; type: "int" }
1067 Parameter { name: "type"; type: "int" }
1068 Parameter { name: "name"; type: "string" }
1068 Parameter { name: "name"; type: "string" }
1069 }
1069 }
1070 Method {
1070 Method {
1071 name: "createSeries"
1071 name: "createSeries"
1072 type: "QAbstractSeries*"
1072 type: "QAbstractSeries*"
1073 Parameter { name: "type"; type: "int" }
1073 Parameter { name: "type"; type: "int" }
1074 }
1074 }
1075 Method {
1075 Method {
1076 name: "removeSeries"
1076 name: "removeSeries"
1077 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1077 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1078 }
1078 }
1079 Method { name: "removeAllSeries" }
1079 Method { name: "removeAllSeries" }
1080 Method {
1080 Method {
1081 name: "setAxisX"
1081 name: "setAxisX"
1082 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1082 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1083 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1083 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1084 }
1084 }
1085 Method {
1085 Method {
1086 name: "setAxisX"
1086 name: "setAxisX"
1087 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1087 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1088 }
1088 }
1089 Method {
1089 Method {
1090 name: "setAxisY"
1090 name: "setAxisY"
1091 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1091 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1092 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1092 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1093 }
1093 }
1094 Method {
1094 Method {
1095 name: "setAxisY"
1095 name: "setAxisY"
1096 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1096 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1097 }
1097 }
1098 Method {
1098 Method {
1099 name: "axisX"
1099 name: "axisX"
1100 type: "QAbstractAxis*"
1100 type: "QAbstractAxis*"
1101 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1101 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1102 }
1102 }
1103 Method { name: "axisX"; type: "QAbstractAxis*" }
1103 Method { name: "axisX"; type: "QAbstractAxis*" }
1104 Method {
1104 Method {
1105 name: "axisY"
1105 name: "axisY"
1106 type: "QAbstractAxis*"
1106 type: "QAbstractAxis*"
1107 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1107 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1108 }
1108 }
1109 Method { name: "axisY"; type: "QAbstractAxis*" }
1109 Method { name: "axisY"; type: "QAbstractAxis*" }
1110 Method {
1110 Method {
1111 name: "zoom"
1111 name: "zoom"
1112 Parameter { name: "factor"; type: "double" }
1112 Parameter { name: "factor"; type: "double" }
1113 }
1113 }
1114 Method { name: "zoomIn"; revision: 5 }
1114 Method { name: "zoomIn"; revision: 5 }
1115 Method {
1115 Method {
1116 name: "zoomIn"
1116 name: "zoomIn"
1117 revision: 5
1117 revision: 5
1118 Parameter { name: "rectangle"; type: "QRectF" }
1118 Parameter { name: "rectangle"; type: "QRectF" }
1119 }
1119 }
1120 Method { name: "zoomOut"; revision: 5 }
1120 Method { name: "zoomOut"; revision: 5 }
1121 Method { name: "zoomReset"; revision: 5 }
1121 Method { name: "zoomReset"; revision: 5 }
1122 Method {
1122 Method {
1123 name: "scrollLeft"
1123 name: "scrollLeft"
1124 Parameter { name: "pixels"; type: "double" }
1124 Parameter { name: "pixels"; type: "double" }
1125 }
1125 }
1126 Method {
1126 Method {
1127 name: "scrollRight"
1127 name: "scrollRight"
1128 Parameter { name: "pixels"; type: "double" }
1128 Parameter { name: "pixels"; type: "double" }
1129 }
1129 }
1130 Method {
1130 Method {
1131 name: "scrollUp"
1131 name: "scrollUp"
1132 Parameter { name: "pixels"; type: "double" }
1132 Parameter { name: "pixels"; type: "double" }
1133 }
1133 }
1134 Method {
1134 Method {
1135 name: "scrollDown"
1135 name: "scrollDown"
1136 Parameter { name: "pixels"; type: "double" }
1136 Parameter { name: "pixels"; type: "double" }
1137 }
1137 }
1138 Method {
1138 Method {
1139 name: "mapToValue"
1139 name: "mapToValue"
1140 revision: 5
1140 revision: 5
1141 type: "QPointF"
1141 type: "QPointF"
1142 Parameter { name: "position"; type: "QPointF" }
1142 Parameter { name: "position"; type: "QPointF" }
1143 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1143 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1144 }
1144 }
1145 Method {
1145 Method {
1146 name: "mapToValue"
1146 name: "mapToValue"
1147 revision: 5
1147 revision: 5
1148 type: "QPointF"
1148 type: "QPointF"
1149 Parameter { name: "position"; type: "QPointF" }
1149 Parameter { name: "position"; type: "QPointF" }
1150 }
1150 }
1151 Method {
1151 Method {
1152 name: "mapToPosition"
1152 name: "mapToPosition"
1153 revision: 5
1153 revision: 5
1154 type: "QPointF"
1154 type: "QPointF"
1155 Parameter { name: "value"; type: "QPointF" }
1155 Parameter { name: "value"; type: "QPointF" }
1156 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1156 Parameter { name: "series"; type: "QAbstractSeries"; isPointer: true }
1157 }
1157 }
1158 Method {
1158 Method {
1159 name: "mapToPosition"
1159 name: "mapToPosition"
1160 revision: 5
1160 revision: 5
1161 type: "QPointF"
1161 type: "QPointF"
1162 Parameter { name: "value"; type: "QPointF" }
1162 Parameter { name: "value"; type: "QPointF" }
1163 }
1163 }
1164 }
1164 }
1165 Component {
1165 Component {
1166 name: "QtCharts::DeclarativeHorizontalBarSeries"
1166 name: "QtCharts::DeclarativeHorizontalBarSeries"
1167 defaultProperty: "seriesChildren"
1167 defaultProperty: "seriesChildren"
1168 prototype: "QtCharts::QHorizontalBarSeries"
1168 prototype: "QtCharts::QHorizontalBarSeries"
1169 exports: [
1169 exports: [
1170 "QtCharts/HorizontalBarSeries 1.1",
1170 "QtCharts/HorizontalBarSeries 1.1",
1171 "QtCharts/HorizontalBarSeries 1.2",
1171 "QtCharts/HorizontalBarSeries 1.2",
1172 "QtCharts/HorizontalBarSeries 2.0"
1172 "QtCharts/HorizontalBarSeries 2.0"
1173 ]
1173 ]
1174 exportMetaObjectRevisions: [1, 2, 2]
1174 exportMetaObjectRevisions: [1, 2, 2]
1175 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1175 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1176 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1176 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1177 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1177 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1178 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1178 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1179 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1179 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1180 Signal {
1180 Signal {
1181 name: "axisXChanged"
1181 name: "axisXChanged"
1182 revision: 1
1182 revision: 1
1183 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1183 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1184 }
1184 }
1185 Signal {
1185 Signal {
1186 name: "axisYChanged"
1186 name: "axisYChanged"
1187 revision: 1
1187 revision: 1
1188 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1188 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1189 }
1189 }
1190 Signal {
1190 Signal {
1191 name: "axisXTopChanged"
1191 name: "axisXTopChanged"
1192 revision: 2
1192 revision: 2
1193 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1193 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1194 }
1194 }
1195 Signal {
1195 Signal {
1196 name: "axisYRightChanged"
1196 name: "axisYRightChanged"
1197 revision: 2
1197 revision: 2
1198 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1198 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1199 }
1199 }
1200 Method {
1200 Method {
1201 name: "appendSeriesChildren"
1201 name: "appendSeriesChildren"
1202 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1202 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1203 Parameter { name: "element"; type: "QObject"; isPointer: true }
1203 Parameter { name: "element"; type: "QObject"; isPointer: true }
1204 }
1204 }
1205 Method {
1205 Method {
1206 name: "at"
1206 name: "at"
1207 type: "DeclarativeBarSet*"
1207 type: "DeclarativeBarSet*"
1208 Parameter { name: "index"; type: "int" }
1208 Parameter { name: "index"; type: "int" }
1209 }
1209 }
1210 Method {
1210 Method {
1211 name: "append"
1211 name: "append"
1212 type: "DeclarativeBarSet*"
1212 type: "DeclarativeBarSet*"
1213 Parameter { name: "label"; type: "string" }
1213 Parameter { name: "label"; type: "string" }
1214 Parameter { name: "values"; type: "QVariantList" }
1214 Parameter { name: "values"; type: "QVariantList" }
1215 }
1215 }
1216 Method {
1216 Method {
1217 name: "insert"
1217 name: "insert"
1218 type: "DeclarativeBarSet*"
1218 type: "DeclarativeBarSet*"
1219 Parameter { name: "index"; type: "int" }
1219 Parameter { name: "index"; type: "int" }
1220 Parameter { name: "label"; type: "string" }
1220 Parameter { name: "label"; type: "string" }
1221 Parameter { name: "values"; type: "QVariantList" }
1221 Parameter { name: "values"; type: "QVariantList" }
1222 }
1222 }
1223 Method {
1223 Method {
1224 name: "remove"
1224 name: "remove"
1225 type: "bool"
1225 type: "bool"
1226 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1226 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1227 }
1227 }
1228 Method { name: "clear" }
1228 Method { name: "clear" }
1229 }
1229 }
1230 Component {
1230 Component {
1231 name: "QtCharts::DeclarativeHorizontalPercentBarSeries"
1231 name: "QtCharts::DeclarativeHorizontalPercentBarSeries"
1232 defaultProperty: "seriesChildren"
1232 defaultProperty: "seriesChildren"
1233 prototype: "QtCharts::QHorizontalPercentBarSeries"
1233 prototype: "QtCharts::QHorizontalPercentBarSeries"
1234 exports: [
1234 exports: [
1235 "QtCharts/HorizontalPercentBarSeries 1.1",
1235 "QtCharts/HorizontalPercentBarSeries 1.1",
1236 "QtCharts/HorizontalPercentBarSeries 1.2",
1236 "QtCharts/HorizontalPercentBarSeries 1.2",
1237 "QtCharts/HorizontalPercentBarSeries 2.0"
1237 "QtCharts/HorizontalPercentBarSeries 2.0"
1238 ]
1238 ]
1239 exportMetaObjectRevisions: [1, 2, 2]
1239 exportMetaObjectRevisions: [1, 2, 2]
1240 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1240 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1241 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1241 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1242 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1242 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1243 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1243 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1244 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1244 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1245 Signal {
1245 Signal {
1246 name: "axisXChanged"
1246 name: "axisXChanged"
1247 revision: 1
1247 revision: 1
1248 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1248 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1249 }
1249 }
1250 Signal {
1250 Signal {
1251 name: "axisYChanged"
1251 name: "axisYChanged"
1252 revision: 1
1252 revision: 1
1253 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1253 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1254 }
1254 }
1255 Signal {
1255 Signal {
1256 name: "axisXTopChanged"
1256 name: "axisXTopChanged"
1257 revision: 2
1257 revision: 2
1258 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1258 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1259 }
1259 }
1260 Signal {
1260 Signal {
1261 name: "axisYRightChanged"
1261 name: "axisYRightChanged"
1262 revision: 2
1262 revision: 2
1263 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1263 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1264 }
1264 }
1265 Method {
1265 Method {
1266 name: "appendSeriesChildren"
1266 name: "appendSeriesChildren"
1267 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1267 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1268 Parameter { name: "element"; type: "QObject"; isPointer: true }
1268 Parameter { name: "element"; type: "QObject"; isPointer: true }
1269 }
1269 }
1270 Method {
1270 Method {
1271 name: "at"
1271 name: "at"
1272 type: "DeclarativeBarSet*"
1272 type: "DeclarativeBarSet*"
1273 Parameter { name: "index"; type: "int" }
1273 Parameter { name: "index"; type: "int" }
1274 }
1274 }
1275 Method {
1275 Method {
1276 name: "append"
1276 name: "append"
1277 type: "DeclarativeBarSet*"
1277 type: "DeclarativeBarSet*"
1278 Parameter { name: "label"; type: "string" }
1278 Parameter { name: "label"; type: "string" }
1279 Parameter { name: "values"; type: "QVariantList" }
1279 Parameter { name: "values"; type: "QVariantList" }
1280 }
1280 }
1281 Method {
1281 Method {
1282 name: "insert"
1282 name: "insert"
1283 type: "DeclarativeBarSet*"
1283 type: "DeclarativeBarSet*"
1284 Parameter { name: "index"; type: "int" }
1284 Parameter { name: "index"; type: "int" }
1285 Parameter { name: "label"; type: "string" }
1285 Parameter { name: "label"; type: "string" }
1286 Parameter { name: "values"; type: "QVariantList" }
1286 Parameter { name: "values"; type: "QVariantList" }
1287 }
1287 }
1288 Method {
1288 Method {
1289 name: "remove"
1289 name: "remove"
1290 type: "bool"
1290 type: "bool"
1291 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1291 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1292 }
1292 }
1293 Method { name: "clear" }
1293 Method { name: "clear" }
1294 }
1294 }
1295 Component {
1295 Component {
1296 name: "QtCharts::DeclarativeHorizontalStackedBarSeries"
1296 name: "QtCharts::DeclarativeHorizontalStackedBarSeries"
1297 defaultProperty: "seriesChildren"
1297 defaultProperty: "seriesChildren"
1298 prototype: "QtCharts::QHorizontalStackedBarSeries"
1298 prototype: "QtCharts::QHorizontalStackedBarSeries"
1299 exports: [
1299 exports: [
1300 "QtCharts/HorizontalStackedBarSeries 1.1",
1300 "QtCharts/HorizontalStackedBarSeries 1.1",
1301 "QtCharts/HorizontalStackedBarSeries 1.2",
1301 "QtCharts/HorizontalStackedBarSeries 1.2",
1302 "QtCharts/HorizontalStackedBarSeries 2.0"
1302 "QtCharts/HorizontalStackedBarSeries 2.0"
1303 ]
1303 ]
1304 exportMetaObjectRevisions: [1, 2, 2]
1304 exportMetaObjectRevisions: [1, 2, 2]
1305 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1305 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1306 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1306 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1307 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1307 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1308 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1308 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1309 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1309 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1310 Signal {
1310 Signal {
1311 name: "axisXChanged"
1311 name: "axisXChanged"
1312 revision: 1
1312 revision: 1
1313 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1313 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1314 }
1314 }
1315 Signal {
1315 Signal {
1316 name: "axisYChanged"
1316 name: "axisYChanged"
1317 revision: 1
1317 revision: 1
1318 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1318 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1319 }
1319 }
1320 Signal {
1320 Signal {
1321 name: "axisXTopChanged"
1321 name: "axisXTopChanged"
1322 revision: 2
1322 revision: 2
1323 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1323 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1324 }
1324 }
1325 Signal {
1325 Signal {
1326 name: "axisYRightChanged"
1326 name: "axisYRightChanged"
1327 revision: 2
1327 revision: 2
1328 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1328 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1329 }
1329 }
1330 Method {
1330 Method {
1331 name: "appendSeriesChildren"
1331 name: "appendSeriesChildren"
1332 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1332 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1333 Parameter { name: "element"; type: "QObject"; isPointer: true }
1333 Parameter { name: "element"; type: "QObject"; isPointer: true }
1334 }
1334 }
1335 Method {
1335 Method {
1336 name: "at"
1336 name: "at"
1337 type: "DeclarativeBarSet*"
1337 type: "DeclarativeBarSet*"
1338 Parameter { name: "index"; type: "int" }
1338 Parameter { name: "index"; type: "int" }
1339 }
1339 }
1340 Method {
1340 Method {
1341 name: "append"
1341 name: "append"
1342 type: "DeclarativeBarSet*"
1342 type: "DeclarativeBarSet*"
1343 Parameter { name: "label"; type: "string" }
1343 Parameter { name: "label"; type: "string" }
1344 Parameter { name: "values"; type: "QVariantList" }
1344 Parameter { name: "values"; type: "QVariantList" }
1345 }
1345 }
1346 Method {
1346 Method {
1347 name: "insert"
1347 name: "insert"
1348 type: "DeclarativeBarSet*"
1348 type: "DeclarativeBarSet*"
1349 Parameter { name: "index"; type: "int" }
1349 Parameter { name: "index"; type: "int" }
1350 Parameter { name: "label"; type: "string" }
1350 Parameter { name: "label"; type: "string" }
1351 Parameter { name: "values"; type: "QVariantList" }
1351 Parameter { name: "values"; type: "QVariantList" }
1352 }
1352 }
1353 Method {
1353 Method {
1354 name: "remove"
1354 name: "remove"
1355 type: "bool"
1355 type: "bool"
1356 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1356 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1357 }
1357 }
1358 Method { name: "clear" }
1358 Method { name: "clear" }
1359 }
1359 }
1360 Component {
1360 Component {
1361 name: "QtCharts::DeclarativeLineSeries"
1361 name: "QtCharts::DeclarativeLineSeries"
1362 defaultProperty: "declarativeChildren"
1362 defaultProperty: "declarativeChildren"
1363 prototype: "QtCharts::QLineSeries"
1363 prototype: "QtCharts::QLineSeries"
1364 exports: [
1364 exports: [
1365 "QtCharts/LineSeries 1.0",
1365 "QtCharts/LineSeries 1.0",
1366 "QtCharts/LineSeries 1.1",
1366 "QtCharts/LineSeries 1.1",
1367 "QtCharts/LineSeries 1.2",
1367 "QtCharts/LineSeries 1.2",
1368 "QtCharts/LineSeries 1.3",
1368 "QtCharts/LineSeries 1.3",
1369 "QtCharts/LineSeries 2.0",
1369 "QtCharts/LineSeries 2.0",
1370 "QtCharts/LineSeries 2.1"
1370 "QtCharts/LineSeries 2.1"
1371 ]
1371 ]
1372 exportMetaObjectRevisions: [0, 1, 2, 3, 3, 4]
1372 exportMetaObjectRevisions: [0, 1, 2, 3, 3, 4]
1373 Property { name: "count"; type: "int"; isReadonly: true }
1373 Property { name: "count"; type: "int"; isReadonly: true }
1374 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1374 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1375 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1375 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1376 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1376 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1377 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1377 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1378 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1378 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1379 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1379 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1380 Property { name: "width"; revision: 1; type: "double" }
1380 Property { name: "width"; revision: 1; type: "double" }
1381 Property { name: "style"; revision: 1; type: "Qt::PenStyle" }
1381 Property { name: "style"; revision: 1; type: "Qt::PenStyle" }
1382 Property { name: "capStyle"; revision: 1; type: "Qt::PenCapStyle" }
1382 Property { name: "capStyle"; revision: 1; type: "Qt::PenCapStyle" }
1383 Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true }
1383 Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true }
1384 Signal {
1384 Signal {
1385 name: "countChanged"
1385 name: "countChanged"
1386 Parameter { name: "count"; type: "int" }
1386 Parameter { name: "count"; type: "int" }
1387 }
1387 }
1388 Signal {
1388 Signal {
1389 name: "axisXChanged"
1389 name: "axisXChanged"
1390 revision: 1
1390 revision: 1
1391 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1391 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1392 }
1392 }
1393 Signal {
1393 Signal {
1394 name: "axisYChanged"
1394 name: "axisYChanged"
1395 revision: 1
1395 revision: 1
1396 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1396 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1397 }
1397 }
1398 Signal {
1398 Signal {
1399 name: "axisXTopChanged"
1399 name: "axisXTopChanged"
1400 revision: 2
1400 revision: 2
1401 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1401 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1402 }
1402 }
1403 Signal {
1403 Signal {
1404 name: "axisYRightChanged"
1404 name: "axisYRightChanged"
1405 revision: 2
1405 revision: 2
1406 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1406 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1407 }
1407 }
1408 Signal {
1408 Signal {
1409 name: "axisAngularChanged"
1409 name: "axisAngularChanged"
1410 revision: 3
1410 revision: 3
1411 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1411 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1412 }
1412 }
1413 Signal {
1413 Signal {
1414 name: "axisRadialChanged"
1414 name: "axisRadialChanged"
1415 revision: 3
1415 revision: 3
1416 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1416 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1417 }
1417 }
1418 Signal {
1418 Signal {
1419 name: "widthChanged"
1419 name: "widthChanged"
1420 revision: 1
1420 revision: 1
1421 Parameter { name: "width"; type: "double" }
1421 Parameter { name: "width"; type: "double" }
1422 }
1422 }
1423 Signal {
1423 Signal {
1424 name: "styleChanged"
1424 name: "styleChanged"
1425 revision: 1
1425 revision: 1
1426 Parameter { name: "style"; type: "Qt::PenStyle" }
1426 Parameter { name: "style"; type: "Qt::PenStyle" }
1427 }
1427 }
1428 Signal {
1428 Signal {
1429 name: "capStyleChanged"
1429 name: "capStyleChanged"
1430 revision: 1
1430 revision: 1
1431 Parameter { name: "capStyle"; type: "Qt::PenCapStyle" }
1431 Parameter { name: "capStyle"; type: "Qt::PenCapStyle" }
1432 }
1432 }
1433 Method {
1433 Method {
1434 name: "appendDeclarativeChildren"
1434 name: "appendDeclarativeChildren"
1435 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1435 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1436 Parameter { name: "element"; type: "QObject"; isPointer: true }
1436 Parameter { name: "element"; type: "QObject"; isPointer: true }
1437 }
1437 }
1438 Method {
1438 Method {
1439 name: "handleCountChanged"
1439 name: "handleCountChanged"
1440 Parameter { name: "index"; type: "int" }
1440 Parameter { name: "index"; type: "int" }
1441 }
1441 }
1442 Method {
1442 Method {
1443 name: "append"
1443 name: "append"
1444 Parameter { name: "x"; type: "double" }
1444 Parameter { name: "x"; type: "double" }
1445 Parameter { name: "y"; type: "double" }
1445 Parameter { name: "y"; type: "double" }
1446 }
1446 }
1447 Method {
1447 Method {
1448 name: "replace"
1448 name: "replace"
1449 Parameter { name: "oldX"; type: "double" }
1449 Parameter { name: "oldX"; type: "double" }
1450 Parameter { name: "oldY"; type: "double" }
1450 Parameter { name: "oldY"; type: "double" }
1451 Parameter { name: "newX"; type: "double" }
1451 Parameter { name: "newX"; type: "double" }
1452 Parameter { name: "newY"; type: "double" }
1452 Parameter { name: "newY"; type: "double" }
1453 }
1453 }
1454 Method {
1454 Method {
1455 name: "replace"
1455 name: "replace"
1456 revision: 3
1456 revision: 3
1457 Parameter { name: "index"; type: "int" }
1457 Parameter { name: "index"; type: "int" }
1458 Parameter { name: "newX"; type: "double" }
1458 Parameter { name: "newX"; type: "double" }
1459 Parameter { name: "newY"; type: "double" }
1459 Parameter { name: "newY"; type: "double" }
1460 }
1460 }
1461 Method {
1461 Method {
1462 name: "remove"
1462 name: "remove"
1463 Parameter { name: "x"; type: "double" }
1463 Parameter { name: "x"; type: "double" }
1464 Parameter { name: "y"; type: "double" }
1464 Parameter { name: "y"; type: "double" }
1465 }
1465 }
1466 Method {
1466 Method {
1467 name: "remove"
1467 name: "remove"
1468 revision: 3
1468 revision: 3
1469 Parameter { name: "index"; type: "int" }
1469 Parameter { name: "index"; type: "int" }
1470 }
1470 }
1471 Method {
1471 Method {
1472 name: "removePoints"
1472 name: "removePoints"
1473 revision: 4
1473 revision: 4
1474 Parameter { name: "index"; type: "int" }
1474 Parameter { name: "index"; type: "int" }
1475 Parameter { name: "count"; type: "int" }
1475 Parameter { name: "count"; type: "int" }
1476 }
1476 }
1477 Method {
1477 Method {
1478 name: "insert"
1478 name: "insert"
1479 Parameter { name: "index"; type: "int" }
1479 Parameter { name: "index"; type: "int" }
1480 Parameter { name: "x"; type: "double" }
1480 Parameter { name: "x"; type: "double" }
1481 Parameter { name: "y"; type: "double" }
1481 Parameter { name: "y"; type: "double" }
1482 }
1482 }
1483 Method { name: "clear" }
1483 Method { name: "clear" }
1484 Method {
1484 Method {
1485 name: "at"
1485 name: "at"
1486 type: "QPointF"
1486 type: "QPointF"
1487 Parameter { name: "index"; type: "int" }
1487 Parameter { name: "index"; type: "int" }
1488 }
1488 }
1489 }
1489 }
1490 Component {
1490 Component {
1491 name: "QtCharts::DeclarativeMargins"
1491 name: "QtCharts::DeclarativeMargins"
1492 prototype: "QObject"
1492 prototype: "QObject"
1493 exports: ["QtCharts/Margins 1.1", "QtCharts/Margins 2.0"]
1493 exports: ["QtCharts/Margins 1.1", "QtCharts/Margins 2.0"]
1494 isCreatable: false
1494 isCreatable: false
1495 exportMetaObjectRevisions: [0, 0]
1495 exportMetaObjectRevisions: [0, 0]
1496 Property { name: "top"; type: "int" }
1496 Property { name: "top"; type: "int" }
1497 Property { name: "bottom"; type: "int" }
1497 Property { name: "bottom"; type: "int" }
1498 Property { name: "left"; type: "int" }
1498 Property { name: "left"; type: "int" }
1499 Property { name: "right"; type: "int" }
1499 Property { name: "right"; type: "int" }
1500 Signal {
1500 Signal {
1501 name: "topChanged"
1501 name: "topChanged"
1502 Parameter { name: "top"; type: "int" }
1502 Parameter { name: "top"; type: "int" }
1503 Parameter { name: "bottom"; type: "int" }
1503 Parameter { name: "bottom"; type: "int" }
1504 Parameter { name: "left"; type: "int" }
1504 Parameter { name: "left"; type: "int" }
1505 Parameter { name: "right"; type: "int" }
1505 Parameter { name: "right"; type: "int" }
1506 }
1506 }
1507 Signal {
1507 Signal {
1508 name: "bottomChanged"
1508 name: "bottomChanged"
1509 Parameter { name: "top"; type: "int" }
1509 Parameter { name: "top"; type: "int" }
1510 Parameter { name: "bottom"; type: "int" }
1510 Parameter { name: "bottom"; type: "int" }
1511 Parameter { name: "left"; type: "int" }
1511 Parameter { name: "left"; type: "int" }
1512 Parameter { name: "right"; type: "int" }
1512 Parameter { name: "right"; type: "int" }
1513 }
1513 }
1514 Signal {
1514 Signal {
1515 name: "leftChanged"
1515 name: "leftChanged"
1516 Parameter { name: "top"; type: "int" }
1516 Parameter { name: "top"; type: "int" }
1517 Parameter { name: "bottom"; type: "int" }
1517 Parameter { name: "bottom"; type: "int" }
1518 Parameter { name: "left"; type: "int" }
1518 Parameter { name: "left"; type: "int" }
1519 Parameter { name: "right"; type: "int" }
1519 Parameter { name: "right"; type: "int" }
1520 }
1520 }
1521 Signal {
1521 Signal {
1522 name: "rightChanged"
1522 name: "rightChanged"
1523 Parameter { name: "top"; type: "int" }
1523 Parameter { name: "top"; type: "int" }
1524 Parameter { name: "bottom"; type: "int" }
1524 Parameter { name: "bottom"; type: "int" }
1525 Parameter { name: "left"; type: "int" }
1525 Parameter { name: "left"; type: "int" }
1526 Parameter { name: "right"; type: "int" }
1526 Parameter { name: "right"; type: "int" }
1527 }
1527 }
1528 }
1528 }
1529 Component {
1529 Component {
1530 name: "QtCharts::DeclarativePercentBarSeries"
1530 name: "QtCharts::DeclarativePercentBarSeries"
1531 defaultProperty: "seriesChildren"
1531 defaultProperty: "seriesChildren"
1532 prototype: "QtCharts::QPercentBarSeries"
1532 prototype: "QtCharts::QPercentBarSeries"
1533 exports: [
1533 exports: [
1534 "QtCharts/PercentBarSeries 1.0",
1534 "QtCharts/PercentBarSeries 1.0",
1535 "QtCharts/PercentBarSeries 1.1",
1535 "QtCharts/PercentBarSeries 1.1",
1536 "QtCharts/PercentBarSeries 1.2",
1536 "QtCharts/PercentBarSeries 1.2",
1537 "QtCharts/PercentBarSeries 2.0"
1537 "QtCharts/PercentBarSeries 2.0"
1538 ]
1538 ]
1539 exportMetaObjectRevisions: [0, 1, 2, 2]
1539 exportMetaObjectRevisions: [0, 1, 2, 2]
1540 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1540 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1541 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1541 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1542 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1542 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1543 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1543 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1544 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1544 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1545 Signal {
1545 Signal {
1546 name: "axisXChanged"
1546 name: "axisXChanged"
1547 revision: 1
1547 revision: 1
1548 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1548 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1549 }
1549 }
1550 Signal {
1550 Signal {
1551 name: "axisYChanged"
1551 name: "axisYChanged"
1552 revision: 1
1552 revision: 1
1553 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1553 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1554 }
1554 }
1555 Signal {
1555 Signal {
1556 name: "axisXTopChanged"
1556 name: "axisXTopChanged"
1557 revision: 2
1557 revision: 2
1558 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1558 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1559 }
1559 }
1560 Signal {
1560 Signal {
1561 name: "axisYRightChanged"
1561 name: "axisYRightChanged"
1562 revision: 2
1562 revision: 2
1563 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1563 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1564 }
1564 }
1565 Method {
1565 Method {
1566 name: "appendSeriesChildren"
1566 name: "appendSeriesChildren"
1567 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1567 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1568 Parameter { name: "element"; type: "QObject"; isPointer: true }
1568 Parameter { name: "element"; type: "QObject"; isPointer: true }
1569 }
1569 }
1570 Method {
1570 Method {
1571 name: "at"
1571 name: "at"
1572 type: "DeclarativeBarSet*"
1572 type: "DeclarativeBarSet*"
1573 Parameter { name: "index"; type: "int" }
1573 Parameter { name: "index"; type: "int" }
1574 }
1574 }
1575 Method {
1575 Method {
1576 name: "append"
1576 name: "append"
1577 type: "DeclarativeBarSet*"
1577 type: "DeclarativeBarSet*"
1578 Parameter { name: "label"; type: "string" }
1578 Parameter { name: "label"; type: "string" }
1579 Parameter { name: "values"; type: "QVariantList" }
1579 Parameter { name: "values"; type: "QVariantList" }
1580 }
1580 }
1581 Method {
1581 Method {
1582 name: "insert"
1582 name: "insert"
1583 type: "DeclarativeBarSet*"
1583 type: "DeclarativeBarSet*"
1584 Parameter { name: "index"; type: "int" }
1584 Parameter { name: "index"; type: "int" }
1585 Parameter { name: "label"; type: "string" }
1585 Parameter { name: "label"; type: "string" }
1586 Parameter { name: "values"; type: "QVariantList" }
1586 Parameter { name: "values"; type: "QVariantList" }
1587 }
1587 }
1588 Method {
1588 Method {
1589 name: "remove"
1589 name: "remove"
1590 type: "bool"
1590 type: "bool"
1591 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1591 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1592 }
1592 }
1593 Method { name: "clear" }
1593 Method { name: "clear" }
1594 }
1594 }
1595 Component {
1595 Component {
1596 name: "QtCharts::DeclarativePieSeries"
1596 name: "QtCharts::DeclarativePieSeries"
1597 defaultProperty: "seriesChildren"
1597 defaultProperty: "seriesChildren"
1598 prototype: "QtCharts::QPieSeries"
1598 prototype: "QtCharts::QPieSeries"
1599 exports: [
1599 exports: [
1600 "QtCharts/PieSeries 1.0",
1600 "QtCharts/PieSeries 1.0",
1601 "QtCharts/PieSeries 1.1",
1601 "QtCharts/PieSeries 1.1",
1602 "QtCharts/PieSeries 2.0"
1602 "QtCharts/PieSeries 2.0"
1603 ]
1603 ]
1604 exportMetaObjectRevisions: [0, 0, 0]
1604 exportMetaObjectRevisions: [0, 0, 0]
1605 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1605 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1606 Signal {
1606 Signal {
1607 name: "sliceAdded"
1607 name: "sliceAdded"
1608 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
1608 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
1609 }
1609 }
1610 Signal {
1610 Signal {
1611 name: "sliceRemoved"
1611 name: "sliceRemoved"
1612 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
1612 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
1613 }
1613 }
1614 Method {
1614 Method {
1615 name: "appendSeriesChildren"
1615 name: "appendSeriesChildren"
1616 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1616 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1617 Parameter { name: "element"; type: "QObject"; isPointer: true }
1617 Parameter { name: "element"; type: "QObject"; isPointer: true }
1618 }
1618 }
1619 Method {
1619 Method {
1620 name: "handleAdded"
1620 name: "handleAdded"
1621 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
1621 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
1622 }
1622 }
1623 Method {
1623 Method {
1624 name: "handleRemoved"
1624 name: "handleRemoved"
1625 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
1625 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
1626 }
1626 }
1627 Method {
1627 Method {
1628 name: "at"
1628 name: "at"
1629 type: "QPieSlice*"
1629 type: "QPieSlice*"
1630 Parameter { name: "index"; type: "int" }
1630 Parameter { name: "index"; type: "int" }
1631 }
1631 }
1632 Method {
1632 Method {
1633 name: "find"
1633 name: "find"
1634 type: "QPieSlice*"
1634 type: "QPieSlice*"
1635 Parameter { name: "label"; type: "string" }
1635 Parameter { name: "label"; type: "string" }
1636 }
1636 }
1637 Method {
1637 Method {
1638 name: "append"
1638 name: "append"
1639 type: "DeclarativePieSlice*"
1639 type: "DeclarativePieSlice*"
1640 Parameter { name: "label"; type: "string" }
1640 Parameter { name: "label"; type: "string" }
1641 Parameter { name: "value"; type: "double" }
1641 Parameter { name: "value"; type: "double" }
1642 }
1642 }
1643 Method {
1643 Method {
1644 name: "remove"
1644 name: "remove"
1645 type: "bool"
1645 type: "bool"
1646 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
1646 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
1647 }
1647 }
1648 Method { name: "clear" }
1648 Method { name: "clear" }
1649 }
1649 }
1650 Component {
1650 Component {
1651 name: "QtCharts::DeclarativePieSlice"
1651 name: "QtCharts::DeclarativePieSlice"
1652 prototype: "QtCharts::QPieSlice"
1652 prototype: "QtCharts::QPieSlice"
1653 exports: ["QtCharts/PieSlice 1.4", "QtCharts/PieSlice 2.0"]
1653 exports: ["QtCharts/PieSlice 1.4", "QtCharts/PieSlice 2.0"]
1654 exportMetaObjectRevisions: [0, 0]
1654 exportMetaObjectRevisions: [0, 0]
1655 Property { name: "brushFilename"; type: "string" }
1655 Property { name: "brushFilename"; type: "string" }
1656 Signal {
1656 Signal {
1657 name: "brushFilenameChanged"
1657 name: "brushFilenameChanged"
1658 Parameter { name: "brushFilename"; type: "string" }
1658 Parameter { name: "brushFilename"; type: "string" }
1659 }
1659 }
1660 }
1660 }
1661 Component {
1661 Component {
1662 name: "QtCharts::DeclarativePolarChart"
1662 name: "QtCharts::DeclarativePolarChart"
1663 defaultProperty: "data"
1663 defaultProperty: "data"
1664 prototype: "QtCharts::DeclarativeChart"
1664 prototype: "QtCharts::DeclarativeChart"
1665 exports: [
1665 exports: [
1666 "QtCharts/PolarChartView 1.3",
1666 "QtCharts/PolarChartView 1.3",
1667 "QtCharts/PolarChartView 2.0"
1667 "QtCharts/PolarChartView 2.0"
1668 ]
1668 ]
1669 exportMetaObjectRevisions: [1, 1]
1669 exportMetaObjectRevisions: [1, 1]
1670 }
1670 }
1671 Component {
1671 Component {
1672 name: "QtCharts::DeclarativeScatterSeries"
1672 name: "QtCharts::DeclarativeScatterSeries"
1673 defaultProperty: "declarativeChildren"
1673 defaultProperty: "declarativeChildren"
1674 prototype: "QtCharts::QScatterSeries"
1674 prototype: "QtCharts::QScatterSeries"
1675 exports: [
1675 exports: [
1676 "QtCharts/ScatterSeries 1.0",
1676 "QtCharts/ScatterSeries 1.0",
1677 "QtCharts/ScatterSeries 1.1",
1677 "QtCharts/ScatterSeries 1.1",
1678 "QtCharts/ScatterSeries 1.2",
1678 "QtCharts/ScatterSeries 1.2",
1679 "QtCharts/ScatterSeries 1.3",
1679 "QtCharts/ScatterSeries 1.3",
1680 "QtCharts/ScatterSeries 1.4",
1680 "QtCharts/ScatterSeries 1.4",
1681 "QtCharts/ScatterSeries 2.0",
1681 "QtCharts/ScatterSeries 2.0",
1682 "QtCharts/ScatterSeries 2.1"
1682 "QtCharts/ScatterSeries 2.1"
1683 ]
1683 ]
1684 exportMetaObjectRevisions: [0, 1, 2, 3, 4, 4, 5]
1684 exportMetaObjectRevisions: [0, 1, 2, 3, 4, 4, 5]
1685 Property { name: "count"; type: "int"; isReadonly: true }
1685 Property { name: "count"; type: "int"; isReadonly: true }
1686 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1686 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1687 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1687 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1688 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1688 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1689 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1689 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1690 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1690 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1691 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1691 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1692 Property { name: "borderWidth"; revision: 1; type: "double" }
1692 Property { name: "borderWidth"; revision: 1; type: "double" }
1693 Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true }
1693 Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true }
1694 Property { name: "brushFilename"; revision: 4; type: "string" }
1694 Property { name: "brushFilename"; revision: 4; type: "string" }
1695 Property { name: "brush"; revision: 4; type: "QBrush" }
1695 Property { name: "brush"; revision: 4; type: "QBrush" }
1696 Signal {
1696 Signal {
1697 name: "countChanged"
1697 name: "countChanged"
1698 Parameter { name: "count"; type: "int" }
1698 Parameter { name: "count"; type: "int" }
1699 }
1699 }
1700 Signal {
1700 Signal {
1701 name: "axisXChanged"
1701 name: "axisXChanged"
1702 revision: 1
1702 revision: 1
1703 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1703 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1704 }
1704 }
1705 Signal {
1705 Signal {
1706 name: "axisYChanged"
1706 name: "axisYChanged"
1707 revision: 1
1707 revision: 1
1708 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1708 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1709 }
1709 }
1710 Signal {
1710 Signal {
1711 name: "borderWidthChanged"
1711 name: "borderWidthChanged"
1712 revision: 1
1712 revision: 1
1713 Parameter { name: "width"; type: "double" }
1713 Parameter { name: "width"; type: "double" }
1714 }
1714 }
1715 Signal {
1715 Signal {
1716 name: "axisXTopChanged"
1716 name: "axisXTopChanged"
1717 revision: 2
1717 revision: 2
1718 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1718 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1719 }
1719 }
1720 Signal {
1720 Signal {
1721 name: "axisYRightChanged"
1721 name: "axisYRightChanged"
1722 revision: 2
1722 revision: 2
1723 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1723 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1724 }
1724 }
1725 Signal {
1725 Signal {
1726 name: "axisAngularChanged"
1726 name: "axisAngularChanged"
1727 revision: 3
1727 revision: 3
1728 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1728 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1729 }
1729 }
1730 Signal {
1730 Signal {
1731 name: "axisRadialChanged"
1731 name: "axisRadialChanged"
1732 revision: 3
1732 revision: 3
1733 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1733 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1734 }
1734 }
1735 Signal {
1735 Signal {
1736 name: "brushFilenameChanged"
1736 name: "brushFilenameChanged"
1737 revision: 4
1737 revision: 4
1738 Parameter { name: "brushFilename"; type: "string" }
1738 Parameter { name: "brushFilename"; type: "string" }
1739 }
1739 }
1740 Signal { name: "brushChanged"; revision: 4 }
1740 Signal { name: "brushChanged"; revision: 4 }
1741 Method {
1741 Method {
1742 name: "appendDeclarativeChildren"
1742 name: "appendDeclarativeChildren"
1743 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1743 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1744 Parameter { name: "element"; type: "QObject"; isPointer: true }
1744 Parameter { name: "element"; type: "QObject"; isPointer: true }
1745 }
1745 }
1746 Method {
1746 Method {
1747 name: "handleCountChanged"
1747 name: "handleCountChanged"
1748 Parameter { name: "index"; type: "int" }
1748 Parameter { name: "index"; type: "int" }
1749 }
1749 }
1750 Method {
1750 Method {
1751 name: "append"
1751 name: "append"
1752 Parameter { name: "x"; type: "double" }
1752 Parameter { name: "x"; type: "double" }
1753 Parameter { name: "y"; type: "double" }
1753 Parameter { name: "y"; type: "double" }
1754 }
1754 }
1755 Method {
1755 Method {
1756 name: "replace"
1756 name: "replace"
1757 Parameter { name: "oldX"; type: "double" }
1757 Parameter { name: "oldX"; type: "double" }
1758 Parameter { name: "oldY"; type: "double" }
1758 Parameter { name: "oldY"; type: "double" }
1759 Parameter { name: "newX"; type: "double" }
1759 Parameter { name: "newX"; type: "double" }
1760 Parameter { name: "newY"; type: "double" }
1760 Parameter { name: "newY"; type: "double" }
1761 }
1761 }
1762 Method {
1762 Method {
1763 name: "replace"
1763 name: "replace"
1764 revision: 3
1764 revision: 3
1765 Parameter { name: "index"; type: "int" }
1765 Parameter { name: "index"; type: "int" }
1766 Parameter { name: "newX"; type: "double" }
1766 Parameter { name: "newX"; type: "double" }
1767 Parameter { name: "newY"; type: "double" }
1767 Parameter { name: "newY"; type: "double" }
1768 }
1768 }
1769 Method {
1769 Method {
1770 name: "remove"
1770 name: "remove"
1771 Parameter { name: "x"; type: "double" }
1771 Parameter { name: "x"; type: "double" }
1772 Parameter { name: "y"; type: "double" }
1772 Parameter { name: "y"; type: "double" }
1773 }
1773 }
1774 Method {
1774 Method {
1775 name: "remove"
1775 name: "remove"
1776 revision: 3
1776 revision: 3
1777 Parameter { name: "index"; type: "int" }
1777 Parameter { name: "index"; type: "int" }
1778 }
1778 }
1779 Method {
1779 Method {
1780 name: "removePoints"
1780 name: "removePoints"
1781 revision: 5
1781 revision: 5
1782 Parameter { name: "index"; type: "int" }
1782 Parameter { name: "index"; type: "int" }
1783 Parameter { name: "count"; type: "int" }
1783 Parameter { name: "count"; type: "int" }
1784 }
1784 }
1785 Method {
1785 Method {
1786 name: "insert"
1786 name: "insert"
1787 Parameter { name: "index"; type: "int" }
1787 Parameter { name: "index"; type: "int" }
1788 Parameter { name: "x"; type: "double" }
1788 Parameter { name: "x"; type: "double" }
1789 Parameter { name: "y"; type: "double" }
1789 Parameter { name: "y"; type: "double" }
1790 }
1790 }
1791 Method { name: "clear" }
1791 Method { name: "clear" }
1792 Method {
1792 Method {
1793 name: "at"
1793 name: "at"
1794 type: "QPointF"
1794 type: "QPointF"
1795 Parameter { name: "index"; type: "int" }
1795 Parameter { name: "index"; type: "int" }
1796 }
1796 }
1797 }
1797 }
1798 Component {
1798 Component {
1799 name: "QtCharts::DeclarativeSplineSeries"
1799 name: "QtCharts::DeclarativeSplineSeries"
1800 defaultProperty: "declarativeChildren"
1800 defaultProperty: "declarativeChildren"
1801 prototype: "QtCharts::QSplineSeries"
1801 prototype: "QtCharts::QSplineSeries"
1802 exports: [
1802 exports: [
1803 "QtCharts/SplineSeries 1.0",
1803 "QtCharts/SplineSeries 1.0",
1804 "QtCharts/SplineSeries 1.1",
1804 "QtCharts/SplineSeries 1.1",
1805 "QtCharts/SplineSeries 1.2",
1805 "QtCharts/SplineSeries 1.2",
1806 "QtCharts/SplineSeries 1.3",
1806 "QtCharts/SplineSeries 1.3",
1807 "QtCharts/SplineSeries 2.0",
1807 "QtCharts/SplineSeries 2.0",
1808 "QtCharts/SplineSeries 2.1"
1808 "QtCharts/SplineSeries 2.1"
1809 ]
1809 ]
1810 exportMetaObjectRevisions: [0, 1, 2, 3, 3, 4]
1810 exportMetaObjectRevisions: [0, 1, 2, 3, 3, 4]
1811 Property { name: "count"; type: "int"; isReadonly: true }
1811 Property { name: "count"; type: "int"; isReadonly: true }
1812 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1812 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1813 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1813 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1814 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1814 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1815 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1815 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1816 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1816 Property { name: "axisAngular"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1817 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1817 Property { name: "axisRadial"; revision: 3; type: "QAbstractAxis"; isPointer: true }
1818 Property { name: "width"; revision: 1; type: "double" }
1818 Property { name: "width"; revision: 1; type: "double" }
1819 Property { name: "style"; revision: 1; type: "Qt::PenStyle" }
1819 Property { name: "style"; revision: 1; type: "Qt::PenStyle" }
1820 Property { name: "capStyle"; revision: 1; type: "Qt::PenCapStyle" }
1820 Property { name: "capStyle"; revision: 1; type: "Qt::PenCapStyle" }
1821 Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true }
1821 Property { name: "declarativeChildren"; type: "QObject"; isList: true; isReadonly: true }
1822 Signal {
1822 Signal {
1823 name: "countChanged"
1823 name: "countChanged"
1824 Parameter { name: "count"; type: "int" }
1824 Parameter { name: "count"; type: "int" }
1825 }
1825 }
1826 Signal {
1826 Signal {
1827 name: "axisXChanged"
1827 name: "axisXChanged"
1828 revision: 1
1828 revision: 1
1829 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1829 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1830 }
1830 }
1831 Signal {
1831 Signal {
1832 name: "axisYChanged"
1832 name: "axisYChanged"
1833 revision: 1
1833 revision: 1
1834 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1834 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1835 }
1835 }
1836 Signal {
1836 Signal {
1837 name: "axisXTopChanged"
1837 name: "axisXTopChanged"
1838 revision: 2
1838 revision: 2
1839 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1839 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1840 }
1840 }
1841 Signal {
1841 Signal {
1842 name: "axisYRightChanged"
1842 name: "axisYRightChanged"
1843 revision: 2
1843 revision: 2
1844 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1844 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1845 }
1845 }
1846 Signal {
1846 Signal {
1847 name: "axisAngularChanged"
1847 name: "axisAngularChanged"
1848 revision: 3
1848 revision: 3
1849 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1849 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1850 }
1850 }
1851 Signal {
1851 Signal {
1852 name: "axisRadialChanged"
1852 name: "axisRadialChanged"
1853 revision: 3
1853 revision: 3
1854 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1854 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1855 }
1855 }
1856 Signal {
1856 Signal {
1857 name: "widthChanged"
1857 name: "widthChanged"
1858 revision: 1
1858 revision: 1
1859 Parameter { name: "width"; type: "double" }
1859 Parameter { name: "width"; type: "double" }
1860 }
1860 }
1861 Signal {
1861 Signal {
1862 name: "styleChanged"
1862 name: "styleChanged"
1863 revision: 1
1863 revision: 1
1864 Parameter { name: "style"; type: "Qt::PenStyle" }
1864 Parameter { name: "style"; type: "Qt::PenStyle" }
1865 }
1865 }
1866 Signal {
1866 Signal {
1867 name: "capStyleChanged"
1867 name: "capStyleChanged"
1868 revision: 1
1868 revision: 1
1869 Parameter { name: "capStyle"; type: "Qt::PenCapStyle" }
1869 Parameter { name: "capStyle"; type: "Qt::PenCapStyle" }
1870 }
1870 }
1871 Method {
1871 Method {
1872 name: "appendDeclarativeChildren"
1872 name: "appendDeclarativeChildren"
1873 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1873 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1874 Parameter { name: "element"; type: "QObject"; isPointer: true }
1874 Parameter { name: "element"; type: "QObject"; isPointer: true }
1875 }
1875 }
1876 Method {
1876 Method {
1877 name: "handleCountChanged"
1877 name: "handleCountChanged"
1878 Parameter { name: "index"; type: "int" }
1878 Parameter { name: "index"; type: "int" }
1879 }
1879 }
1880 Method {
1880 Method {
1881 name: "append"
1881 name: "append"
1882 Parameter { name: "x"; type: "double" }
1882 Parameter { name: "x"; type: "double" }
1883 Parameter { name: "y"; type: "double" }
1883 Parameter { name: "y"; type: "double" }
1884 }
1884 }
1885 Method {
1885 Method {
1886 name: "replace"
1886 name: "replace"
1887 Parameter { name: "oldX"; type: "double" }
1887 Parameter { name: "oldX"; type: "double" }
1888 Parameter { name: "oldY"; type: "double" }
1888 Parameter { name: "oldY"; type: "double" }
1889 Parameter { name: "newX"; type: "double" }
1889 Parameter { name: "newX"; type: "double" }
1890 Parameter { name: "newY"; type: "double" }
1890 Parameter { name: "newY"; type: "double" }
1891 }
1891 }
1892 Method {
1892 Method {
1893 name: "replace"
1893 name: "replace"
1894 revision: 3
1894 revision: 3
1895 Parameter { name: "index"; type: "int" }
1895 Parameter { name: "index"; type: "int" }
1896 Parameter { name: "newX"; type: "double" }
1896 Parameter { name: "newX"; type: "double" }
1897 Parameter { name: "newY"; type: "double" }
1897 Parameter { name: "newY"; type: "double" }
1898 }
1898 }
1899 Method {
1899 Method {
1900 name: "remove"
1900 name: "remove"
1901 Parameter { name: "x"; type: "double" }
1901 Parameter { name: "x"; type: "double" }
1902 Parameter { name: "y"; type: "double" }
1902 Parameter { name: "y"; type: "double" }
1903 }
1903 }
1904 Method {
1904 Method {
1905 name: "remove"
1905 name: "remove"
1906 revision: 3
1906 revision: 3
1907 Parameter { name: "index"; type: "int" }
1907 Parameter { name: "index"; type: "int" }
1908 }
1908 }
1909 Method {
1909 Method {
1910 name: "removePoints"
1910 name: "removePoints"
1911 revision: 4
1911 revision: 4
1912 Parameter { name: "index"; type: "int" }
1912 Parameter { name: "index"; type: "int" }
1913 Parameter { name: "count"; type: "int" }
1913 Parameter { name: "count"; type: "int" }
1914 }
1914 }
1915 Method {
1915 Method {
1916 name: "insert"
1916 name: "insert"
1917 Parameter { name: "index"; type: "int" }
1917 Parameter { name: "index"; type: "int" }
1918 Parameter { name: "x"; type: "double" }
1918 Parameter { name: "x"; type: "double" }
1919 Parameter { name: "y"; type: "double" }
1919 Parameter { name: "y"; type: "double" }
1920 }
1920 }
1921 Method { name: "clear" }
1921 Method { name: "clear" }
1922 Method {
1922 Method {
1923 name: "at"
1923 name: "at"
1924 type: "QPointF"
1924 type: "QPointF"
1925 Parameter { name: "index"; type: "int" }
1925 Parameter { name: "index"; type: "int" }
1926 }
1926 }
1927 }
1927 }
1928 Component {
1928 Component {
1929 name: "QtCharts::DeclarativeStackedBarSeries"
1929 name: "QtCharts::DeclarativeStackedBarSeries"
1930 defaultProperty: "seriesChildren"
1930 defaultProperty: "seriesChildren"
1931 prototype: "QtCharts::QStackedBarSeries"
1931 prototype: "QtCharts::QStackedBarSeries"
1932 exports: [
1932 exports: [
1933 "QtCharts/StackedBarSeries 1.0",
1933 "QtCharts/StackedBarSeries 1.0",
1934 "QtCharts/StackedBarSeries 1.1",
1934 "QtCharts/StackedBarSeries 1.1",
1935 "QtCharts/StackedBarSeries 1.2",
1935 "QtCharts/StackedBarSeries 1.2",
1936 "QtCharts/StackedBarSeries 2.0"
1936 "QtCharts/StackedBarSeries 2.0"
1937 ]
1937 ]
1938 exportMetaObjectRevisions: [0, 1, 2, 2]
1938 exportMetaObjectRevisions: [0, 1, 2, 2]
1939 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1939 Property { name: "axisX"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1940 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1940 Property { name: "axisY"; revision: 1; type: "QAbstractAxis"; isPointer: true }
1941 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1941 Property { name: "axisXTop"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1942 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1942 Property { name: "axisYRight"; revision: 2; type: "QAbstractAxis"; isPointer: true }
1943 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1943 Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
1944 Signal {
1944 Signal {
1945 name: "axisXChanged"
1945 name: "axisXChanged"
1946 revision: 1
1946 revision: 1
1947 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1947 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1948 }
1948 }
1949 Signal {
1949 Signal {
1950 name: "axisYChanged"
1950 name: "axisYChanged"
1951 revision: 1
1951 revision: 1
1952 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1952 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1953 }
1953 }
1954 Signal {
1954 Signal {
1955 name: "axisXTopChanged"
1955 name: "axisXTopChanged"
1956 revision: 2
1956 revision: 2
1957 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1957 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1958 }
1958 }
1959 Signal {
1959 Signal {
1960 name: "axisYRightChanged"
1960 name: "axisYRightChanged"
1961 revision: 2
1961 revision: 2
1962 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1962 Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true }
1963 }
1963 }
1964 Method {
1964 Method {
1965 name: "appendSeriesChildren"
1965 name: "appendSeriesChildren"
1966 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1966 Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
1967 Parameter { name: "element"; type: "QObject"; isPointer: true }
1967 Parameter { name: "element"; type: "QObject"; isPointer: true }
1968 }
1968 }
1969 Method {
1969 Method {
1970 name: "at"
1970 name: "at"
1971 type: "DeclarativeBarSet*"
1971 type: "DeclarativeBarSet*"
1972 Parameter { name: "index"; type: "int" }
1972 Parameter { name: "index"; type: "int" }
1973 }
1973 }
1974 Method {
1974 Method {
1975 name: "append"
1975 name: "append"
1976 type: "DeclarativeBarSet*"
1976 type: "DeclarativeBarSet*"
1977 Parameter { name: "label"; type: "string" }
1977 Parameter { name: "label"; type: "string" }
1978 Parameter { name: "values"; type: "QVariantList" }
1978 Parameter { name: "values"; type: "QVariantList" }
1979 }
1979 }
1980 Method {
1980 Method {
1981 name: "insert"
1981 name: "insert"
1982 type: "DeclarativeBarSet*"
1982 type: "DeclarativeBarSet*"
1983 Parameter { name: "index"; type: "int" }
1983 Parameter { name: "index"; type: "int" }
1984 Parameter { name: "label"; type: "string" }
1984 Parameter { name: "label"; type: "string" }
1985 Parameter { name: "values"; type: "QVariantList" }
1985 Parameter { name: "values"; type: "QVariantList" }
1986 }
1986 }
1987 Method {
1987 Method {
1988 name: "remove"
1988 name: "remove"
1989 type: "bool"
1989 type: "bool"
1990 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1990 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
1991 }
1991 }
1992 Method { name: "clear" }
1992 Method { name: "clear" }
1993 }
1993 }
1994 Component {
1994 Component {
1995 name: "QtCharts::DeclarativeXYPoint"
1995 name: "QtCharts::DeclarativeXYPoint"
1996 prototype: "QObject"
1996 prototype: "QObject"
1997 exports: ["QtCharts/XYPoint 1.0", "QtCharts/XYPoint 2.0"]
1997 exports: ["QtCharts/XYPoint 1.0", "QtCharts/XYPoint 2.0"]
1998 exportMetaObjectRevisions: [0, 0]
1998 exportMetaObjectRevisions: [0, 0]
1999 Property { name: "x"; type: "double" }
1999 Property { name: "x"; type: "double" }
2000 Property { name: "y"; type: "double" }
2000 Property { name: "y"; type: "double" }
2001 }
2001 }
2002 Component {
2002 Component {
2003 name: "QtCharts::LegendScroller"
2003 name: "QtCharts::LegendScroller"
2004 defaultProperty: "children"
2004 defaultProperty: "children"
2005 prototype: "QtCharts::QLegend"
2005 prototype: "QtCharts::QLegend"
2006 }
2006 }
2007 Component {
2007 Component {
2008 name: "QtCharts::QAbstractAxis"
2008 name: "QtCharts::QAbstractAxis"
2009 prototype: "QObject"
2009 prototype: "QObject"
2010 exports: [
2010 exports: [
2011 "QtCharts/AbstractAxis 1.0",
2011 "QtCharts/AbstractAxis 1.0",
2012 "QtCharts/AbstractAxis 2.0",
2012 "QtCharts/AbstractAxis 2.0",
2013 "QtCharts/AbstractAxis 2.1"
2013 "QtCharts/AbstractAxis 2.1"
2014 ]
2014 ]
2015 isCreatable: false
2015 isCreatable: false
2016 exportMetaObjectRevisions: [0, 0, 0]
2016 exportMetaObjectRevisions: [0, 0, 0]
2017 Property { name: "visible"; type: "bool" }
2017 Property { name: "visible"; type: "bool" }
2018 Property { name: "lineVisible"; type: "bool" }
2018 Property { name: "lineVisible"; type: "bool" }
2019 Property { name: "linePen"; type: "QPen" }
2019 Property { name: "linePen"; type: "QPen" }
2020 Property { name: "color"; type: "QColor" }
2020 Property { name: "color"; type: "QColor" }
2021 Property { name: "labelsVisible"; type: "bool" }
2021 Property { name: "labelsVisible"; type: "bool" }
2022 Property { name: "labelsBrush"; type: "QBrush" }
2022 Property { name: "labelsBrush"; type: "QBrush" }
2023 Property { name: "labelsAngle"; type: "int" }
2023 Property { name: "labelsAngle"; type: "int" }
2024 Property { name: "labelsFont"; type: "QFont" }
2024 Property { name: "labelsFont"; type: "QFont" }
2025 Property { name: "labelsColor"; type: "QColor" }
2025 Property { name: "labelsColor"; type: "QColor" }
2026 Property { name: "gridVisible"; type: "bool" }
2026 Property { name: "gridVisible"; type: "bool" }
2027 Property { name: "gridLinePen"; type: "QPen" }
2027 Property { name: "gridLinePen"; type: "QPen" }
2028 Property { name: "minorGridVisible"; type: "bool" }
2028 Property { name: "minorGridVisible"; type: "bool" }
2029 Property { name: "minorGridLinePen"; type: "QPen" }
2029 Property { name: "minorGridLinePen"; type: "QPen" }
2030 Property { name: "gridLineColor"; type: "QColor" }
2031 Property { name: "minorGridLineColor"; type: "QColor" }
2030 Property { name: "shadesVisible"; type: "bool" }
2032 Property { name: "shadesVisible"; type: "bool" }
2031 Property { name: "shadesColor"; type: "QColor" }
2033 Property { name: "shadesColor"; type: "QColor" }
2032 Property { name: "shadesBorderColor"; type: "QColor" }
2034 Property { name: "shadesBorderColor"; type: "QColor" }
2033 Property { name: "shadesPen"; type: "QPen" }
2035 Property { name: "shadesPen"; type: "QPen" }
2034 Property { name: "shadesBrush"; type: "QBrush" }
2036 Property { name: "shadesBrush"; type: "QBrush" }
2035 Property { name: "titleText"; type: "string" }
2037 Property { name: "titleText"; type: "string" }
2036 Property { name: "titleBrush"; type: "QBrush" }
2038 Property { name: "titleBrush"; type: "QBrush" }
2037 Property { name: "titleVisible"; type: "bool" }
2039 Property { name: "titleVisible"; type: "bool" }
2038 Property { name: "titleFont"; type: "QFont" }
2040 Property { name: "titleFont"; type: "QFont" }
2039 Property { name: "orientation"; type: "Qt::Orientation"; isReadonly: true }
2041 Property { name: "orientation"; type: "Qt::Orientation"; isReadonly: true }
2040 Property { name: "alignment"; type: "Qt::Alignment"; isReadonly: true }
2042 Property { name: "alignment"; type: "Qt::Alignment"; isReadonly: true }
2041 Property { name: "reverse"; type: "bool" }
2043 Property { name: "reverse"; type: "bool" }
2042 Signal {
2044 Signal {
2043 name: "visibleChanged"
2045 name: "visibleChanged"
2044 Parameter { name: "visible"; type: "bool" }
2046 Parameter { name: "visible"; type: "bool" }
2045 }
2047 }
2046 Signal {
2048 Signal {
2047 name: "linePenChanged"
2049 name: "linePenChanged"
2048 Parameter { name: "pen"; type: "QPen" }
2050 Parameter { name: "pen"; type: "QPen" }
2049 }
2051 }
2050 Signal {
2052 Signal {
2051 name: "lineVisibleChanged"
2053 name: "lineVisibleChanged"
2052 Parameter { name: "visible"; type: "bool" }
2054 Parameter { name: "visible"; type: "bool" }
2053 }
2055 }
2054 Signal {
2056 Signal {
2055 name: "labelsVisibleChanged"
2057 name: "labelsVisibleChanged"
2056 Parameter { name: "visible"; type: "bool" }
2058 Parameter { name: "visible"; type: "bool" }
2057 }
2059 }
2058 Signal {
2060 Signal {
2059 name: "labelsBrushChanged"
2061 name: "labelsBrushChanged"
2060 Parameter { name: "brush"; type: "QBrush" }
2062 Parameter { name: "brush"; type: "QBrush" }
2061 }
2063 }
2062 Signal {
2064 Signal {
2063 name: "labelsFontChanged"
2065 name: "labelsFontChanged"
2064 Parameter { name: "pen"; type: "QFont" }
2066 Parameter { name: "pen"; type: "QFont" }
2065 }
2067 }
2066 Signal {
2068 Signal {
2067 name: "labelsAngleChanged"
2069 name: "labelsAngleChanged"
2068 Parameter { name: "angle"; type: "int" }
2070 Parameter { name: "angle"; type: "int" }
2069 }
2071 }
2070 Signal {
2072 Signal {
2071 name: "gridLinePenChanged"
2073 name: "gridLinePenChanged"
2072 Parameter { name: "pen"; type: "QPen" }
2074 Parameter { name: "pen"; type: "QPen" }
2073 }
2075 }
2074 Signal {
2076 Signal {
2075 name: "gridVisibleChanged"
2077 name: "gridVisibleChanged"
2076 Parameter { name: "visible"; type: "bool" }
2078 Parameter { name: "visible"; type: "bool" }
2077 }
2079 }
2078 Signal {
2080 Signal {
2079 name: "minorGridVisibleChanged"
2081 name: "minorGridVisibleChanged"
2080 Parameter { name: "visible"; type: "bool" }
2082 Parameter { name: "visible"; type: "bool" }
2081 }
2083 }
2082 Signal {
2084 Signal {
2083 name: "minorGridLinePenChanged"
2085 name: "minorGridLinePenChanged"
2084 Parameter { name: "pen"; type: "QPen" }
2086 Parameter { name: "pen"; type: "QPen" }
2085 }
2087 }
2086 Signal {
2088 Signal {
2089 name: "gridLineColorChanged"
2090 Parameter { name: "color"; type: "QColor" }
2091 }
2092 Signal {
2093 name: "minorGridLineColorChanged"
2094 Parameter { name: "color"; type: "QColor" }
2095 }
2096 Signal {
2087 name: "colorChanged"
2097 name: "colorChanged"
2088 Parameter { name: "color"; type: "QColor" }
2098 Parameter { name: "color"; type: "QColor" }
2089 }
2099 }
2090 Signal {
2100 Signal {
2091 name: "labelsColorChanged"
2101 name: "labelsColorChanged"
2092 Parameter { name: "color"; type: "QColor" }
2102 Parameter { name: "color"; type: "QColor" }
2093 }
2103 }
2094 Signal {
2104 Signal {
2095 name: "titleTextChanged"
2105 name: "titleTextChanged"
2096 Parameter { name: "title"; type: "string" }
2106 Parameter { name: "title"; type: "string" }
2097 }
2107 }
2098 Signal {
2108 Signal {
2099 name: "titleBrushChanged"
2109 name: "titleBrushChanged"
2100 Parameter { name: "brush"; type: "QBrush" }
2110 Parameter { name: "brush"; type: "QBrush" }
2101 }
2111 }
2102 Signal {
2112 Signal {
2103 name: "titleVisibleChanged"
2113 name: "titleVisibleChanged"
2104 Parameter { name: "visible"; type: "bool" }
2114 Parameter { name: "visible"; type: "bool" }
2105 }
2115 }
2106 Signal {
2116 Signal {
2107 name: "titleFontChanged"
2117 name: "titleFontChanged"
2108 Parameter { name: "font"; type: "QFont" }
2118 Parameter { name: "font"; type: "QFont" }
2109 }
2119 }
2110 Signal {
2120 Signal {
2111 name: "shadesVisibleChanged"
2121 name: "shadesVisibleChanged"
2112 Parameter { name: "visible"; type: "bool" }
2122 Parameter { name: "visible"; type: "bool" }
2113 }
2123 }
2114 Signal {
2124 Signal {
2115 name: "shadesColorChanged"
2125 name: "shadesColorChanged"
2116 Parameter { name: "color"; type: "QColor" }
2126 Parameter { name: "color"; type: "QColor" }
2117 }
2127 }
2118 Signal {
2128 Signal {
2119 name: "shadesBorderColorChanged"
2129 name: "shadesBorderColorChanged"
2120 Parameter { name: "color"; type: "QColor" }
2130 Parameter { name: "color"; type: "QColor" }
2121 }
2131 }
2122 Signal {
2132 Signal {
2123 name: "shadesPenChanged"
2133 name: "shadesPenChanged"
2124 Parameter { name: "pen"; type: "QPen" }
2134 Parameter { name: "pen"; type: "QPen" }
2125 }
2135 }
2126 Signal {
2136 Signal {
2127 name: "shadesBrushChanged"
2137 name: "shadesBrushChanged"
2128 Parameter { name: "brush"; type: "QBrush" }
2138 Parameter { name: "brush"; type: "QBrush" }
2129 }
2139 }
2130 Signal {
2140 Signal {
2131 name: "reverseChanged"
2141 name: "reverseChanged"
2132 Parameter { name: "reverse"; type: "bool" }
2142 Parameter { name: "reverse"; type: "bool" }
2133 }
2143 }
2134 }
2144 }
2135 Component {
2145 Component {
2136 name: "QtCharts::QAbstractBarSeries"
2146 name: "QtCharts::QAbstractBarSeries"
2137 prototype: "QtCharts::QAbstractSeries"
2147 prototype: "QtCharts::QAbstractSeries"
2138 exports: [
2148 exports: [
2139 "QtCharts/AbstractBarSeries 1.0",
2149 "QtCharts/AbstractBarSeries 1.0",
2140 "QtCharts/AbstractBarSeries 2.0"
2150 "QtCharts/AbstractBarSeries 2.0"
2141 ]
2151 ]
2142 isCreatable: false
2152 isCreatable: false
2143 exportMetaObjectRevisions: [0, 0]
2153 exportMetaObjectRevisions: [0, 0]
2144 Enum {
2154 Enum {
2145 name: "LabelsPosition"
2155 name: "LabelsPosition"
2146 values: {
2156 values: {
2147 "LabelsCenter": 0,
2157 "LabelsCenter": 0,
2148 "LabelsInsideEnd": 1,
2158 "LabelsInsideEnd": 1,
2149 "LabelsInsideBase": 2,
2159 "LabelsInsideBase": 2,
2150 "LabelsOutsideEnd": 3
2160 "LabelsOutsideEnd": 3
2151 }
2161 }
2152 }
2162 }
2153 Property { name: "barWidth"; type: "double" }
2163 Property { name: "barWidth"; type: "double" }
2154 Property { name: "count"; type: "int"; isReadonly: true }
2164 Property { name: "count"; type: "int"; isReadonly: true }
2155 Property { name: "labelsVisible"; type: "bool" }
2165 Property { name: "labelsVisible"; type: "bool" }
2156 Property { name: "labelsFormat"; type: "string" }
2166 Property { name: "labelsFormat"; type: "string" }
2157 Property { name: "labelsPosition"; type: "LabelsPosition" }
2167 Property { name: "labelsPosition"; type: "LabelsPosition" }
2158 Property { name: "labelsAngle"; type: "double" }
2168 Property { name: "labelsAngle"; type: "double" }
2159 Signal {
2169 Signal {
2160 name: "clicked"
2170 name: "clicked"
2161 Parameter { name: "index"; type: "int" }
2171 Parameter { name: "index"; type: "int" }
2162 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2172 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2163 }
2173 }
2164 Signal {
2174 Signal {
2165 name: "hovered"
2175 name: "hovered"
2166 Parameter { name: "status"; type: "bool" }
2176 Parameter { name: "status"; type: "bool" }
2167 Parameter { name: "index"; type: "int" }
2177 Parameter { name: "index"; type: "int" }
2168 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2178 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2169 }
2179 }
2170 Signal {
2180 Signal {
2171 name: "pressed"
2181 name: "pressed"
2172 Parameter { name: "index"; type: "int" }
2182 Parameter { name: "index"; type: "int" }
2173 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2183 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2174 }
2184 }
2175 Signal {
2185 Signal {
2176 name: "released"
2186 name: "released"
2177 Parameter { name: "index"; type: "int" }
2187 Parameter { name: "index"; type: "int" }
2178 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2188 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2179 }
2189 }
2180 Signal {
2190 Signal {
2181 name: "doubleClicked"
2191 name: "doubleClicked"
2182 Parameter { name: "index"; type: "int" }
2192 Parameter { name: "index"; type: "int" }
2183 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2193 Parameter { name: "barset"; type: "QBarSet"; isPointer: true }
2184 }
2194 }
2185 Signal {
2195 Signal {
2186 name: "labelsFormatChanged"
2196 name: "labelsFormatChanged"
2187 Parameter { name: "format"; type: "string" }
2197 Parameter { name: "format"; type: "string" }
2188 }
2198 }
2189 Signal {
2199 Signal {
2190 name: "labelsPositionChanged"
2200 name: "labelsPositionChanged"
2191 Parameter { name: "position"; type: "QAbstractBarSeries::LabelsPosition" }
2201 Parameter { name: "position"; type: "QAbstractBarSeries::LabelsPosition" }
2192 }
2202 }
2193 Signal {
2203 Signal {
2194 name: "labelsAngleChanged"
2204 name: "labelsAngleChanged"
2195 Parameter { name: "angle"; type: "double" }
2205 Parameter { name: "angle"; type: "double" }
2196 }
2206 }
2197 Signal {
2207 Signal {
2198 name: "barsetsAdded"
2208 name: "barsetsAdded"
2199 Parameter { name: "sets"; type: "QList<QBarSet*>" }
2209 Parameter { name: "sets"; type: "QList<QBarSet*>" }
2200 }
2210 }
2201 Signal {
2211 Signal {
2202 name: "barsetsRemoved"
2212 name: "barsetsRemoved"
2203 Parameter { name: "sets"; type: "QList<QBarSet*>" }
2213 Parameter { name: "sets"; type: "QList<QBarSet*>" }
2204 }
2214 }
2205 }
2215 }
2206 Component {
2216 Component {
2207 name: "QtCharts::QAbstractSeries"
2217 name: "QtCharts::QAbstractSeries"
2208 prototype: "QObject"
2218 prototype: "QObject"
2209 exports: [
2219 exports: [
2210 "QtCharts/AbstractSeries 1.0",
2220 "QtCharts/AbstractSeries 1.0",
2211 "QtCharts/AbstractSeries 2.0"
2221 "QtCharts/AbstractSeries 2.0"
2212 ]
2222 ]
2213 isCreatable: false
2223 isCreatable: false
2214 exportMetaObjectRevisions: [0, 0]
2224 exportMetaObjectRevisions: [0, 0]
2215 Enum {
2225 Enum {
2216 name: "SeriesType"
2226 name: "SeriesType"
2217 values: {
2227 values: {
2218 "SeriesTypeLine": 0,
2228 "SeriesTypeLine": 0,
2219 "SeriesTypeArea": 1,
2229 "SeriesTypeArea": 1,
2220 "SeriesTypeBar": 2,
2230 "SeriesTypeBar": 2,
2221 "SeriesTypeStackedBar": 3,
2231 "SeriesTypeStackedBar": 3,
2222 "SeriesTypePercentBar": 4,
2232 "SeriesTypePercentBar": 4,
2223 "SeriesTypePie": 5,
2233 "SeriesTypePie": 5,
2224 "SeriesTypeScatter": 6,
2234 "SeriesTypeScatter": 6,
2225 "SeriesTypeSpline": 7,
2235 "SeriesTypeSpline": 7,
2226 "SeriesTypeHorizontalBar": 8,
2236 "SeriesTypeHorizontalBar": 8,
2227 "SeriesTypeHorizontalStackedBar": 9,
2237 "SeriesTypeHorizontalStackedBar": 9,
2228 "SeriesTypeHorizontalPercentBar": 10,
2238 "SeriesTypeHorizontalPercentBar": 10,
2229 "SeriesTypeBoxPlot": 11
2239 "SeriesTypeBoxPlot": 11
2230 }
2240 }
2231 }
2241 }
2232 Property { name: "name"; type: "string" }
2242 Property { name: "name"; type: "string" }
2233 Property { name: "visible"; type: "bool" }
2243 Property { name: "visible"; type: "bool" }
2234 Property { name: "opacity"; type: "double" }
2244 Property { name: "opacity"; type: "double" }
2235 Property { name: "type"; type: "SeriesType"; isReadonly: true }
2245 Property { name: "type"; type: "SeriesType"; isReadonly: true }
2236 }
2246 }
2237 Component {
2247 Component {
2238 name: "QtCharts::QAreaSeries"
2248 name: "QtCharts::QAreaSeries"
2239 prototype: "QtCharts::QAbstractSeries"
2249 prototype: "QtCharts::QAbstractSeries"
2240 Property { name: "upperSeries"; type: "QLineSeries"; isReadonly: true; isPointer: true }
2250 Property { name: "upperSeries"; type: "QLineSeries"; isReadonly: true; isPointer: true }
2241 Property { name: "lowerSeries"; type: "QLineSeries"; isReadonly: true; isPointer: true }
2251 Property { name: "lowerSeries"; type: "QLineSeries"; isReadonly: true; isPointer: true }
2242 Property { name: "color"; type: "QColor" }
2252 Property { name: "color"; type: "QColor" }
2243 Property { name: "borderColor"; type: "QColor" }
2253 Property { name: "borderColor"; type: "QColor" }
2244 Property { name: "pointLabelsFormat"; type: "string" }
2254 Property { name: "pointLabelsFormat"; type: "string" }
2245 Property { name: "pointLabelsVisible"; type: "bool" }
2255 Property { name: "pointLabelsVisible"; type: "bool" }
2246 Property { name: "pointLabelsFont"; type: "QFont" }
2256 Property { name: "pointLabelsFont"; type: "QFont" }
2247 Property { name: "pointLabelsColor"; type: "QColor" }
2257 Property { name: "pointLabelsColor"; type: "QColor" }
2248 Signal {
2258 Signal {
2249 name: "clicked"
2259 name: "clicked"
2250 Parameter { name: "point"; type: "QPointF" }
2260 Parameter { name: "point"; type: "QPointF" }
2251 }
2261 }
2252 Signal {
2262 Signal {
2253 name: "hovered"
2263 name: "hovered"
2254 Parameter { name: "point"; type: "QPointF" }
2264 Parameter { name: "point"; type: "QPointF" }
2255 Parameter { name: "state"; type: "bool" }
2265 Parameter { name: "state"; type: "bool" }
2256 }
2266 }
2257 Signal {
2267 Signal {
2258 name: "pressed"
2268 name: "pressed"
2259 Parameter { name: "point"; type: "QPointF" }
2269 Parameter { name: "point"; type: "QPointF" }
2260 }
2270 }
2261 Signal {
2271 Signal {
2262 name: "released"
2272 name: "released"
2263 Parameter { name: "point"; type: "QPointF" }
2273 Parameter { name: "point"; type: "QPointF" }
2264 }
2274 }
2265 Signal {
2275 Signal {
2266 name: "doubleClicked"
2276 name: "doubleClicked"
2267 Parameter { name: "point"; type: "QPointF" }
2277 Parameter { name: "point"; type: "QPointF" }
2268 }
2278 }
2269 Signal { name: "selected" }
2279 Signal { name: "selected" }
2270 Signal {
2280 Signal {
2271 name: "colorChanged"
2281 name: "colorChanged"
2272 Parameter { name: "color"; type: "QColor" }
2282 Parameter { name: "color"; type: "QColor" }
2273 }
2283 }
2274 Signal {
2284 Signal {
2275 name: "borderColorChanged"
2285 name: "borderColorChanged"
2276 Parameter { name: "color"; type: "QColor" }
2286 Parameter { name: "color"; type: "QColor" }
2277 }
2287 }
2278 Signal {
2288 Signal {
2279 name: "pointLabelsFormatChanged"
2289 name: "pointLabelsFormatChanged"
2280 Parameter { name: "format"; type: "string" }
2290 Parameter { name: "format"; type: "string" }
2281 }
2291 }
2282 Signal {
2292 Signal {
2283 name: "pointLabelsVisibilityChanged"
2293 name: "pointLabelsVisibilityChanged"
2284 Parameter { name: "visible"; type: "bool" }
2294 Parameter { name: "visible"; type: "bool" }
2285 }
2295 }
2286 Signal {
2296 Signal {
2287 name: "pointLabelsFontChanged"
2297 name: "pointLabelsFontChanged"
2288 Parameter { name: "font"; type: "QFont" }
2298 Parameter { name: "font"; type: "QFont" }
2289 }
2299 }
2290 Signal {
2300 Signal {
2291 name: "pointLabelsColorChanged"
2301 name: "pointLabelsColorChanged"
2292 Parameter { name: "color"; type: "QColor" }
2302 Parameter { name: "color"; type: "QColor" }
2293 }
2303 }
2294 }
2304 }
2295 Component {
2305 Component {
2296 name: "QtCharts::QBarCategoryAxis"
2306 name: "QtCharts::QBarCategoryAxis"
2297 prototype: "QtCharts::QAbstractAxis"
2307 prototype: "QtCharts::QAbstractAxis"
2298 exports: [
2308 exports: [
2299 "QtCharts/BarCategoriesAxis 1.0",
2309 "QtCharts/BarCategoriesAxis 1.0",
2300 "QtCharts/BarCategoryAxis 1.1",
2310 "QtCharts/BarCategoryAxis 1.1",
2301 "QtCharts/BarCategoryAxis 2.0"
2311 "QtCharts/BarCategoryAxis 2.0"
2302 ]
2312 ]
2303 exportMetaObjectRevisions: [0, 0, 0]
2313 exportMetaObjectRevisions: [0, 0, 0]
2304 Property { name: "categories"; type: "QStringList" }
2314 Property { name: "categories"; type: "QStringList" }
2305 Property { name: "min"; type: "string" }
2315 Property { name: "min"; type: "string" }
2306 Property { name: "max"; type: "string" }
2316 Property { name: "max"; type: "string" }
2307 Property { name: "count"; type: "int"; isReadonly: true }
2317 Property { name: "count"; type: "int"; isReadonly: true }
2308 Signal {
2318 Signal {
2309 name: "minChanged"
2319 name: "minChanged"
2310 Parameter { name: "min"; type: "string" }
2320 Parameter { name: "min"; type: "string" }
2311 }
2321 }
2312 Signal {
2322 Signal {
2313 name: "maxChanged"
2323 name: "maxChanged"
2314 Parameter { name: "max"; type: "string" }
2324 Parameter { name: "max"; type: "string" }
2315 }
2325 }
2316 Signal {
2326 Signal {
2317 name: "rangeChanged"
2327 name: "rangeChanged"
2318 Parameter { name: "min"; type: "string" }
2328 Parameter { name: "min"; type: "string" }
2319 Parameter { name: "max"; type: "string" }
2329 Parameter { name: "max"; type: "string" }
2320 }
2330 }
2321 Method { name: "clear" }
2331 Method { name: "clear" }
2322 }
2332 }
2323 Component {
2333 Component {
2324 name: "QtCharts::QBarModelMapper"
2334 name: "QtCharts::QBarModelMapper"
2325 prototype: "QObject"
2335 prototype: "QObject"
2326 exports: [
2336 exports: [
2327 "QtCharts/BarModelMapper 1.0",
2337 "QtCharts/BarModelMapper 1.0",
2328 "QtCharts/BarModelMapper 2.0"
2338 "QtCharts/BarModelMapper 2.0"
2329 ]
2339 ]
2330 isCreatable: false
2340 isCreatable: false
2331 exportMetaObjectRevisions: [0, 0]
2341 exportMetaObjectRevisions: [0, 0]
2332 }
2342 }
2333 Component { name: "QtCharts::QBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2343 Component { name: "QtCharts::QBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2334 Component {
2344 Component {
2335 name: "QtCharts::QBarSet"
2345 name: "QtCharts::QBarSet"
2336 prototype: "QObject"
2346 prototype: "QObject"
2337 exports: ["QtCharts/BarSetBase 1.0", "QtCharts/BarSetBase 2.0"]
2347 exports: ["QtCharts/BarSetBase 1.0", "QtCharts/BarSetBase 2.0"]
2338 isCreatable: false
2348 isCreatable: false
2339 exportMetaObjectRevisions: [0, 0]
2349 exportMetaObjectRevisions: [0, 0]
2340 Property { name: "label"; type: "string" }
2350 Property { name: "label"; type: "string" }
2341 Property { name: "pen"; type: "QPen" }
2351 Property { name: "pen"; type: "QPen" }
2342 Property { name: "brush"; type: "QBrush" }
2352 Property { name: "brush"; type: "QBrush" }
2343 Property { name: "labelBrush"; type: "QBrush" }
2353 Property { name: "labelBrush"; type: "QBrush" }
2344 Property { name: "labelFont"; type: "QFont" }
2354 Property { name: "labelFont"; type: "QFont" }
2345 Property { name: "color"; type: "QColor" }
2355 Property { name: "color"; type: "QColor" }
2346 Property { name: "borderColor"; type: "QColor" }
2356 Property { name: "borderColor"; type: "QColor" }
2347 Property { name: "labelColor"; type: "QColor" }
2357 Property { name: "labelColor"; type: "QColor" }
2348 Signal {
2358 Signal {
2349 name: "clicked"
2359 name: "clicked"
2350 Parameter { name: "index"; type: "int" }
2360 Parameter { name: "index"; type: "int" }
2351 }
2361 }
2352 Signal {
2362 Signal {
2353 name: "hovered"
2363 name: "hovered"
2354 Parameter { name: "status"; type: "bool" }
2364 Parameter { name: "status"; type: "bool" }
2355 Parameter { name: "index"; type: "int" }
2365 Parameter { name: "index"; type: "int" }
2356 }
2366 }
2357 Signal {
2367 Signal {
2358 name: "pressed"
2368 name: "pressed"
2359 Parameter { name: "index"; type: "int" }
2369 Parameter { name: "index"; type: "int" }
2360 }
2370 }
2361 Signal {
2371 Signal {
2362 name: "released"
2372 name: "released"
2363 Parameter { name: "index"; type: "int" }
2373 Parameter { name: "index"; type: "int" }
2364 }
2374 }
2365 Signal {
2375 Signal {
2366 name: "doubleClicked"
2376 name: "doubleClicked"
2367 Parameter { name: "index"; type: "int" }
2377 Parameter { name: "index"; type: "int" }
2368 }
2378 }
2369 Signal {
2379 Signal {
2370 name: "colorChanged"
2380 name: "colorChanged"
2371 Parameter { name: "color"; type: "QColor" }
2381 Parameter { name: "color"; type: "QColor" }
2372 }
2382 }
2373 Signal {
2383 Signal {
2374 name: "borderColorChanged"
2384 name: "borderColorChanged"
2375 Parameter { name: "color"; type: "QColor" }
2385 Parameter { name: "color"; type: "QColor" }
2376 }
2386 }
2377 Signal {
2387 Signal {
2378 name: "labelColorChanged"
2388 name: "labelColorChanged"
2379 Parameter { name: "color"; type: "QColor" }
2389 Parameter { name: "color"; type: "QColor" }
2380 }
2390 }
2381 Signal {
2391 Signal {
2382 name: "valuesAdded"
2392 name: "valuesAdded"
2383 Parameter { name: "index"; type: "int" }
2393 Parameter { name: "index"; type: "int" }
2384 Parameter { name: "count"; type: "int" }
2394 Parameter { name: "count"; type: "int" }
2385 }
2395 }
2386 Signal {
2396 Signal {
2387 name: "valuesRemoved"
2397 name: "valuesRemoved"
2388 Parameter { name: "index"; type: "int" }
2398 Parameter { name: "index"; type: "int" }
2389 Parameter { name: "count"; type: "int" }
2399 Parameter { name: "count"; type: "int" }
2390 }
2400 }
2391 Signal {
2401 Signal {
2392 name: "valueChanged"
2402 name: "valueChanged"
2393 Parameter { name: "index"; type: "int" }
2403 Parameter { name: "index"; type: "int" }
2394 }
2404 }
2395 }
2405 }
2396 Component {
2406 Component {
2397 name: "QtCharts::QBoxPlotModelMapper"
2407 name: "QtCharts::QBoxPlotModelMapper"
2398 prototype: "QObject"
2408 prototype: "QObject"
2399 exports: ["QtCharts/BoxPlotModelMapper 2.0"]
2409 exports: ["QtCharts/BoxPlotModelMapper 2.0"]
2400 isCreatable: false
2410 isCreatable: false
2401 exportMetaObjectRevisions: [0]
2411 exportMetaObjectRevisions: [0]
2402 }
2412 }
2403 Component {
2413 Component {
2404 name: "QtCharts::QBoxPlotSeries"
2414 name: "QtCharts::QBoxPlotSeries"
2405 prototype: "QtCharts::QAbstractSeries"
2415 prototype: "QtCharts::QAbstractSeries"
2406 Property { name: "boxOutlineVisible"; type: "bool" }
2416 Property { name: "boxOutlineVisible"; type: "bool" }
2407 Property { name: "boxWidth"; type: "double" }
2417 Property { name: "boxWidth"; type: "double" }
2408 Property { name: "pen"; type: "QPen" }
2418 Property { name: "pen"; type: "QPen" }
2409 Property { name: "brush"; type: "QBrush" }
2419 Property { name: "brush"; type: "QBrush" }
2410 Property { name: "count"; revision: 1; type: "int"; isReadonly: true }
2420 Property { name: "count"; revision: 1; type: "int"; isReadonly: true }
2411 Signal {
2421 Signal {
2412 name: "clicked"
2422 name: "clicked"
2413 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2423 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2414 }
2424 }
2415 Signal {
2425 Signal {
2416 name: "hovered"
2426 name: "hovered"
2417 Parameter { name: "status"; type: "bool" }
2427 Parameter { name: "status"; type: "bool" }
2418 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2428 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2419 }
2429 }
2420 Signal {
2430 Signal {
2421 name: "pressed"
2431 name: "pressed"
2422 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2432 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2423 }
2433 }
2424 Signal {
2434 Signal {
2425 name: "released"
2435 name: "released"
2426 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2436 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2427 }
2437 }
2428 Signal {
2438 Signal {
2429 name: "doubleClicked"
2439 name: "doubleClicked"
2430 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2440 Parameter { name: "boxset"; type: "QBoxSet"; isPointer: true }
2431 }
2441 }
2432 Signal { name: "boxOutlineVisibilityChanged" }
2442 Signal { name: "boxOutlineVisibilityChanged" }
2433 Signal {
2443 Signal {
2434 name: "boxsetsAdded"
2444 name: "boxsetsAdded"
2435 Parameter { name: "sets"; type: "QList<QBoxSet*>" }
2445 Parameter { name: "sets"; type: "QList<QBoxSet*>" }
2436 }
2446 }
2437 Signal {
2447 Signal {
2438 name: "boxsetsRemoved"
2448 name: "boxsetsRemoved"
2439 Parameter { name: "sets"; type: "QList<QBoxSet*>" }
2449 Parameter { name: "sets"; type: "QList<QBoxSet*>" }
2440 }
2450 }
2441 }
2451 }
2442 Component {
2452 Component {
2443 name: "QtCharts::QBoxSet"
2453 name: "QtCharts::QBoxSet"
2444 prototype: "QObject"
2454 prototype: "QObject"
2445 Property { name: "pen"; type: "QPen" }
2455 Property { name: "pen"; type: "QPen" }
2446 Property { name: "brush"; type: "QBrush" }
2456 Property { name: "brush"; type: "QBrush" }
2447 Signal { name: "clicked" }
2457 Signal { name: "clicked" }
2448 Signal {
2458 Signal {
2449 name: "hovered"
2459 name: "hovered"
2450 Parameter { name: "status"; type: "bool" }
2460 Parameter { name: "status"; type: "bool" }
2451 }
2461 }
2452 Signal { name: "pressed" }
2462 Signal { name: "pressed" }
2453 Signal { name: "released" }
2463 Signal { name: "released" }
2454 Signal { name: "doubleClicked" }
2464 Signal { name: "doubleClicked" }
2455 Signal { name: "valuesChanged" }
2465 Signal { name: "valuesChanged" }
2456 Signal {
2466 Signal {
2457 name: "valueChanged"
2467 name: "valueChanged"
2458 Parameter { name: "index"; type: "int" }
2468 Parameter { name: "index"; type: "int" }
2459 }
2469 }
2460 Signal { name: "cleared" }
2470 Signal { name: "cleared" }
2461 }
2471 }
2462 Component {
2472 Component {
2463 name: "QtCharts::QCategoryAxis"
2473 name: "QtCharts::QCategoryAxis"
2464 prototype: "QtCharts::QValueAxis"
2474 prototype: "QtCharts::QValueAxis"
2465 Enum {
2475 Enum {
2466 name: "AxisLabelsPosition"
2476 name: "AxisLabelsPosition"
2467 values: {
2477 values: {
2468 "AxisLabelsPositionCenter": 0,
2478 "AxisLabelsPositionCenter": 0,
2469 "AxisLabelsPositionOnValue": 1
2479 "AxisLabelsPositionOnValue": 1
2470 }
2480 }
2471 }
2481 }
2472 Property { name: "startValue"; type: "double" }
2482 Property { name: "startValue"; type: "double" }
2473 Property { name: "count"; type: "int"; isReadonly: true }
2483 Property { name: "count"; type: "int"; isReadonly: true }
2474 Property { name: "categoriesLabels"; type: "QStringList"; isReadonly: true }
2484 Property { name: "categoriesLabels"; type: "QStringList"; isReadonly: true }
2475 Property { name: "labelsPosition"; type: "AxisLabelsPosition" }
2485 Property { name: "labelsPosition"; type: "AxisLabelsPosition" }
2476 Signal { name: "categoriesChanged" }
2486 Signal { name: "categoriesChanged" }
2477 Signal {
2487 Signal {
2478 name: "labelsPositionChanged"
2488 name: "labelsPositionChanged"
2479 Parameter { name: "position"; type: "QCategoryAxis::AxisLabelsPosition" }
2489 Parameter { name: "position"; type: "QCategoryAxis::AxisLabelsPosition" }
2480 }
2490 }
2481 }
2491 }
2482 Component {
2492 Component {
2483 name: "QtCharts::QDateTimeAxis"
2493 name: "QtCharts::QDateTimeAxis"
2484 prototype: "QtCharts::QAbstractAxis"
2494 prototype: "QtCharts::QAbstractAxis"
2485 exports: ["QtCharts/DateTimeAxis 1.1", "QtCharts/DateTimeAxis 2.0"]
2495 exports: ["QtCharts/DateTimeAxis 1.1", "QtCharts/DateTimeAxis 2.0"]
2486 exportMetaObjectRevisions: [0, 0]
2496 exportMetaObjectRevisions: [0, 0]
2487 Property { name: "tickCount"; type: "int" }
2497 Property { name: "tickCount"; type: "int" }
2488 Property { name: "min"; type: "QDateTime" }
2498 Property { name: "min"; type: "QDateTime" }
2489 Property { name: "max"; type: "QDateTime" }
2499 Property { name: "max"; type: "QDateTime" }
2490 Property { name: "format"; type: "string" }
2500 Property { name: "format"; type: "string" }
2491 Signal {
2501 Signal {
2492 name: "minChanged"
2502 name: "minChanged"
2493 Parameter { name: "min"; type: "QDateTime" }
2503 Parameter { name: "min"; type: "QDateTime" }
2494 }
2504 }
2495 Signal {
2505 Signal {
2496 name: "maxChanged"
2506 name: "maxChanged"
2497 Parameter { name: "max"; type: "QDateTime" }
2507 Parameter { name: "max"; type: "QDateTime" }
2498 }
2508 }
2499 Signal {
2509 Signal {
2500 name: "rangeChanged"
2510 name: "rangeChanged"
2501 Parameter { name: "min"; type: "QDateTime" }
2511 Parameter { name: "min"; type: "QDateTime" }
2502 Parameter { name: "max"; type: "QDateTime" }
2512 Parameter { name: "max"; type: "QDateTime" }
2503 }
2513 }
2504 Signal {
2514 Signal {
2505 name: "formatChanged"
2515 name: "formatChanged"
2506 Parameter { name: "format"; type: "string" }
2516 Parameter { name: "format"; type: "string" }
2507 }
2517 }
2508 Signal {
2518 Signal {
2509 name: "tickCountChanged"
2519 name: "tickCountChanged"
2510 Parameter { name: "tick"; type: "int" }
2520 Parameter { name: "tick"; type: "int" }
2511 }
2521 }
2512 }
2522 }
2513 Component {
2523 Component {
2514 name: "QtCharts::QHBarModelMapper"
2524 name: "QtCharts::QHBarModelMapper"
2515 prototype: "QtCharts::QBarModelMapper"
2525 prototype: "QtCharts::QBarModelMapper"
2516 exports: [
2526 exports: [
2517 "QtCharts/HBarModelMapper 1.0",
2527 "QtCharts/HBarModelMapper 1.0",
2518 "QtCharts/HBarModelMapper 2.0"
2528 "QtCharts/HBarModelMapper 2.0"
2519 ]
2529 ]
2520 exportMetaObjectRevisions: [0, 0]
2530 exportMetaObjectRevisions: [0, 0]
2521 Property { name: "series"; type: "QAbstractBarSeries"; isPointer: true }
2531 Property { name: "series"; type: "QAbstractBarSeries"; isPointer: true }
2522 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2532 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2523 Property { name: "firstBarSetRow"; type: "int" }
2533 Property { name: "firstBarSetRow"; type: "int" }
2524 Property { name: "lastBarSetRow"; type: "int" }
2534 Property { name: "lastBarSetRow"; type: "int" }
2525 Property { name: "firstColumn"; type: "int" }
2535 Property { name: "firstColumn"; type: "int" }
2526 Property { name: "columnCount"; type: "int" }
2536 Property { name: "columnCount"; type: "int" }
2527 Signal { name: "seriesReplaced" }
2537 Signal { name: "seriesReplaced" }
2528 Signal { name: "modelReplaced" }
2538 Signal { name: "modelReplaced" }
2529 }
2539 }
2530 Component {
2540 Component {
2531 name: "QtCharts::QHPieModelMapper"
2541 name: "QtCharts::QHPieModelMapper"
2532 prototype: "QtCharts::QPieModelMapper"
2542 prototype: "QtCharts::QPieModelMapper"
2533 exports: [
2543 exports: [
2534 "QtCharts/HPieModelMapper 1.0",
2544 "QtCharts/HPieModelMapper 1.0",
2535 "QtCharts/HPieModelMapper 2.0"
2545 "QtCharts/HPieModelMapper 2.0"
2536 ]
2546 ]
2537 exportMetaObjectRevisions: [0, 0]
2547 exportMetaObjectRevisions: [0, 0]
2538 Property { name: "series"; type: "QPieSeries"; isPointer: true }
2548 Property { name: "series"; type: "QPieSeries"; isPointer: true }
2539 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2549 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2540 Property { name: "valuesRow"; type: "int" }
2550 Property { name: "valuesRow"; type: "int" }
2541 Property { name: "labelsRow"; type: "int" }
2551 Property { name: "labelsRow"; type: "int" }
2542 Property { name: "firstColumn"; type: "int" }
2552 Property { name: "firstColumn"; type: "int" }
2543 Property { name: "columnCount"; type: "int" }
2553 Property { name: "columnCount"; type: "int" }
2544 Signal { name: "seriesReplaced" }
2554 Signal { name: "seriesReplaced" }
2545 Signal { name: "modelReplaced" }
2555 Signal { name: "modelReplaced" }
2546 }
2556 }
2547 Component {
2557 Component {
2548 name: "QtCharts::QHXYModelMapper"
2558 name: "QtCharts::QHXYModelMapper"
2549 prototype: "QtCharts::QXYModelMapper"
2559 prototype: "QtCharts::QXYModelMapper"
2550 exports: [
2560 exports: [
2551 "QtCharts/HXYModelMapper 1.0",
2561 "QtCharts/HXYModelMapper 1.0",
2552 "QtCharts/HXYModelMapper 2.0"
2562 "QtCharts/HXYModelMapper 2.0"
2553 ]
2563 ]
2554 exportMetaObjectRevisions: [0, 0]
2564 exportMetaObjectRevisions: [0, 0]
2555 Property { name: "series"; type: "QXYSeries"; isPointer: true }
2565 Property { name: "series"; type: "QXYSeries"; isPointer: true }
2556 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2566 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2557 Property { name: "xRow"; type: "int" }
2567 Property { name: "xRow"; type: "int" }
2558 Property { name: "yRow"; type: "int" }
2568 Property { name: "yRow"; type: "int" }
2559 Property { name: "firstColumn"; type: "int" }
2569 Property { name: "firstColumn"; type: "int" }
2560 Property { name: "columnCount"; type: "int" }
2570 Property { name: "columnCount"; type: "int" }
2561 Signal { name: "seriesReplaced" }
2571 Signal { name: "seriesReplaced" }
2562 Signal { name: "modelReplaced" }
2572 Signal { name: "modelReplaced" }
2563 }
2573 }
2564 Component { name: "QtCharts::QHorizontalBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2574 Component { name: "QtCharts::QHorizontalBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2565 Component {
2575 Component {
2566 name: "QtCharts::QHorizontalPercentBarSeries"
2576 name: "QtCharts::QHorizontalPercentBarSeries"
2567 prototype: "QtCharts::QAbstractBarSeries"
2577 prototype: "QtCharts::QAbstractBarSeries"
2568 }
2578 }
2569 Component {
2579 Component {
2570 name: "QtCharts::QHorizontalStackedBarSeries"
2580 name: "QtCharts::QHorizontalStackedBarSeries"
2571 prototype: "QtCharts::QAbstractBarSeries"
2581 prototype: "QtCharts::QAbstractBarSeries"
2572 }
2582 }
2573 Component {
2583 Component {
2574 name: "QtCharts::QLegend"
2584 name: "QtCharts::QLegend"
2575 defaultProperty: "children"
2585 defaultProperty: "children"
2576 prototype: "QGraphicsWidget"
2586 prototype: "QGraphicsWidget"
2577 exports: ["QtCharts/Legend 1.0", "QtCharts/Legend 2.0"]
2587 exports: ["QtCharts/Legend 1.0", "QtCharts/Legend 2.0"]
2578 isCreatable: false
2588 isCreatable: false
2579 exportMetaObjectRevisions: [0, 0]
2589 exportMetaObjectRevisions: [0, 0]
2580 Property { name: "alignment"; type: "Qt::Alignment" }
2590 Property { name: "alignment"; type: "Qt::Alignment" }
2581 Property { name: "backgroundVisible"; type: "bool" }
2591 Property { name: "backgroundVisible"; type: "bool" }
2582 Property { name: "color"; type: "QColor" }
2592 Property { name: "color"; type: "QColor" }
2583 Property { name: "borderColor"; type: "QColor" }
2593 Property { name: "borderColor"; type: "QColor" }
2584 Property { name: "font"; type: "QFont" }
2594 Property { name: "font"; type: "QFont" }
2585 Property { name: "labelColor"; type: "QColor" }
2595 Property { name: "labelColor"; type: "QColor" }
2586 Property { name: "reverseMarkers"; type: "bool" }
2596 Property { name: "reverseMarkers"; type: "bool" }
2587 Signal {
2597 Signal {
2588 name: "backgroundVisibleChanged"
2598 name: "backgroundVisibleChanged"
2589 Parameter { name: "visible"; type: "bool" }
2599 Parameter { name: "visible"; type: "bool" }
2590 }
2600 }
2591 Signal {
2601 Signal {
2592 name: "colorChanged"
2602 name: "colorChanged"
2593 Parameter { name: "color"; type: "QColor" }
2603 Parameter { name: "color"; type: "QColor" }
2594 }
2604 }
2595 Signal {
2605 Signal {
2596 name: "borderColorChanged"
2606 name: "borderColorChanged"
2597 Parameter { name: "color"; type: "QColor" }
2607 Parameter { name: "color"; type: "QColor" }
2598 }
2608 }
2599 Signal {
2609 Signal {
2600 name: "fontChanged"
2610 name: "fontChanged"
2601 Parameter { name: "font"; type: "QFont" }
2611 Parameter { name: "font"; type: "QFont" }
2602 }
2612 }
2603 Signal {
2613 Signal {
2604 name: "labelColorChanged"
2614 name: "labelColorChanged"
2605 Parameter { name: "color"; type: "QColor" }
2615 Parameter { name: "color"; type: "QColor" }
2606 }
2616 }
2607 Signal {
2617 Signal {
2608 name: "reverseMarkersChanged"
2618 name: "reverseMarkersChanged"
2609 Parameter { name: "reverseMarkers"; type: "bool" }
2619 Parameter { name: "reverseMarkers"; type: "bool" }
2610 }
2620 }
2611 }
2621 }
2612 Component { name: "QtCharts::QLineSeries"; prototype: "QtCharts::QXYSeries" }
2622 Component { name: "QtCharts::QLineSeries"; prototype: "QtCharts::QXYSeries" }
2613 Component {
2623 Component {
2614 name: "QtCharts::QLogValueAxis"
2624 name: "QtCharts::QLogValueAxis"
2615 prototype: "QtCharts::QAbstractAxis"
2625 prototype: "QtCharts::QAbstractAxis"
2616 exports: ["QtCharts/LogValueAxis 1.3", "QtCharts/LogValueAxis 2.0"]
2626 exports: ["QtCharts/LogValueAxis 1.3", "QtCharts/LogValueAxis 2.0"]
2617 exportMetaObjectRevisions: [0, 1]
2627 exportMetaObjectRevisions: [0, 1]
2618 Property { name: "min"; type: "double" }
2628 Property { name: "min"; type: "double" }
2619 Property { name: "max"; type: "double" }
2629 Property { name: "max"; type: "double" }
2620 Property { name: "labelFormat"; type: "string" }
2630 Property { name: "labelFormat"; type: "string" }
2621 Property { name: "base"; type: "double" }
2631 Property { name: "base"; type: "double" }
2622 Signal {
2632 Signal {
2623 name: "minChanged"
2633 name: "minChanged"
2624 Parameter { name: "min"; type: "double" }
2634 Parameter { name: "min"; type: "double" }
2625 }
2635 }
2626 Signal {
2636 Signal {
2627 name: "maxChanged"
2637 name: "maxChanged"
2628 Parameter { name: "max"; type: "double" }
2638 Parameter { name: "max"; type: "double" }
2629 }
2639 }
2630 Signal {
2640 Signal {
2631 name: "rangeChanged"
2641 name: "rangeChanged"
2632 Parameter { name: "min"; type: "double" }
2642 Parameter { name: "min"; type: "double" }
2633 Parameter { name: "max"; type: "double" }
2643 Parameter { name: "max"; type: "double" }
2634 }
2644 }
2635 Signal {
2645 Signal {
2636 name: "labelFormatChanged"
2646 name: "labelFormatChanged"
2637 Parameter { name: "format"; type: "string" }
2647 Parameter { name: "format"; type: "string" }
2638 }
2648 }
2639 Signal {
2649 Signal {
2640 name: "baseChanged"
2650 name: "baseChanged"
2641 Parameter { name: "base"; type: "double" }
2651 Parameter { name: "base"; type: "double" }
2642 }
2652 }
2643 }
2653 }
2644 Component { name: "QtCharts::QPercentBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2654 Component { name: "QtCharts::QPercentBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2645 Component {
2655 Component {
2646 name: "QtCharts::QPieModelMapper"
2656 name: "QtCharts::QPieModelMapper"
2647 prototype: "QObject"
2657 prototype: "QObject"
2648 exports: [
2658 exports: [
2649 "QtCharts/PieModelMapper 1.0",
2659 "QtCharts/PieModelMapper 1.0",
2650 "QtCharts/PieModelMapper 2.0"
2660 "QtCharts/PieModelMapper 2.0"
2651 ]
2661 ]
2652 isCreatable: false
2662 isCreatable: false
2653 exportMetaObjectRevisions: [0, 0]
2663 exportMetaObjectRevisions: [0, 0]
2654 }
2664 }
2655 Component {
2665 Component {
2656 name: "QtCharts::QPieSeries"
2666 name: "QtCharts::QPieSeries"
2657 prototype: "QtCharts::QAbstractSeries"
2667 prototype: "QtCharts::QAbstractSeries"
2658 exports: ["QtCharts/QPieSeries 1.0", "QtCharts/QPieSeries 2.0"]
2668 exports: ["QtCharts/QPieSeries 1.0", "QtCharts/QPieSeries 2.0"]
2659 isCreatable: false
2669 isCreatable: false
2660 exportMetaObjectRevisions: [0, 0]
2670 exportMetaObjectRevisions: [0, 0]
2661 Property { name: "horizontalPosition"; type: "double" }
2671 Property { name: "horizontalPosition"; type: "double" }
2662 Property { name: "verticalPosition"; type: "double" }
2672 Property { name: "verticalPosition"; type: "double" }
2663 Property { name: "size"; type: "double" }
2673 Property { name: "size"; type: "double" }
2664 Property { name: "startAngle"; type: "double" }
2674 Property { name: "startAngle"; type: "double" }
2665 Property { name: "endAngle"; type: "double" }
2675 Property { name: "endAngle"; type: "double" }
2666 Property { name: "count"; type: "int"; isReadonly: true }
2676 Property { name: "count"; type: "int"; isReadonly: true }
2667 Property { name: "sum"; type: "double"; isReadonly: true }
2677 Property { name: "sum"; type: "double"; isReadonly: true }
2668 Property { name: "holeSize"; type: "double" }
2678 Property { name: "holeSize"; type: "double" }
2669 Signal {
2679 Signal {
2670 name: "added"
2680 name: "added"
2671 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
2681 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
2672 }
2682 }
2673 Signal {
2683 Signal {
2674 name: "removed"
2684 name: "removed"
2675 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
2685 Parameter { name: "slices"; type: "QList<QPieSlice*>" }
2676 }
2686 }
2677 Signal {
2687 Signal {
2678 name: "clicked"
2688 name: "clicked"
2679 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2689 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2680 }
2690 }
2681 Signal {
2691 Signal {
2682 name: "hovered"
2692 name: "hovered"
2683 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2693 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2684 Parameter { name: "state"; type: "bool" }
2694 Parameter { name: "state"; type: "bool" }
2685 }
2695 }
2686 Signal {
2696 Signal {
2687 name: "pressed"
2697 name: "pressed"
2688 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2698 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2689 }
2699 }
2690 Signal {
2700 Signal {
2691 name: "released"
2701 name: "released"
2692 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2702 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2693 }
2703 }
2694 Signal {
2704 Signal {
2695 name: "doubleClicked"
2705 name: "doubleClicked"
2696 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2706 Parameter { name: "slice"; type: "QPieSlice"; isPointer: true }
2697 }
2707 }
2698 }
2708 }
2699 Component {
2709 Component {
2700 name: "QtCharts::QPieSlice"
2710 name: "QtCharts::QPieSlice"
2701 prototype: "QObject"
2711 prototype: "QObject"
2702 exports: ["QtCharts/PieSlice 1.0", "QtCharts/PieSlice 2.0"]
2712 exports: ["QtCharts/PieSlice 1.0", "QtCharts/PieSlice 2.0"]
2703 exportMetaObjectRevisions: [0, 0]
2713 exportMetaObjectRevisions: [0, 0]
2704 Enum {
2714 Enum {
2705 name: "LabelPosition"
2715 name: "LabelPosition"
2706 values: {
2716 values: {
2707 "LabelOutside": 0,
2717 "LabelOutside": 0,
2708 "LabelInsideHorizontal": 1,
2718 "LabelInsideHorizontal": 1,
2709 "LabelInsideTangential": 2,
2719 "LabelInsideTangential": 2,
2710 "LabelInsideNormal": 3
2720 "LabelInsideNormal": 3
2711 }
2721 }
2712 }
2722 }
2713 Property { name: "label"; type: "string" }
2723 Property { name: "label"; type: "string" }
2714 Property { name: "value"; type: "double" }
2724 Property { name: "value"; type: "double" }
2715 Property { name: "labelVisible"; type: "bool" }
2725 Property { name: "labelVisible"; type: "bool" }
2716 Property { name: "labelPosition"; type: "LabelPosition" }
2726 Property { name: "labelPosition"; type: "LabelPosition" }
2717 Property { name: "exploded"; type: "bool" }
2727 Property { name: "exploded"; type: "bool" }
2718 Property { name: "pen"; type: "QPen" }
2728 Property { name: "pen"; type: "QPen" }
2719 Property { name: "borderColor"; type: "QColor" }
2729 Property { name: "borderColor"; type: "QColor" }
2720 Property { name: "borderWidth"; type: "int" }
2730 Property { name: "borderWidth"; type: "int" }
2721 Property { name: "brush"; type: "QBrush" }
2731 Property { name: "brush"; type: "QBrush" }
2722 Property { name: "color"; type: "QColor" }
2732 Property { name: "color"; type: "QColor" }
2723 Property { name: "labelBrush"; type: "QBrush" }
2733 Property { name: "labelBrush"; type: "QBrush" }
2724 Property { name: "labelColor"; type: "QColor" }
2734 Property { name: "labelColor"; type: "QColor" }
2725 Property { name: "labelFont"; type: "QFont" }
2735 Property { name: "labelFont"; type: "QFont" }
2726 Property { name: "labelArmLengthFactor"; type: "double" }
2736 Property { name: "labelArmLengthFactor"; type: "double" }
2727 Property { name: "explodeDistanceFactor"; type: "double" }
2737 Property { name: "explodeDistanceFactor"; type: "double" }
2728 Property { name: "percentage"; type: "double"; isReadonly: true }
2738 Property { name: "percentage"; type: "double"; isReadonly: true }
2729 Property { name: "startAngle"; type: "double"; isReadonly: true }
2739 Property { name: "startAngle"; type: "double"; isReadonly: true }
2730 Property { name: "angleSpan"; type: "double"; isReadonly: true }
2740 Property { name: "angleSpan"; type: "double"; isReadonly: true }
2731 Signal { name: "clicked" }
2741 Signal { name: "clicked" }
2732 Signal {
2742 Signal {
2733 name: "hovered"
2743 name: "hovered"
2734 Parameter { name: "state"; type: "bool" }
2744 Parameter { name: "state"; type: "bool" }
2735 }
2745 }
2736 Signal { name: "pressed" }
2746 Signal { name: "pressed" }
2737 Signal { name: "released" }
2747 Signal { name: "released" }
2738 Signal { name: "doubleClicked" }
2748 Signal { name: "doubleClicked" }
2739 }
2749 }
2740 Component {
2750 Component {
2741 name: "QtCharts::QScatterSeries"
2751 name: "QtCharts::QScatterSeries"
2742 prototype: "QtCharts::QXYSeries"
2752 prototype: "QtCharts::QXYSeries"
2743 Enum {
2753 Enum {
2744 name: "MarkerShape"
2754 name: "MarkerShape"
2745 values: {
2755 values: {
2746 "MarkerShapeCircle": 0,
2756 "MarkerShapeCircle": 0,
2747 "MarkerShapeRectangle": 1
2757 "MarkerShapeRectangle": 1
2748 }
2758 }
2749 }
2759 }
2750 Property { name: "color"; type: "QColor" }
2760 Property { name: "color"; type: "QColor" }
2751 Property { name: "borderColor"; type: "QColor" }
2761 Property { name: "borderColor"; type: "QColor" }
2752 Property { name: "markerShape"; type: "MarkerShape" }
2762 Property { name: "markerShape"; type: "MarkerShape" }
2753 Property { name: "markerSize"; type: "double" }
2763 Property { name: "markerSize"; type: "double" }
2754 Property { name: "brush"; type: "QBrush" }
2764 Property { name: "brush"; type: "QBrush" }
2755 Signal {
2765 Signal {
2756 name: "colorChanged"
2766 name: "colorChanged"
2757 Parameter { name: "color"; type: "QColor" }
2767 Parameter { name: "color"; type: "QColor" }
2758 }
2768 }
2759 Signal {
2769 Signal {
2760 name: "borderColorChanged"
2770 name: "borderColorChanged"
2761 Parameter { name: "color"; type: "QColor" }
2771 Parameter { name: "color"; type: "QColor" }
2762 }
2772 }
2763 }
2773 }
2764 Component { name: "QtCharts::QSplineSeries"; prototype: "QtCharts::QLineSeries" }
2774 Component { name: "QtCharts::QSplineSeries"; prototype: "QtCharts::QLineSeries" }
2765 Component { name: "QtCharts::QStackedBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2775 Component { name: "QtCharts::QStackedBarSeries"; prototype: "QtCharts::QAbstractBarSeries" }
2766 Component {
2776 Component {
2767 name: "QtCharts::QVBarModelMapper"
2777 name: "QtCharts::QVBarModelMapper"
2768 prototype: "QtCharts::QBarModelMapper"
2778 prototype: "QtCharts::QBarModelMapper"
2769 exports: [
2779 exports: [
2770 "QtCharts/VBarModelMapper 1.0",
2780 "QtCharts/VBarModelMapper 1.0",
2771 "QtCharts/VBarModelMapper 2.0"
2781 "QtCharts/VBarModelMapper 2.0"
2772 ]
2782 ]
2773 exportMetaObjectRevisions: [0, 0]
2783 exportMetaObjectRevisions: [0, 0]
2774 Property { name: "series"; type: "QAbstractBarSeries"; isPointer: true }
2784 Property { name: "series"; type: "QAbstractBarSeries"; isPointer: true }
2775 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2785 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2776 Property { name: "firstBarSetColumn"; type: "int" }
2786 Property { name: "firstBarSetColumn"; type: "int" }
2777 Property { name: "lastBarSetColumn"; type: "int" }
2787 Property { name: "lastBarSetColumn"; type: "int" }
2778 Property { name: "firstRow"; type: "int" }
2788 Property { name: "firstRow"; type: "int" }
2779 Property { name: "rowCount"; type: "int" }
2789 Property { name: "rowCount"; type: "int" }
2780 Signal { name: "seriesReplaced" }
2790 Signal { name: "seriesReplaced" }
2781 Signal { name: "modelReplaced" }
2791 Signal { name: "modelReplaced" }
2782 }
2792 }
2783 Component {
2793 Component {
2784 name: "QtCharts::QVBoxPlotModelMapper"
2794 name: "QtCharts::QVBoxPlotModelMapper"
2785 prototype: "QtCharts::QBoxPlotModelMapper"
2795 prototype: "QtCharts::QBoxPlotModelMapper"
2786 exports: ["QtCharts/VBoxPlotModelMapper 2.0"]
2796 exports: ["QtCharts/VBoxPlotModelMapper 2.0"]
2787 exportMetaObjectRevisions: [0]
2797 exportMetaObjectRevisions: [0]
2788 Property { name: "series"; type: "QBoxPlotSeries"; isPointer: true }
2798 Property { name: "series"; type: "QBoxPlotSeries"; isPointer: true }
2789 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2799 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2790 Property { name: "firstBoxSetColumn"; type: "int" }
2800 Property { name: "firstBoxSetColumn"; type: "int" }
2791 Property { name: "lastBoxSetColumn"; type: "int" }
2801 Property { name: "lastBoxSetColumn"; type: "int" }
2792 Property { name: "firstRow"; type: "int" }
2802 Property { name: "firstRow"; type: "int" }
2793 Property { name: "rowCount"; type: "int" }
2803 Property { name: "rowCount"; type: "int" }
2794 Signal { name: "seriesReplaced" }
2804 Signal { name: "seriesReplaced" }
2795 Signal { name: "modelReplaced" }
2805 Signal { name: "modelReplaced" }
2796 }
2806 }
2797 Component {
2807 Component {
2798 name: "QtCharts::QVPieModelMapper"
2808 name: "QtCharts::QVPieModelMapper"
2799 prototype: "QtCharts::QPieModelMapper"
2809 prototype: "QtCharts::QPieModelMapper"
2800 exports: [
2810 exports: [
2801 "QtCharts/VPieModelMapper 1.0",
2811 "QtCharts/VPieModelMapper 1.0",
2802 "QtCharts/VPieModelMapper 2.0"
2812 "QtCharts/VPieModelMapper 2.0"
2803 ]
2813 ]
2804 exportMetaObjectRevisions: [0, 0]
2814 exportMetaObjectRevisions: [0, 0]
2805 Property { name: "series"; type: "QPieSeries"; isPointer: true }
2815 Property { name: "series"; type: "QPieSeries"; isPointer: true }
2806 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2816 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2807 Property { name: "valuesColumn"; type: "int" }
2817 Property { name: "valuesColumn"; type: "int" }
2808 Property { name: "labelsColumn"; type: "int" }
2818 Property { name: "labelsColumn"; type: "int" }
2809 Property { name: "firstRow"; type: "int" }
2819 Property { name: "firstRow"; type: "int" }
2810 Property { name: "rowCount"; type: "int" }
2820 Property { name: "rowCount"; type: "int" }
2811 Signal { name: "seriesReplaced" }
2821 Signal { name: "seriesReplaced" }
2812 Signal { name: "modelReplaced" }
2822 Signal { name: "modelReplaced" }
2813 }
2823 }
2814 Component {
2824 Component {
2815 name: "QtCharts::QVXYModelMapper"
2825 name: "QtCharts::QVXYModelMapper"
2816 prototype: "QtCharts::QXYModelMapper"
2826 prototype: "QtCharts::QXYModelMapper"
2817 exports: [
2827 exports: [
2818 "QtCharts/VXYModelMapper 1.0",
2828 "QtCharts/VXYModelMapper 1.0",
2819 "QtCharts/VXYModelMapper 2.0"
2829 "QtCharts/VXYModelMapper 2.0"
2820 ]
2830 ]
2821 exportMetaObjectRevisions: [0, 0]
2831 exportMetaObjectRevisions: [0, 0]
2822 Property { name: "series"; type: "QXYSeries"; isPointer: true }
2832 Property { name: "series"; type: "QXYSeries"; isPointer: true }
2823 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2833 Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
2824 Property { name: "xColumn"; type: "int" }
2834 Property { name: "xColumn"; type: "int" }
2825 Property { name: "yColumn"; type: "int" }
2835 Property { name: "yColumn"; type: "int" }
2826 Property { name: "firstRow"; type: "int" }
2836 Property { name: "firstRow"; type: "int" }
2827 Property { name: "rowCount"; type: "int" }
2837 Property { name: "rowCount"; type: "int" }
2828 Signal { name: "seriesReplaced" }
2838 Signal { name: "seriesReplaced" }
2829 Signal { name: "modelReplaced" }
2839 Signal { name: "modelReplaced" }
2830 }
2840 }
2831 Component {
2841 Component {
2832 name: "QtCharts::QValueAxis"
2842 name: "QtCharts::QValueAxis"
2833 prototype: "QtCharts::QAbstractAxis"
2843 prototype: "QtCharts::QAbstractAxis"
2834 exports: [
2844 exports: [
2835 "QtCharts/ValueAxis 1.1",
2845 "QtCharts/ValueAxis 1.1",
2836 "QtCharts/ValueAxis 2.0",
2846 "QtCharts/ValueAxis 2.0",
2837 "QtCharts/ValuesAxis 1.0"
2847 "QtCharts/ValuesAxis 1.0"
2838 ]
2848 ]
2839 exportMetaObjectRevisions: [0, 0, 0]
2849 exportMetaObjectRevisions: [0, 0, 0]
2840 Property { name: "tickCount"; type: "int" }
2850 Property { name: "tickCount"; type: "int" }
2841 Property { name: "min"; type: "double" }
2851 Property { name: "min"; type: "double" }
2842 Property { name: "max"; type: "double" }
2852 Property { name: "max"; type: "double" }
2843 Property { name: "labelFormat"; type: "string" }
2853 Property { name: "labelFormat"; type: "string" }
2844 Property { name: "minorTickCount"; type: "int" }
2854 Property { name: "minorTickCount"; type: "int" }
2845 Signal {
2855 Signal {
2846 name: "minChanged"
2856 name: "minChanged"
2847 Parameter { name: "min"; type: "double" }
2857 Parameter { name: "min"; type: "double" }
2848 }
2858 }
2849 Signal {
2859 Signal {
2850 name: "maxChanged"
2860 name: "maxChanged"
2851 Parameter { name: "max"; type: "double" }
2861 Parameter { name: "max"; type: "double" }
2852 }
2862 }
2853 Signal {
2863 Signal {
2854 name: "rangeChanged"
2864 name: "rangeChanged"
2855 Parameter { name: "min"; type: "double" }
2865 Parameter { name: "min"; type: "double" }
2856 Parameter { name: "max"; type: "double" }
2866 Parameter { name: "max"; type: "double" }
2857 }
2867 }
2858 Signal {
2868 Signal {
2859 name: "tickCountChanged"
2869 name: "tickCountChanged"
2860 Parameter { name: "tickCount"; type: "int" }
2870 Parameter { name: "tickCount"; type: "int" }
2861 }
2871 }
2862 Signal {
2872 Signal {
2863 name: "minorTickCountChanged"
2873 name: "minorTickCountChanged"
2864 Parameter { name: "tickCount"; type: "int" }
2874 Parameter { name: "tickCount"; type: "int" }
2865 }
2875 }
2866 Signal {
2876 Signal {
2867 name: "labelFormatChanged"
2877 name: "labelFormatChanged"
2868 Parameter { name: "format"; type: "string" }
2878 Parameter { name: "format"; type: "string" }
2869 }
2879 }
2870 Method { name: "applyNiceNumbers" }
2880 Method { name: "applyNiceNumbers" }
2871 }
2881 }
2872 Component {
2882 Component {
2873 name: "QtCharts::QXYModelMapper"
2883 name: "QtCharts::QXYModelMapper"
2874 prototype: "QObject"
2884 prototype: "QObject"
2875 exports: ["QtCharts/XYModelMapper 1.0", "QtCharts/XYModelMapper 2.0"]
2885 exports: ["QtCharts/XYModelMapper 1.0", "QtCharts/XYModelMapper 2.0"]
2876 isCreatable: false
2886 isCreatable: false
2877 exportMetaObjectRevisions: [0, 0]
2887 exportMetaObjectRevisions: [0, 0]
2878 }
2888 }
2879 Component {
2889 Component {
2880 name: "QtCharts::QXYSeries"
2890 name: "QtCharts::QXYSeries"
2881 prototype: "QtCharts::QAbstractSeries"
2891 prototype: "QtCharts::QAbstractSeries"
2882 exports: ["QtCharts/XYSeries 1.0", "QtCharts/XYSeries 2.0"]
2892 exports: ["QtCharts/XYSeries 1.0", "QtCharts/XYSeries 2.0"]
2883 isCreatable: false
2893 isCreatable: false
2884 exportMetaObjectRevisions: [0, 0]
2894 exportMetaObjectRevisions: [0, 0]
2885 Property { name: "pointsVisible"; type: "bool" }
2895 Property { name: "pointsVisible"; type: "bool" }
2886 Property { name: "color"; type: "QColor" }
2896 Property { name: "color"; type: "QColor" }
2887 Property { name: "pointLabelsFormat"; type: "string" }
2897 Property { name: "pointLabelsFormat"; type: "string" }
2888 Property { name: "pointLabelsVisible"; type: "bool" }
2898 Property { name: "pointLabelsVisible"; type: "bool" }
2889 Property { name: "pointLabelsFont"; type: "QFont" }
2899 Property { name: "pointLabelsFont"; type: "QFont" }
2890 Property { name: "pointLabelsColor"; type: "QColor" }
2900 Property { name: "pointLabelsColor"; type: "QColor" }
2891 Signal {
2901 Signal {
2892 name: "clicked"
2902 name: "clicked"
2893 Parameter { name: "point"; type: "QPointF" }
2903 Parameter { name: "point"; type: "QPointF" }
2894 }
2904 }
2895 Signal {
2905 Signal {
2896 name: "hovered"
2906 name: "hovered"
2897 Parameter { name: "point"; type: "QPointF" }
2907 Parameter { name: "point"; type: "QPointF" }
2898 Parameter { name: "state"; type: "bool" }
2908 Parameter { name: "state"; type: "bool" }
2899 }
2909 }
2900 Signal {
2910 Signal {
2901 name: "pressed"
2911 name: "pressed"
2902 Parameter { name: "point"; type: "QPointF" }
2912 Parameter { name: "point"; type: "QPointF" }
2903 }
2913 }
2904 Signal {
2914 Signal {
2905 name: "released"
2915 name: "released"
2906 Parameter { name: "point"; type: "QPointF" }
2916 Parameter { name: "point"; type: "QPointF" }
2907 }
2917 }
2908 Signal {
2918 Signal {
2909 name: "doubleClicked"
2919 name: "doubleClicked"
2910 Parameter { name: "point"; type: "QPointF" }
2920 Parameter { name: "point"; type: "QPointF" }
2911 }
2921 }
2912 Signal {
2922 Signal {
2913 name: "pointReplaced"
2923 name: "pointReplaced"
2914 Parameter { name: "index"; type: "int" }
2924 Parameter { name: "index"; type: "int" }
2915 }
2925 }
2916 Signal {
2926 Signal {
2917 name: "pointRemoved"
2927 name: "pointRemoved"
2918 Parameter { name: "index"; type: "int" }
2928 Parameter { name: "index"; type: "int" }
2919 }
2929 }
2920 Signal {
2930 Signal {
2921 name: "pointAdded"
2931 name: "pointAdded"
2922 Parameter { name: "index"; type: "int" }
2932 Parameter { name: "index"; type: "int" }
2923 }
2933 }
2924 Signal {
2934 Signal {
2925 name: "colorChanged"
2935 name: "colorChanged"
2926 Parameter { name: "color"; type: "QColor" }
2936 Parameter { name: "color"; type: "QColor" }
2927 }
2937 }
2928 Signal { name: "pointsReplaced" }
2938 Signal { name: "pointsReplaced" }
2929 Signal {
2939 Signal {
2930 name: "pointLabelsFormatChanged"
2940 name: "pointLabelsFormatChanged"
2931 Parameter { name: "format"; type: "string" }
2941 Parameter { name: "format"; type: "string" }
2932 }
2942 }
2933 Signal {
2943 Signal {
2934 name: "pointLabelsVisibilityChanged"
2944 name: "pointLabelsVisibilityChanged"
2935 Parameter { name: "visible"; type: "bool" }
2945 Parameter { name: "visible"; type: "bool" }
2936 }
2946 }
2937 Signal {
2947 Signal {
2938 name: "pointLabelsFontChanged"
2948 name: "pointLabelsFontChanged"
2939 Parameter { name: "font"; type: "QFont" }
2949 Parameter { name: "font"; type: "QFont" }
2940 }
2950 }
2941 Signal {
2951 Signal {
2942 name: "pointLabelsColorChanged"
2952 name: "pointLabelsColorChanged"
2943 Parameter { name: "color"; type: "QColor" }
2953 Parameter { name: "color"; type: "QColor" }
2944 }
2954 }
2945 Signal {
2955 Signal {
2946 name: "pointsRemoved"
2956 name: "pointsRemoved"
2947 Parameter { name: "index"; type: "int" }
2957 Parameter { name: "index"; type: "int" }
2948 Parameter { name: "count"; type: "int" }
2958 Parameter { name: "count"; type: "int" }
2949 }
2959 }
2950 }
2960 }
2951 }
2961 }
@@ -1,919 +1,1083
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include "tst_qabstractaxis.h"
19 #include "tst_qabstractaxis.h"
20
20
21 Q_DECLARE_METATYPE(QPen)
21 Q_DECLARE_METATYPE(QPen)
22 Q_DECLARE_METATYPE(Qt::Orientation)
22 Q_DECLARE_METATYPE(Qt::Orientation)
23
23
24 void tst_QAbstractAxis::initTestCase()
24 void tst_QAbstractAxis::initTestCase()
25 {
25 {
26 }
26 }
27
27
28 void tst_QAbstractAxis::cleanupTestCase()
28 void tst_QAbstractAxis::cleanupTestCase()
29 {
29 {
30 QTest::qWait(1); // Allow final deleteLaters to run
30 QTest::qWait(1); // Allow final deleteLaters to run
31 }
31 }
32
32
33 void tst_QAbstractAxis::init(QAbstractAxis* axis, QAbstractSeries* series)
33 void tst_QAbstractAxis::init(QAbstractAxis* axis, QAbstractSeries* series)
34 {
34 {
35 m_axis = axis;
35 m_axis = axis;
36 m_series = series;
36 m_series = series;
37 m_view = new QChartView(newQChartOrQPolarChart());
37 m_view = new QChartView(newQChartOrQPolarChart());
38 m_chart = m_view->chart();
38 m_chart = m_view->chart();
39 }
39 }
40
40
41 void tst_QAbstractAxis::cleanup()
41 void tst_QAbstractAxis::cleanup()
42 {
42 {
43 delete m_view;
43 delete m_view;
44 m_view = 0;
44 m_view = 0;
45 m_chart = 0;
45 m_chart = 0;
46 m_axis = 0;
46 m_axis = 0;
47 }
47 }
48
48
49 void tst_QAbstractAxis::qabstractaxis()
49 void tst_QAbstractAxis::qabstractaxis()
50 {
50 {
51 QCOMPARE(m_axis->linePen(), QPen());
51 QCOMPARE(m_axis->linePen(), QPen());
52 QCOMPARE(m_axis->gridLinePen(), QPen());
52 QCOMPARE(m_axis->gridLinePen(), QPen());
53 QCOMPARE(m_axis->isLineVisible(), true);
53 QCOMPARE(m_axis->isLineVisible(), true);
54 QCOMPARE(m_axis->isGridLineVisible(), true);
54 QCOMPARE(m_axis->isGridLineVisible(), true);
55 QCOMPARE(m_axis->isVisible(), true);
55 QCOMPARE(m_axis->isVisible(), true);
56 QCOMPARE(m_axis->labelsAngle(), 0);
56 QCOMPARE(m_axis->labelsAngle(), 0);
57 QCOMPARE(m_axis->labelsBrush(), QBrush());
57 QCOMPARE(m_axis->labelsBrush(), QBrush());
58 QCOMPARE(m_axis->labelsFont(), QFont());
58 QCOMPARE(m_axis->labelsFont(), QFont());
59 QCOMPARE(m_axis->labelsVisible(), true);
59 QCOMPARE(m_axis->labelsVisible(), true);
60 QCOMPARE(m_axis->orientation(), Qt::Orientation(0));
60 QCOMPARE(m_axis->orientation(), Qt::Orientation(0));
61 QCOMPARE(m_axis->minorGridLinePen(), QPen());
61 QCOMPARE(m_axis->minorGridLinePen(), QPen());
62 QCOMPARE(m_axis->isMinorGridLineVisible(), true);
62 QCOMPARE(m_axis->isMinorGridLineVisible(), true);
63 m_axis->setLineVisible(false);
63 m_axis->setLineVisible(false);
64 m_axis->setLinePen(QPen());
64 m_axis->setLinePen(QPen());
65 m_axis->setLinePenColor(QColor());
65 m_axis->setLinePenColor(QColor());
66 m_axis->setGridLinePen(QPen());
66 m_axis->setGridLinePen(QPen());
67 m_axis->setGridLineVisible(false);
67 m_axis->setGridLineVisible(false);
68 m_axis->setGridLineColor(QColor());
69 m_axis->setMinorGridLineColor(QColor());
68 m_axis->setLabelsAngle(-1);
70 m_axis->setLabelsAngle(-1);
69 m_axis->setLabelsBrush(QBrush());
71 m_axis->setLabelsBrush(QBrush());
70 m_axis->setLabelsColor(QColor());
72 m_axis->setLabelsColor(QColor());
71 m_axis->setLabelsFont(QFont());
73 m_axis->setLabelsFont(QFont());
72 m_axis->setLabelsVisible(false);
74 m_axis->setLabelsVisible(false);
73 m_axis->setMax(QVariant());
75 m_axis->setMax(QVariant());
74 m_axis->setMin(QVariant());
76 m_axis->setMin(QVariant());
75 m_axis->setRange(QVariant(), QVariant());
77 m_axis->setRange(QVariant(), QVariant());
76 m_axis->setShadesBorderColor(QColor());
78 m_axis->setShadesBorderColor(QColor());
77 m_axis->setShadesBrush(QBrush());
79 m_axis->setShadesBrush(QBrush());
78 m_axis->setShadesColor(QColor());
80 m_axis->setShadesColor(QColor());
79 m_axis->setShadesPen(QPen());
81 m_axis->setShadesPen(QPen());
80 m_axis->setShadesVisible(false);
82 m_axis->setShadesVisible(false);
81 m_axis->setVisible(false);
83 m_axis->setVisible(false);
82 m_axis->setMinorGridLinePen(QPen());
84 m_axis->setMinorGridLinePen(QPen());
83 m_axis->setMinorGridLineVisible(false);
85 m_axis->setMinorGridLineVisible(false);
84 //TODO QCOMPARE(m_axis->shadesBrush(), QBrush());
86 //TODO QCOMPARE(m_axis->shadesBrush(), QBrush());
85 QCOMPARE(m_axis->shadesPen(), QPen());
87 QCOMPARE(m_axis->shadesPen(), QPen());
86 QCOMPARE(m_axis->shadesVisible(), false);
88 QCOMPARE(m_axis->shadesVisible(), false);
87 m_axis->show();
89 m_axis->show();
88 m_axis->hide();
90 m_axis->hide();
89 }
91 }
90
92
91 void tst_QAbstractAxis::axisPen_data()
93 void tst_QAbstractAxis::axisPen_data()
92 {
94 {
93 QTest::addColumn<QPen>("axisPen");
95 QTest::addColumn<QPen>("axisPen");
94 QTest::newRow("null") << QPen();
96 QTest::newRow("null") << QPen();
95 QTest::newRow("blue") << QPen(Qt::blue);
97 QTest::newRow("blue") << QPen(Qt::blue);
96 QTest::newRow("black") << QPen(Qt::black);
98 QTest::newRow("black") << QPen(Qt::black);
97 QTest::newRow("red") << QPen(Qt::red);
99 QTest::newRow("red") << QPen(Qt::red);
98 }
100 }
99
101
100 void tst_QAbstractAxis::axisPen()
102 void tst_QAbstractAxis::axisPen()
101 {
103 {
102 QFETCH(QPen, axisPen);
104 QFETCH(QPen, axisPen);
103
105
104 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
106 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
105 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
107 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
106 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
108 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
107 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
109 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
108 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
110 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
109 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
111 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
110 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
112 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
111 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
113 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
112 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
114 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
113 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
115 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
116 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
117 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
114
118
115 m_axis->setLinePen(axisPen);
119 m_axis->setLinePen(axisPen);
116 QCOMPARE(m_axis->linePen(), axisPen);
120 QCOMPARE(m_axis->linePen(), axisPen);
117
121
118 QCOMPARE(spy0.count(), 0);
122 QCOMPARE(spy0.count(), 0);
119 QCOMPARE(spy1.count(), 0);
123 QCOMPARE(spy1.count(), 0);
120 QCOMPARE(spy2.count(), 0);
124 QCOMPARE(spy2.count(), 0);
121 QCOMPARE(spy3.count(), 0);
125 QCOMPARE(spy3.count(), 0);
122 QCOMPARE(spy4.count(), 0);
126 QCOMPARE(spy4.count(), 0);
123 QCOMPARE(spy5.count(), 0);
127 QCOMPARE(spy5.count(), 0);
124 QCOMPARE(spy6.count(), 0);
128 QCOMPARE(spy6.count(), 0);
125 QCOMPARE(spy7.count(), 0);
129 QCOMPARE(spy7.count(), 0);
126 QCOMPARE(spy8.count(), 0);
130 QCOMPARE(spy8.count(), 0);
127 QCOMPARE(spy9.count(), 0);
131 QCOMPARE(spy9.count(), 0);
132 QCOMPARE(spy10.count(), 0);
133 QCOMPARE(spy11.count(), 0);
128
134
129 m_chart->setAxisX(m_axis, m_series);
135 m_chart->setAxisX(m_axis, m_series);
130 m_view->show();
136 m_view->show();
131 QTest::qWaitForWindowShown(m_view);
137 QTest::qWaitForWindowShown(m_view);
132 //TODO QCOMPARE(m_axis->axisPen(), axisPen);
138 //TODO QCOMPARE(m_axis->axisPen(), axisPen);
133 }
139 }
134
140
135 void tst_QAbstractAxis::axisPenColor_data()
141 void tst_QAbstractAxis::axisPenColor_data()
136 {
142 {
137 }
143 }
138
144
139 void tst_QAbstractAxis::axisPenColor()
145 void tst_QAbstractAxis::axisPenColor()
140 {
146 {
141 QSKIP("Test is not implemented. This is deprecated function");
147 QSKIP("Test is not implemented. This is deprecated function");
142 }
148 }
143
149
144 void tst_QAbstractAxis::gridLinePen_data()
150 void tst_QAbstractAxis::gridLinePen_data()
145 {
151 {
146
152
147 QTest::addColumn<QPen>("gridLinePen");
153 QTest::addColumn<QPen>("gridLinePen");
148 QTest::newRow("null") << QPen();
154 QTest::newRow("null") << QPen();
149 QTest::newRow("blue") << QPen(Qt::blue);
155 QTest::newRow("blue") << QPen(Qt::blue);
150 QTest::newRow("black") << QPen(Qt::black);
156 QTest::newRow("black") << QPen(Qt::black);
151 QTest::newRow("red") << QPen(Qt::red);
157 QTest::newRow("red") << QPen(Qt::red);
152
158
153 }
159 }
154
160
155 void tst_QAbstractAxis::gridLinePen()
161 void tst_QAbstractAxis::gridLinePen()
156 {
162 {
157 QFETCH(QPen, gridLinePen);
163 QFETCH(QPen, gridLinePen);
158
164
159 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
165 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
160 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
166 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
161 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
167 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
162 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
168 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
163 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
169 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
164 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
170 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
165 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
171 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
166 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
172 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
167 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
173 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
174 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
175 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
176 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
168
177
169 m_axis->setGridLinePen(gridLinePen);
178 m_axis->setGridLinePen(gridLinePen);
170 QCOMPARE(m_axis->gridLinePen(), gridLinePen);
179 QCOMPARE(m_axis->gridLinePen(), gridLinePen);
171
180
172 QCOMPARE(spy0.count(), 0);
181 QCOMPARE(spy0.count(), 0);
173 QCOMPARE(spy1.count(), 0);
182 QCOMPARE(spy1.count(), 0);
174 QCOMPARE(spy2.count(), 0);
183 QCOMPARE(spy2.count(), 0);
175 QCOMPARE(spy3.count(), 0);
184 QCOMPARE(spy3.count(), 0);
176 QCOMPARE(spy4.count(), 0);
185 QCOMPARE(spy4.count(), 0);
177 QCOMPARE(spy5.count(), 0);
186 QCOMPARE(spy5.count(), 0);
178 QCOMPARE(spy6.count(), 0);
187 QCOMPARE(spy6.count(), 0);
179 QCOMPARE(spy7.count(), 0);
188 QCOMPARE(spy7.count(), 0);
180 QCOMPARE(spy8.count(), 0);
189 QCOMPARE(spy8.count(), 0);
190 QCOMPARE(spy9.count(), 0);
191 QCOMPARE(spy10.count(), 0);
192 QCOMPARE(spy11.count(), 0);
181
193
182 m_chart->setAxisX(m_axis, m_series);
194 m_chart->setAxisX(m_axis, m_series);
183 m_view->show();
195 m_view->show();
184 QTest::qWaitForWindowShown(m_view);
196 QTest::qWaitForWindowShown(m_view);
185 //TODO QCOMPARE(m_axis->gridLinePen(), gridLinePen);
197 //TODO QCOMPARE(m_axis->gridLinePen(), gridLinePen);
186 }
198 }
187
199
188 void tst_QAbstractAxis::minorGridLinePen_data()
200 void tst_QAbstractAxis::minorGridLinePen_data()
189 {
201 {
190
202
191 QTest::addColumn<QPen>("minorGridLinePen");
203 QTest::addColumn<QPen>("minorGridLinePen");
192 QTest::newRow("null") << QPen();
204 QTest::newRow("null") << QPen();
193 QTest::newRow("blue") << QPen(Qt::blue);
205 QTest::newRow("blue") << QPen(Qt::blue);
194 QTest::newRow("black") << QPen(Qt::black);
206 QTest::newRow("black") << QPen(Qt::black);
195 QTest::newRow("red") << QPen(Qt::red);
207 QTest::newRow("red") << QPen(Qt::red);
196
208
197 }
209 }
198
210
199 void tst_QAbstractAxis::minorGridLinePen()
211 void tst_QAbstractAxis::minorGridLinePen()
200 {
212 {
201 QFETCH(QPen, minorGridLinePen);
213 QFETCH(QPen, minorGridLinePen);
202
214
203 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
215 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
204 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
216 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
205 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
217 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
206 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
218 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
207 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
219 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
208 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
220 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
209 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
221 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
210 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
222 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
211 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
223 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
212 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
224 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
225 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
226 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
213
227
214 m_axis->setMinorGridLinePen(minorGridLinePen);
228 m_axis->setMinorGridLinePen(minorGridLinePen);
215 QCOMPARE(m_axis->minorGridLinePen(), minorGridLinePen);
229 QCOMPARE(m_axis->minorGridLinePen(), minorGridLinePen);
216
230
217 QCOMPARE(spy0.count(), 0);
231 QCOMPARE(spy0.count(), 0);
218 QCOMPARE(spy1.count(), 0);
232 QCOMPARE(spy1.count(), 0);
219 QCOMPARE(spy2.count(), 0);
233 QCOMPARE(spy2.count(), 0);
220 QCOMPARE(spy3.count(), 0);
234 QCOMPARE(spy3.count(), 0);
221 QCOMPARE(spy4.count(), 0);
235 QCOMPARE(spy4.count(), 0);
222 QCOMPARE(spy5.count(), 0);
236 QCOMPARE(spy5.count(), 0);
223 QCOMPARE(spy6.count(), 0);
237 QCOMPARE(spy6.count(), 0);
224 QCOMPARE(spy7.count(), 0);
238 QCOMPARE(spy7.count(), 0);
225 QCOMPARE(spy8.count(), 0);
239 QCOMPARE(spy8.count(), 0);
226 QCOMPARE(spy9.count(), 0);
240 QCOMPARE(spy9.count(), 0);
241 QCOMPARE(spy10.count(), 0);
242 QCOMPARE(spy11.count(), 0);
227
243
228 m_chart->setAxisX(m_axis, m_series);
244 m_chart->setAxisX(m_axis, m_series);
229 m_view->show();
245 m_view->show();
230 QTest::qWaitForWindowShown(m_view);
246 QTest::qWaitForWindowShown(m_view);
231
247
232 }
248 }
233
249
234 void tst_QAbstractAxis::lineVisible_data()
250 void tst_QAbstractAxis::lineVisible_data()
235 {
251 {
236 QTest::addColumn<bool>("lineVisible");
252 QTest::addColumn<bool>("lineVisible");
237 QTest::newRow("true") << true;
253 QTest::newRow("true") << true;
238 QTest::newRow("false") << false;
254 QTest::newRow("false") << false;
239 }
255 }
240
256
241 void tst_QAbstractAxis::lineVisible()
257 void tst_QAbstractAxis::lineVisible()
242 {
258 {
243 QFETCH(bool, lineVisible);
259 QFETCH(bool, lineVisible);
244
260
245 m_axis->setLineVisible(!lineVisible);
261 m_axis->setLineVisible(!lineVisible);
246
262
247 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
263 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
248 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
264 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
249 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
265 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
250 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
266 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
251 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
267 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
252 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
268 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
253 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
269 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
254 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
270 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
255 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
271 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
256 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
272 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
273 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
274 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
257
275
258 m_axis->setLineVisible(lineVisible);
276 m_axis->setLineVisible(lineVisible);
259 QCOMPARE(m_axis->isLineVisible(), lineVisible);
277 QCOMPARE(m_axis->isLineVisible(), lineVisible);
260
278
261 QCOMPARE(spy0.count(), 1);
279 QCOMPARE(spy0.count(), 1);
262 QCOMPARE(spy1.count(), 0);
280 QCOMPARE(spy1.count(), 0);
263 QCOMPARE(spy2.count(), 0);
281 QCOMPARE(spy2.count(), 0);
264 QCOMPARE(spy3.count(), 0);
282 QCOMPARE(spy3.count(), 0);
265 QCOMPARE(spy4.count(), 0);
283 QCOMPARE(spy4.count(), 0);
266 QCOMPARE(spy5.count(), 0);
284 QCOMPARE(spy5.count(), 0);
267 QCOMPARE(spy6.count(), 0);
285 QCOMPARE(spy6.count(), 0);
268 QCOMPARE(spy7.count(), 0);
286 QCOMPARE(spy7.count(), 0);
269 QCOMPARE(spy8.count(), 0);
287 QCOMPARE(spy8.count(), 0);
270 QCOMPARE(spy9.count(), 0);
288 QCOMPARE(spy9.count(), 0);
289 QCOMPARE(spy10.count(), 0);
290 QCOMPARE(spy11.count(), 0);
271
291
272 m_chart->setAxisX(m_axis, m_series);
292 m_chart->setAxisX(m_axis, m_series);
273 m_view->show();
293 m_view->show();
274 QTest::qWaitForWindowShown(m_view);
294 QTest::qWaitForWindowShown(m_view);
275 QCOMPARE(m_axis->isLineVisible(), lineVisible);
295 QCOMPARE(m_axis->isLineVisible(), lineVisible);
276 }
296 }
277
297
278 void tst_QAbstractAxis::gridLineVisible_data()
298 void tst_QAbstractAxis::gridLineVisible_data()
279 {
299 {
280 QTest::addColumn<bool>("gridLineVisible");
300 QTest::addColumn<bool>("gridLineVisible");
281 QTest::newRow("true") << true;
301 QTest::newRow("true") << true;
282 QTest::newRow("false") << false;
302 QTest::newRow("false") << false;
283 }
303 }
284
304
285 void tst_QAbstractAxis::gridLineVisible()
305 void tst_QAbstractAxis::gridLineVisible()
286 {
306 {
287 QFETCH(bool, gridLineVisible);
307 QFETCH(bool, gridLineVisible);
288
308
289 m_axis->setGridLineVisible(!gridLineVisible);
309 m_axis->setGridLineVisible(!gridLineVisible);
290
310
291 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
311 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
292 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
312 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
293 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
313 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
294 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
314 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
295 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
315 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
296 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
316 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
297 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
317 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
298 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
318 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
299 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
319 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
320 QSignalSpy spy9(m_axis, SIGNAL(gridLineColorChanged(QColor)));
300
321
301 m_axis->setGridLineVisible(gridLineVisible);
322 m_axis->setGridLineVisible(gridLineVisible);
302 QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible);
323 QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible);
303
324
304 QCOMPARE(spy0.count(), 0);
325 QCOMPARE(spy0.count(), 0);
305 QCOMPARE(spy1.count(), 0);
326 QCOMPARE(spy1.count(), 0);
306 QCOMPARE(spy2.count(), 1);
327 QCOMPARE(spy2.count(), 1);
307 QCOMPARE(spy3.count(), 0);
328 QCOMPARE(spy3.count(), 0);
308 QCOMPARE(spy4.count(), 0);
329 QCOMPARE(spy4.count(), 0);
309 QCOMPARE(spy5.count(), 0);
330 QCOMPARE(spy5.count(), 0);
310 QCOMPARE(spy6.count(), 0);
331 QCOMPARE(spy6.count(), 0);
311 QCOMPARE(spy7.count(), 0);
332 QCOMPARE(spy7.count(), 0);
312 QCOMPARE(spy8.count(), 0);
333 QCOMPARE(spy8.count(), 0);
334 QCOMPARE(spy9.count(), 0);
313
335
314 m_chart->setAxisX(m_axis, m_series);
336 m_chart->setAxisX(m_axis, m_series);
315 m_view->show();
337 m_view->show();
316 QTest::qWaitForWindowShown(m_view);
338 QTest::qWaitForWindowShown(m_view);
317 QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible);
339 QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible);
318
340
319 }
341 }
320
342
321 void tst_QAbstractAxis::minorGridLineVisible_data()
343 void tst_QAbstractAxis::minorGridLineVisible_data()
322 {
344 {
323 QTest::addColumn<bool>("minorGridLineVisible");
345 QTest::addColumn<bool>("minorGridLineVisible");
324 QTest::newRow("true") << true;
346 QTest::newRow("true") << true;
325 QTest::newRow("false") << false;
347 QTest::newRow("false") << false;
326 }
348 }
327
349
328 void tst_QAbstractAxis::minorGridLineVisible()
350 void tst_QAbstractAxis::minorGridLineVisible()
329 {
351 {
330 QFETCH(bool, minorGridLineVisible);
352 QFETCH(bool, minorGridLineVisible);
331
353
332 m_axis->setMinorGridLineVisible(!minorGridLineVisible);
354 m_axis->setMinorGridLineVisible(!minorGridLineVisible);
333
355
334 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
356 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
335 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
357 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
336 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
358 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
337 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
359 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
338 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
360 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
339 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
361 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
340 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
362 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
341 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
363 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
342 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
364 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
343 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
365 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
366 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
367 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
344
368
345 m_axis->setMinorGridLineVisible(minorGridLineVisible);
369 m_axis->setMinorGridLineVisible(minorGridLineVisible);
346 QCOMPARE(m_axis->isMinorGridLineVisible(), minorGridLineVisible);
370 QCOMPARE(m_axis->isMinorGridLineVisible(), minorGridLineVisible);
347
371
348 QCOMPARE(spy0.count(), 0);
372 QCOMPARE(spy0.count(), 0);
349 QCOMPARE(spy1.count(), 0);
373 QCOMPARE(spy1.count(), 0);
350 QCOMPARE(spy2.count(), 0);
374 QCOMPARE(spy2.count(), 0);
351 QCOMPARE(spy3.count(), 0);
375 QCOMPARE(spy3.count(), 0);
352 QCOMPARE(spy4.count(), 0);
376 QCOMPARE(spy4.count(), 0);
353 QCOMPARE(spy5.count(), 0);
377 QCOMPARE(spy5.count(), 0);
354 QCOMPARE(spy6.count(), 0);
378 QCOMPARE(spy6.count(), 0);
355 QCOMPARE(spy7.count(), 0);
379 QCOMPARE(spy7.count(), 0);
356 QCOMPARE(spy8.count(), 0);
380 QCOMPARE(spy8.count(), 0);
357 QCOMPARE(spy9.count(), 1);
381 QCOMPARE(spy9.count(), 1);
382 QCOMPARE(spy10.count(), 0);
383 QCOMPARE(spy11.count(), 0);
358
384
359 m_chart->setAxisX(m_axis, m_series);
385 m_chart->setAxisX(m_axis, m_series);
360 m_view->show();
386 m_view->show();
361 QTest::qWaitForWindowShown(m_view);
387 QTest::qWaitForWindowShown(m_view);
362 QCOMPARE(m_axis->isMinorGridLineVisible(), minorGridLineVisible);
388 QCOMPARE(m_axis->isMinorGridLineVisible(), minorGridLineVisible);
363
389
364 }
390 }
365
391
392 void tst_QAbstractAxis::gridLineColor_data()
393 {
394 QTest::addColumn<QColor>("gridLineColor");
395 QTest::newRow("blue") << QColor(Qt::blue);
396 QTest::newRow("red") << QColor(Qt::red);
397 QTest::newRow("yellow") << QColor(Qt::yellow);
398 }
399
400 void tst_QAbstractAxis::gridLineColor()
401 {
402 QFETCH(QColor, gridLineColor);
403
404 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
405 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
406 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
407 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
408 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
409 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
410 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
411 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
412 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
413 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
414 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
415 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
416
417 m_axis->setGridLineColor(gridLineColor);
418 QCOMPARE(m_axis->gridLineColor(), gridLineColor);
419
420 QCOMPARE(spy0.count(), 0);
421 QCOMPARE(spy1.count(), 0);
422 QCOMPARE(spy2.count(), 0);
423 QCOMPARE(spy3.count(), 0);
424 QCOMPARE(spy4.count(), 0);
425 QCOMPARE(spy5.count(), 0);
426 QCOMPARE(spy6.count(), 0);
427 QCOMPARE(spy7.count(), 0);
428 QCOMPARE(spy8.count(), 0);
429 QCOMPARE(spy9.count(), 0);
430 QCOMPARE(spy10.count(), 1);
431 QCOMPARE(spy11.count(), 0);
432
433 m_chart->setAxisX(m_axis, m_series);
434 m_view->show();
435 QTest::qWaitForWindowShown(m_view);
436
437 }
438
439 void tst_QAbstractAxis::minorGridLineColor_data()
440 {
441 QTest::addColumn<QColor>("minorGridLineColor");
442 QTest::newRow("blue") << QColor(Qt::blue);
443 QTest::newRow("red") << QColor(Qt::red);
444 QTest::newRow("yellow") << QColor(Qt::yellow);
445 }
446
447 void tst_QAbstractAxis::minorGridLineColor()
448 {
449 QFETCH(QColor, minorGridLineColor);
450
451 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
452 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
453 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
454 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
455 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
456 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
457 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
458 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
459 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
460 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
461 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
462 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
463
464 m_axis->setMinorGridLineColor(minorGridLineColor);
465 QCOMPARE(m_axis->minorGridLineColor(), minorGridLineColor);
466
467 QCOMPARE(spy0.count(), 0);
468 QCOMPARE(spy1.count(), 0);
469 QCOMPARE(spy2.count(), 0);
470 QCOMPARE(spy3.count(), 0);
471 QCOMPARE(spy4.count(), 0);
472 QCOMPARE(spy5.count(), 0);
473 QCOMPARE(spy6.count(), 0);
474 QCOMPARE(spy7.count(), 0);
475 QCOMPARE(spy8.count(), 0);
476 QCOMPARE(spy9.count(), 0);
477 QCOMPARE(spy10.count(), 0);
478 QCOMPARE(spy11.count(), 1);
479
480 m_chart->setAxisX(m_axis, m_series);
481 m_view->show();
482 QTest::qWaitForWindowShown(m_view);
483
484 }
485
366 void tst_QAbstractAxis::visible_data()
486 void tst_QAbstractAxis::visible_data()
367 {
487 {
368 QTest::addColumn<bool>("visible");
488 QTest::addColumn<bool>("visible");
369 QTest::newRow("true") << true;
489 QTest::newRow("true") << true;
370 QTest::newRow("false") << false;
490 QTest::newRow("false") << false;
371 }
491 }
372
492
373 void tst_QAbstractAxis::visible()
493 void tst_QAbstractAxis::visible()
374 {
494 {
375 QFETCH(bool, visible);
495 QFETCH(bool, visible);
376
496
377 m_axis->setVisible(!visible);
497 m_axis->setVisible(!visible);
378
498
379 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
499 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
380 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
500 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
381 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
501 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
382 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
502 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
383 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
503 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
384 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
504 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
385 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
505 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
386 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
506 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
387 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
507 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
388 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
508 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
509 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
510 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
389
511
390 m_axis->setVisible(visible);
512 m_axis->setVisible(visible);
391 QCOMPARE(m_axis->isVisible(), visible);
513 QCOMPARE(m_axis->isVisible(), visible);
392
514
393 QCOMPARE(spy0.count(), 0);
515 QCOMPARE(spy0.count(), 0);
394 QCOMPARE(spy1.count(), 0);
516 QCOMPARE(spy1.count(), 0);
395 QCOMPARE(spy2.count(), 0);
517 QCOMPARE(spy2.count(), 0);
396 QCOMPARE(spy3.count(), 0);
518 QCOMPARE(spy3.count(), 0);
397 QCOMPARE(spy4.count(), 0);
519 QCOMPARE(spy4.count(), 0);
398 QCOMPARE(spy5.count(), 0);
520 QCOMPARE(spy5.count(), 0);
399 QCOMPARE(spy6.count(), 0);
521 QCOMPARE(spy6.count(), 0);
400 QCOMPARE(spy7.count(), 0);
522 QCOMPARE(spy7.count(), 0);
401 QCOMPARE(spy8.count(), 1);
523 QCOMPARE(spy8.count(), 1);
402 QCOMPARE(spy9.count(), 0);
524 QCOMPARE(spy9.count(), 0);
525 QCOMPARE(spy10.count(), 0);
526 QCOMPARE(spy11.count(), 0);
403
527
404 m_chart->setAxisX(m_axis, m_series);
528 m_chart->setAxisX(m_axis, m_series);
405 m_view->show();
529 m_view->show();
406 QTest::qWaitForWindowShown(m_view);
530 QTest::qWaitForWindowShown(m_view);
407 QCOMPARE(m_axis->isVisible(), visible);
531 QCOMPARE(m_axis->isVisible(), visible);
408 }
532 }
409
533
410 void tst_QAbstractAxis::labelsAngle_data()
534 void tst_QAbstractAxis::labelsAngle_data()
411 {
535 {
412 QTest::addColumn<int>("labelsAngle");
536 QTest::addColumn<int>("labelsAngle");
413 QTest::newRow("0") << 0;
537 QTest::newRow("0") << 0;
414 QTest::newRow("45") << 45;
538 QTest::newRow("45") << 45;
415 QTest::newRow("90") << 90;
539 QTest::newRow("90") << 90;
416 }
540 }
417
541
418 void tst_QAbstractAxis::labelsAngle()
542 void tst_QAbstractAxis::labelsAngle()
419 {
543 {
420 QFETCH(int, labelsAngle);
544 QFETCH(int, labelsAngle);
421
545
422 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
546 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
423 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
547 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
424 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
548 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
425 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
549 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
426 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
550 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
427 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
551 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
428 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
552 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
429 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
553 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
430 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
554 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
431 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
555 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
556 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
557 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
432
558
433 m_axis->setLabelsAngle(labelsAngle);
559 m_axis->setLabelsAngle(labelsAngle);
434 QCOMPARE(m_axis->labelsAngle(), labelsAngle);
560 QCOMPARE(m_axis->labelsAngle(), labelsAngle);
435
561
436 QCOMPARE(spy0.count(), 0);
562 QCOMPARE(spy0.count(), 0);
437 QCOMPARE(spy1.count(), 0);
563 QCOMPARE(spy1.count(), 0);
438 QCOMPARE(spy2.count(), 0);
564 QCOMPARE(spy2.count(), 0);
439 QCOMPARE(spy3.count(), 0);
565 QCOMPARE(spy3.count(), 0);
440 QCOMPARE(spy4.count(), 0);
566 QCOMPARE(spy4.count(), 0);
441 QCOMPARE(spy5.count(), 0);
567 QCOMPARE(spy5.count(), 0);
442 QCOMPARE(spy6.count(), 0);
568 QCOMPARE(spy6.count(), 0);
443 QCOMPARE(spy7.count(), 0);
569 QCOMPARE(spy7.count(), 0);
444 QCOMPARE(spy8.count(), 0);
570 QCOMPARE(spy8.count(), 0);
445 QCOMPARE(spy9.count(), 0);
571 QCOMPARE(spy9.count(), 0);
572 QCOMPARE(spy10.count(), 0);
573 QCOMPARE(spy11.count(), 0);
446
574
447 m_chart->setAxisX(m_axis, m_series);
575 m_chart->setAxisX(m_axis, m_series);
448 m_view->show();
576 m_view->show();
449 QTest::qWaitForWindowShown(m_view);
577 QTest::qWaitForWindowShown(m_view);
450 QCOMPARE(m_axis->labelsAngle(), labelsAngle);
578 QCOMPARE(m_axis->labelsAngle(), labelsAngle);
451 }
579 }
452
580
453 void tst_QAbstractAxis::labelsBrush_data()
581 void tst_QAbstractAxis::labelsBrush_data()
454 {
582 {
455 QTest::addColumn<QBrush>("labelsBrush");
583 QTest::addColumn<QBrush>("labelsBrush");
456 QTest::newRow("null") << QBrush();
584 QTest::newRow("null") << QBrush();
457 QTest::newRow("blue") << QBrush(Qt::blue);
585 QTest::newRow("blue") << QBrush(Qt::blue);
458 QTest::newRow("black") << QBrush(Qt::black);
586 QTest::newRow("black") << QBrush(Qt::black);
459
587
460 }
588 }
461
589
462 void tst_QAbstractAxis::labelsBrush()
590 void tst_QAbstractAxis::labelsBrush()
463 {
591 {
464
592
465 QFETCH(QBrush, labelsBrush);
593 QFETCH(QBrush, labelsBrush);
466
594
467 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
595 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
468 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
596 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
469 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
597 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
470 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
598 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
471 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
599 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
472 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
600 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
473 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
601 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
474 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
602 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
475 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
603 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
476 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
604 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
605 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
606 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
477
607
478 m_axis->setLabelsBrush(labelsBrush);
608 m_axis->setLabelsBrush(labelsBrush);
479 QCOMPARE(m_axis->labelsBrush(), labelsBrush);
609 QCOMPARE(m_axis->labelsBrush(), labelsBrush);
480
610
481 QCOMPARE(spy0.count(), 0);
611 QCOMPARE(spy0.count(), 0);
482 QCOMPARE(spy1.count(), 0);
612 QCOMPARE(spy1.count(), 0);
483 QCOMPARE(spy2.count(), 0);
613 QCOMPARE(spy2.count(), 0);
484 QCOMPARE(spy3.count(), 0);
614 QCOMPARE(spy3.count(), 0);
485 QCOMPARE(spy4.count(), 0);
615 QCOMPARE(spy4.count(), 0);
486 QCOMPARE(spy5.count(), 0);
616 QCOMPARE(spy5.count(), 0);
487 //TODO QCOMPARE(spy6.count(), 0);
617 //TODO QCOMPARE(spy6.count(), 0);
488 QCOMPARE(spy7.count(), 0);
618 QCOMPARE(spy7.count(), 0);
489 QCOMPARE(spy8.count(), 0);
619 QCOMPARE(spy8.count(), 0);
490 QCOMPARE(spy9.count(), 0);
620 QCOMPARE(spy9.count(), 0);
621 QCOMPARE(spy10.count(), 0);
622 QCOMPARE(spy11.count(), 0);
491
623
492 m_view->show();
624 m_view->show();
493 QTest::qWaitForWindowShown(m_view);
625 QTest::qWaitForWindowShown(m_view);
494 QCOMPARE(m_axis->labelsBrush(), labelsBrush);
626 QCOMPARE(m_axis->labelsBrush(), labelsBrush);
495
627
496 }
628 }
497
629
498 void tst_QAbstractAxis::labelsColor_data()
630 void tst_QAbstractAxis::labelsColor_data()
499 {
631 {
500
632
501 }
633 }
502
634
503 void tst_QAbstractAxis::labelsColor()
635 void tst_QAbstractAxis::labelsColor()
504 {
636 {
505 QSKIP("Test is not implemented. This is deprecated function");
637 QSKIP("Test is not implemented. This is deprecated function");
506 }
638 }
507
639
508 void tst_QAbstractAxis::labelsFont_data()
640 void tst_QAbstractAxis::labelsFont_data()
509 {
641 {
510 QTest::addColumn<QFont>("labelsFont");
642 QTest::addColumn<QFont>("labelsFont");
511 QTest::newRow("null") << QFont();
643 QTest::newRow("null") << QFont();
512 QTest::newRow("serif") << QFont("SansSerif");
644 QTest::newRow("serif") << QFont("SansSerif");
513 }
645 }
514
646
515 void tst_QAbstractAxis::labelsFont()
647 void tst_QAbstractAxis::labelsFont()
516 {
648 {
517
649
518 QFETCH(QFont, labelsFont);
650 QFETCH(QFont, labelsFont);
519
651
520 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
652 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
521 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
653 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
522 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
654 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
523 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
655 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
524 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
656 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
525 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
657 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
526 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
658 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
527 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
659 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
528 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
660 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
529 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
661 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
662 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
663 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
530
664
531 m_axis->setLabelsFont(labelsFont);
665 m_axis->setLabelsFont(labelsFont);
532 QCOMPARE(m_axis->labelsFont(), labelsFont);
666 QCOMPARE(m_axis->labelsFont(), labelsFont);
533
667
534 QCOMPARE(spy0.count(), 0);
668 QCOMPARE(spy0.count(), 0);
535 QCOMPARE(spy1.count(), 0);
669 QCOMPARE(spy1.count(), 0);
536 QCOMPARE(spy2.count(), 0);
670 QCOMPARE(spy2.count(), 0);
537 QCOMPARE(spy3.count(), 0);
671 QCOMPARE(spy3.count(), 0);
538 QCOMPARE(spy4.count(), 0);
672 QCOMPARE(spy4.count(), 0);
539 QCOMPARE(spy5.count(), 0);
673 QCOMPARE(spy5.count(), 0);
540 QCOMPARE(spy6.count(), 0);
674 QCOMPARE(spy6.count(), 0);
541 QCOMPARE(spy7.count(), 0);
675 QCOMPARE(spy7.count(), 0);
542 QCOMPARE(spy8.count(), 0);
676 QCOMPARE(spy8.count(), 0);
543 QCOMPARE(spy9.count(), 0);
677 QCOMPARE(spy9.count(), 0);
678 QCOMPARE(spy10.count(), 0);
679 QCOMPARE(spy11.count(), 0);
544
680
545 m_view->show();
681 m_view->show();
546 QTest::qWaitForWindowShown(m_view);
682 QTest::qWaitForWindowShown(m_view);
547 QCOMPARE(m_axis->labelsFont(), labelsFont);
683 QCOMPARE(m_axis->labelsFont(), labelsFont);
548
684
549 }
685 }
550
686
551 void tst_QAbstractAxis::labelsVisible_data()
687 void tst_QAbstractAxis::labelsVisible_data()
552 {
688 {
553 QTest::addColumn<bool>("labelsVisible");
689 QTest::addColumn<bool>("labelsVisible");
554 QTest::newRow("true") << true;
690 QTest::newRow("true") << true;
555 QTest::newRow("false") << false;
691 QTest::newRow("false") << false;
556 }
692 }
557
693
558 void tst_QAbstractAxis::labelsVisible()
694 void tst_QAbstractAxis::labelsVisible()
559 {
695 {
560 QFETCH(bool, labelsVisible);
696 QFETCH(bool, labelsVisible);
561
697
562 m_axis->setLabelsVisible(!labelsVisible);
698 m_axis->setLabelsVisible(!labelsVisible);
563
699
564 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
700 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
565 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
701 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
566 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
702 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
567 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
703 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
568 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
704 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
569 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
705 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
570 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
706 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
571 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
707 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
572 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
708 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
573 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
709 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
710 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
711 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
574
712
575 m_axis->setLabelsVisible(labelsVisible);
713 m_axis->setLabelsVisible(labelsVisible);
576 QCOMPARE(m_axis->labelsVisible(), labelsVisible);
714 QCOMPARE(m_axis->labelsVisible(), labelsVisible);
577
715
578 QCOMPARE(spy0.count(), 0);
716 QCOMPARE(spy0.count(), 0);
579 QCOMPARE(spy1.count(), 0);
717 QCOMPARE(spy1.count(), 0);
580 QCOMPARE(spy2.count(), 0);
718 QCOMPARE(spy2.count(), 0);
581 QCOMPARE(spy3.count(), 0);
719 QCOMPARE(spy3.count(), 0);
582 QCOMPARE(spy4.count(), 1);
720 QCOMPARE(spy4.count(), 1);
583 QCOMPARE(spy5.count(), 0);
721 QCOMPARE(spy5.count(), 0);
584 QCOMPARE(spy6.count(), 0);
722 QCOMPARE(spy6.count(), 0);
585 QCOMPARE(spy7.count(), 0);
723 QCOMPARE(spy7.count(), 0);
586 QCOMPARE(spy8.count(), 0);
724 QCOMPARE(spy8.count(), 0);
587 QCOMPARE(spy9.count(), 0);
725 QCOMPARE(spy9.count(), 0);
726 QCOMPARE(spy10.count(), 0);
727 QCOMPARE(spy11.count(), 0);
588
728
589 m_chart->setAxisX(m_axis, m_series);
729 m_chart->setAxisX(m_axis, m_series);
590 m_view->show();
730 m_view->show();
591 QTest::qWaitForWindowShown(m_view);
731 QTest::qWaitForWindowShown(m_view);
592 QCOMPARE(m_axis->labelsVisible(), labelsVisible);
732 QCOMPARE(m_axis->labelsVisible(), labelsVisible);
593 }
733 }
594
734
595 void tst_QAbstractAxis::orientation_data()
735 void tst_QAbstractAxis::orientation_data()
596 {
736 {
597 QTest::addColumn<Qt::Orientation>("orientation");
737 QTest::addColumn<Qt::Orientation>("orientation");
598 QTest::newRow("Vertical") << Qt::Vertical;
738 QTest::newRow("Vertical") << Qt::Vertical;
599 QTest::newRow("Horizontal") << Qt::Horizontal;
739 QTest::newRow("Horizontal") << Qt::Horizontal;
600 }
740 }
601
741
602 void tst_QAbstractAxis::orientation()
742 void tst_QAbstractAxis::orientation()
603 {
743 {
604 QFETCH(Qt::Orientation, orientation);
744 QFETCH(Qt::Orientation, orientation);
605
745
606 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
746 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
607 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
747 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
608 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
748 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
609 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
749 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
610 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
750 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
611 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
751 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
612 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
752 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
613 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
753 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
614 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
754 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
615 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
755 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
756 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
757 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
616
758
617 if(orientation==Qt::Vertical){
759 if(orientation==Qt::Vertical){
618 m_chart->setAxisY(m_axis,m_series);
760 m_chart->setAxisY(m_axis,m_series);
619 }else{
761 }else{
620 m_chart->setAxisX(m_axis,m_series);
762 m_chart->setAxisX(m_axis,m_series);
621 }
763 }
622 QCOMPARE(m_axis->orientation(), orientation);
764 QCOMPARE(m_axis->orientation(), orientation);
623
765
624 QCOMPARE(spy0.count(), 0);
766 QCOMPARE(spy0.count(), 0);
625 QCOMPARE(spy1.count(), 0);
767 QCOMPARE(spy1.count(), 0);
626 QCOMPARE(spy2.count(), 0);
768 QCOMPARE(spy2.count(), 0);
627 QCOMPARE(spy3.count(), 0);
769 QCOMPARE(spy3.count(), 0);
628 QCOMPARE(spy4.count(), 0);
770 QCOMPARE(spy4.count(), 0);
629 QCOMPARE(spy5.count(), 0);
771 QCOMPARE(spy5.count(), 0);
630 QCOMPARE(spy6.count(), 0);
772 QCOMPARE(spy6.count(), 0);
631 QCOMPARE(spy7.count(), 0);
773 QCOMPARE(spy7.count(), 0);
632 QCOMPARE(spy8.count(), 0);
774 QCOMPARE(spy8.count(), 0);
633 QCOMPARE(spy9.count(), 0);
775 QCOMPARE(spy9.count(), 0);
776 QCOMPARE(spy10.count(), 0);
777 QCOMPARE(spy11.count(), 0);
634
778
635 m_view->show();
779 m_view->show();
636 QTest::qWaitForWindowShown(m_view);
780 QTest::qWaitForWindowShown(m_view);
637 QCOMPARE(m_axis->orientation(), orientation);
781 QCOMPARE(m_axis->orientation(), orientation);
638 }
782 }
639
783
640 void tst_QAbstractAxis::setMax_data()
784 void tst_QAbstractAxis::setMax_data()
641 {
785 {
642 //just check if it does not crash
786 //just check if it does not crash
643 QTest::addColumn<QVariant>("max");
787 QTest::addColumn<QVariant>("max");
644 QTest::newRow("something") << QVariant("something");
788 QTest::newRow("something") << QVariant("something");
645 QTest::newRow("1.0") << QVariant(1.0);
789 QTest::newRow("1.0") << QVariant(1.0);
646 }
790 }
647
791
648 void tst_QAbstractAxis::setMax()
792 void tst_QAbstractAxis::setMax()
649 {
793 {
650 QFETCH(QVariant, max);
794 QFETCH(QVariant, max);
651 m_axis->setMax(max);
795 m_axis->setMax(max);
652 }
796 }
653
797
654 void tst_QAbstractAxis::setMin_data()
798 void tst_QAbstractAxis::setMin_data()
655 {
799 {
656 //just check if it does not crash
800 //just check if it does not crash
657 QTest::addColumn<QVariant>("min");
801 QTest::addColumn<QVariant>("min");
658 QTest::newRow("something") << QVariant("something");
802 QTest::newRow("something") << QVariant("something");
659 QTest::newRow("1.0") << QVariant(1.0);
803 QTest::newRow("1.0") << QVariant(1.0);
660 }
804 }
661
805
662 // public void setMin(QVariant const& min)
806 // public void setMin(QVariant const& min)
663 void tst_QAbstractAxis::setMin()
807 void tst_QAbstractAxis::setMin()
664 {
808 {
665 QFETCH(QVariant, min);
809 QFETCH(QVariant, min);
666 m_axis->setMin(min);
810 m_axis->setMin(min);
667 }
811 }
668
812
669 void tst_QAbstractAxis::setRange_data()
813 void tst_QAbstractAxis::setRange_data()
670 {
814 {
671 //just check if it does not crash
815 //just check if it does not crash
672 QTest::addColumn<QVariant>("min");
816 QTest::addColumn<QVariant>("min");
673 QTest::addColumn<QVariant>("max");
817 QTest::addColumn<QVariant>("max");
674 QTest::newRow("something") << QVariant("something0") << QVariant("something1");
818 QTest::newRow("something") << QVariant("something0") << QVariant("something1");
675 QTest::newRow("-1 1") << QVariant(-1.0) << QVariant(1.0);
819 QTest::newRow("-1 1") << QVariant(-1.0) << QVariant(1.0);
676 }
820 }
677
821
678 // public void setRange(QVariant const& min, QVariant const& max)
822 // public void setRange(QVariant const& min, QVariant const& max)
679 void tst_QAbstractAxis::setRange()
823 void tst_QAbstractAxis::setRange()
680 {
824 {
681
825
682 QFETCH(QVariant, min);
826 QFETCH(QVariant, min);
683 QFETCH(QVariant, max);
827 QFETCH(QVariant, max);
684 m_axis->setRange(min,max);
828 m_axis->setRange(min,max);
685 }
829 }
686
830
687 void tst_QAbstractAxis::shadesBorderColor_data()
831 void tst_QAbstractAxis::shadesBorderColor_data()
688 {
832 {
689
833
690 }
834 }
691
835
692 void tst_QAbstractAxis::shadesBorderColor()
836 void tst_QAbstractAxis::shadesBorderColor()
693 {
837 {
694 QSKIP("Test is not implemented. This is deprecated function");
838 QSKIP("Test is not implemented. This is deprecated function");
695 }
839 }
696
840
697 void tst_QAbstractAxis::shadesBrush_data()
841 void tst_QAbstractAxis::shadesBrush_data()
698 {
842 {
699 QTest::addColumn<QBrush>("shadesBrush");
843 QTest::addColumn<QBrush>("shadesBrush");
700 QTest::newRow("null") << QBrush();
844 QTest::newRow("null") << QBrush();
701 QTest::newRow("blue") << QBrush(Qt::blue);
845 QTest::newRow("blue") << QBrush(Qt::blue);
702 QTest::newRow("black") << QBrush(Qt::black);
846 QTest::newRow("black") << QBrush(Qt::black);
703 }
847 }
704
848
705 void tst_QAbstractAxis::shadesBrush()
849 void tst_QAbstractAxis::shadesBrush()
706 {
850 {
707 QFETCH(QBrush, shadesBrush);
851 QFETCH(QBrush, shadesBrush);
708
852
709 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
853 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
710 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
854 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
711 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
855 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
712 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
856 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
713 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
857 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
714 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
858 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
715 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
859 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
716 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
860 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
717 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
861 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
718 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
862 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
863 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
864 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
719
865
720 m_axis->setShadesBrush(shadesBrush);
866 m_axis->setShadesBrush(shadesBrush);
721 QCOMPARE(m_axis->shadesBrush(), shadesBrush);
867 QCOMPARE(m_axis->shadesBrush(), shadesBrush);
722
868
723 QCOMPARE(spy0.count(), 0);
869 QCOMPARE(spy0.count(), 0);
724 QCOMPARE(spy1.count(), 0);
870 QCOMPARE(spy1.count(), 0);
725 QCOMPARE(spy2.count(), 0);
871 QCOMPARE(spy2.count(), 0);
726 QCOMPARE(spy3.count(), 0);
872 QCOMPARE(spy3.count(), 0);
727 QCOMPARE(spy4.count(), 0);
873 QCOMPARE(spy4.count(), 0);
728 QCOMPARE(spy5.count(), 0);
874 QCOMPARE(spy5.count(), 0);
729 //TODO QCOMPARE(spy6.count(), 0);
875 //TODO QCOMPARE(spy6.count(), 0);
730 QCOMPARE(spy7.count(), 0);
876 QCOMPARE(spy7.count(), 0);
731 QCOMPARE(spy8.count(), 0);
877 QCOMPARE(spy8.count(), 0);
732 QCOMPARE(spy9.count(), 0);
878 QCOMPARE(spy9.count(), 0);
879 QCOMPARE(spy10.count(), 0);
880 QCOMPARE(spy11.count(), 0);
733
881
734 m_view->show();
882 m_view->show();
735 QTest::qWaitForWindowShown(m_view);
883 QTest::qWaitForWindowShown(m_view);
736 QCOMPARE(m_axis->shadesBrush(), shadesBrush);
884 QCOMPARE(m_axis->shadesBrush(), shadesBrush);
737 }
885 }
738
886
739 void tst_QAbstractAxis::shadesColor_data()
887 void tst_QAbstractAxis::shadesColor_data()
740 {
888 {
741 }
889 }
742
890
743 // public QColor shadesColor() const
891 // public QColor shadesColor() const
744 void tst_QAbstractAxis::shadesColor()
892 void tst_QAbstractAxis::shadesColor()
745 {
893 {
746 QSKIP("Test is not implemented. This is deprecated function");
894 QSKIP("Test is not implemented. This is deprecated function");
747 }
895 }
748
896
749 void tst_QAbstractAxis::shadesPen_data()
897 void tst_QAbstractAxis::shadesPen_data()
750 {
898 {
751 QTest::addColumn<QPen>("shadesPen");
899 QTest::addColumn<QPen>("shadesPen");
752 QTest::newRow("null") << QPen();
900 QTest::newRow("null") << QPen();
753 QTest::newRow("blue") << QPen(Qt::blue);
901 QTest::newRow("blue") << QPen(Qt::blue);
754 QTest::newRow("black") << QPen(Qt::black);
902 QTest::newRow("black") << QPen(Qt::black);
755 QTest::newRow("red") << QPen(Qt::red);
903 QTest::newRow("red") << QPen(Qt::red);
756 }
904 }
757
905
758 void tst_QAbstractAxis::shadesPen()
906 void tst_QAbstractAxis::shadesPen()
759 {
907 {
760 QFETCH(QPen, shadesPen);
908 QFETCH(QPen, shadesPen);
761
909
762 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
910 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
763 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
911 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
764 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
912 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
765 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
913 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
766 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
914 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
767 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
915 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
768 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
916 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
769 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
917 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
770 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
918 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
771 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
919 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
920 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
921 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
772
922
773 m_axis->setShadesPen(shadesPen);
923 m_axis->setShadesPen(shadesPen);
774 QCOMPARE(m_axis->shadesPen(), shadesPen);
924 QCOMPARE(m_axis->shadesPen(), shadesPen);
775
925
776 QCOMPARE(spy0.count(), 0);
926 QCOMPARE(spy0.count(), 0);
777 QCOMPARE(spy1.count(), 0);
927 QCOMPARE(spy1.count(), 0);
778 QCOMPARE(spy2.count(), 0);
928 QCOMPARE(spy2.count(), 0);
779 QCOMPARE(spy3.count(), 0);
929 QCOMPARE(spy3.count(), 0);
780 QCOMPARE(spy4.count(), 0);
930 QCOMPARE(spy4.count(), 0);
781 QCOMPARE(spy5.count(), 0);
931 QCOMPARE(spy5.count(), 0);
782 QCOMPARE(spy6.count(), 0);
932 QCOMPARE(spy6.count(), 0);
783 QCOMPARE(spy7.count(), 0);
933 QCOMPARE(spy7.count(), 0);
784 QCOMPARE(spy8.count(), 0);
934 QCOMPARE(spy8.count(), 0);
785 QCOMPARE(spy9.count(), 0);
935 QCOMPARE(spy9.count(), 0);
936 QCOMPARE(spy10.count(), 0);
937 QCOMPARE(spy11.count(), 0);
786
938
787 m_chart->setAxisX(m_axis, m_series);
939 m_chart->setAxisX(m_axis, m_series);
788 m_view->show();
940 m_view->show();
789 QTest::qWaitForWindowShown(m_view);
941 QTest::qWaitForWindowShown(m_view);
790 QCOMPARE(m_axis->shadesPen(), shadesPen);
942 QCOMPARE(m_axis->shadesPen(), shadesPen);
791 }
943 }
792
944
793 void tst_QAbstractAxis::shadesVisible_data()
945 void tst_QAbstractAxis::shadesVisible_data()
794 {
946 {
795 QTest::addColumn<bool>("shadesVisible");
947 QTest::addColumn<bool>("shadesVisible");
796 QTest::newRow("true") << true;
948 QTest::newRow("true") << true;
797 QTest::newRow("false") << false;
949 QTest::newRow("false") << false;
798 }
950 }
799
951
800 void tst_QAbstractAxis::shadesVisible()
952 void tst_QAbstractAxis::shadesVisible()
801 {
953 {
802 QFETCH(bool, shadesVisible);
954 QFETCH(bool, shadesVisible);
803
955
804 m_axis->setShadesVisible(!shadesVisible);
956 m_axis->setShadesVisible(!shadesVisible);
805
957
806 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
958 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
807 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
959 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
808 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
960 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
809 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
961 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
810 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
962 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
811 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
963 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
812 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
964 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
813 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
965 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
814 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
966 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
815 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
967 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
968 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
969 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
816
970
817 m_axis->setShadesVisible(shadesVisible);
971 m_axis->setShadesVisible(shadesVisible);
818 QCOMPARE(m_axis->shadesVisible(), shadesVisible);
972 QCOMPARE(m_axis->shadesVisible(), shadesVisible);
819
973
820 QCOMPARE(spy0.count(), 0);
974 QCOMPARE(spy0.count(), 0);
821 QCOMPARE(spy1.count(), 0);
975 QCOMPARE(spy1.count(), 0);
822 QCOMPARE(spy2.count(), 0);
976 QCOMPARE(spy2.count(), 0);
823 QCOMPARE(spy3.count(), 0);
977 QCOMPARE(spy3.count(), 0);
824 QCOMPARE(spy4.count(), 0);
978 QCOMPARE(spy4.count(), 0);
825 QCOMPARE(spy5.count(), 0);
979 QCOMPARE(spy5.count(), 0);
826 QCOMPARE(spy6.count(), 0);
980 QCOMPARE(spy6.count(), 0);
827 QCOMPARE(spy7.count(), 1);
981 QCOMPARE(spy7.count(), 1);
828 QCOMPARE(spy8.count(), 0);
982 QCOMPARE(spy8.count(), 0);
829 QCOMPARE(spy9.count(), 0);
983 QCOMPARE(spy9.count(), 0);
984 QCOMPARE(spy10.count(), 0);
985 QCOMPARE(spy11.count(), 0);
830
986
831 m_chart->setAxisX(m_axis, m_series);
987 m_chart->setAxisX(m_axis, m_series);
832 m_view->show();
988 m_view->show();
833 QTest::qWaitForWindowShown(m_view);
989 QTest::qWaitForWindowShown(m_view);
834 QCOMPARE(m_axis->shadesVisible(), shadesVisible);
990 QCOMPARE(m_axis->shadesVisible(), shadesVisible);
835 }
991 }
836
992
837 void tst_QAbstractAxis::show_data()
993 void tst_QAbstractAxis::show_data()
838 {
994 {
839
995
840 }
996 }
841
997
842 void tst_QAbstractAxis::show()
998 void tst_QAbstractAxis::show()
843 {
999 {
844 m_axis->hide();
1000 m_axis->hide();
845 QCOMPARE(m_axis->isVisible(), false);
1001 QCOMPARE(m_axis->isVisible(), false);
846
1002
847 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
1003 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
848 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
1004 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
849 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
1005 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
850 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
1006 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
851 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
1007 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
852 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
1008 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
853 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
1009 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
854 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
1010 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
855 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
1011 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
856 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
1012 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
1013 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
1014 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
857
1015
858 m_axis->show();
1016 m_axis->show();
859
1017
860 QCOMPARE(spy0.count(), 0);
1018 QCOMPARE(spy0.count(), 0);
861 QCOMPARE(spy1.count(), 0);
1019 QCOMPARE(spy1.count(), 0);
862 QCOMPARE(spy2.count(), 0);
1020 QCOMPARE(spy2.count(), 0);
863 QCOMPARE(spy3.count(), 0);
1021 QCOMPARE(spy3.count(), 0);
864 QCOMPARE(spy4.count(), 0);
1022 QCOMPARE(spy4.count(), 0);
865 QCOMPARE(spy5.count(), 0);
1023 QCOMPARE(spy5.count(), 0);
866 QCOMPARE(spy6.count(), 0);
1024 QCOMPARE(spy6.count(), 0);
867 QCOMPARE(spy7.count(), 0);
1025 QCOMPARE(spy7.count(), 0);
868 QCOMPARE(spy8.count(), 1);
1026 QCOMPARE(spy8.count(), 1);
869 QCOMPARE(spy9.count(), 0);
1027 QCOMPARE(spy9.count(), 0);
1028 QCOMPARE(spy10.count(), 0);
1029 QCOMPARE(spy11.count(), 0);
870 QCOMPARE(m_axis->isVisible(), true);
1030 QCOMPARE(m_axis->isVisible(), true);
871 }
1031 }
872
1032
873 void tst_QAbstractAxis::hide_data()
1033 void tst_QAbstractAxis::hide_data()
874 {
1034 {
875
1035
876 }
1036 }
877
1037
878 void tst_QAbstractAxis::hide()
1038 void tst_QAbstractAxis::hide()
879 {
1039 {
880 m_axis->show();
1040 m_axis->show();
881 QCOMPARE(m_axis->isVisible(),true);
1041 QCOMPARE(m_axis->isVisible(),true);
882
1042
883 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
1043 QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool)));
884 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
1044 QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor)));
885 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
1045 QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool)));
886 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
1046 QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor)));
887 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
1047 QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool)));
888 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
1048 QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor)));
889 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
1049 QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor)));
890 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
1050 QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool)));
891 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
1051 QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool)));
892 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
1052 QSignalSpy spy9(m_axis, SIGNAL(minorGridVisibleChanged(bool)));
1053 QSignalSpy spy10(m_axis, SIGNAL(gridLineColorChanged(QColor)));
1054 QSignalSpy spy11(m_axis, SIGNAL(minorGridLineColorChanged(QColor)));
893
1055
894 m_axis->hide();
1056 m_axis->hide();
895
1057
896 QCOMPARE(spy0.count(), 0);
1058 QCOMPARE(spy0.count(), 0);
897 QCOMPARE(spy1.count(), 0);
1059 QCOMPARE(spy1.count(), 0);
898 QCOMPARE(spy2.count(), 0);
1060 QCOMPARE(spy2.count(), 0);
899 QCOMPARE(spy3.count(), 0);
1061 QCOMPARE(spy3.count(), 0);
900 QCOMPARE(spy4.count(), 0);
1062 QCOMPARE(spy4.count(), 0);
901 QCOMPARE(spy5.count(), 0);
1063 QCOMPARE(spy5.count(), 0);
902 QCOMPARE(spy6.count(), 0);
1064 QCOMPARE(spy6.count(), 0);
903 QCOMPARE(spy7.count(), 0);
1065 QCOMPARE(spy7.count(), 0);
904 QCOMPARE(spy8.count(), 1);
1066 QCOMPARE(spy8.count(), 1);
905 QCOMPARE(spy9.count(), 0);
1067 QCOMPARE(spy9.count(), 0);
1068 QCOMPARE(spy10.count(), 0);
1069 QCOMPARE(spy11.count(), 0);
906 QCOMPARE(m_axis->isVisible(),false);
1070 QCOMPARE(m_axis->isVisible(),false);
907 }
1071 }
908
1072
909
1073
910
1074
911
1075
912
1076
913
1077
914
1078
915
1079
916
1080
917
1081
918
1082
919
1083
@@ -1,98 +1,102
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #ifndef TST_QABSTRACTAXIS_H
19 #ifndef TST_QABSTRACTAXIS_H
20 #define TST_QABSTRACTAXIS_H
20 #define TST_QABSTRACTAXIS_H
21
21
22 #include <QtTest/QtTest>
22 #include <QtTest/QtTest>
23 #include <tst_definitions.h>
23 #include <tst_definitions.h>
24 #include <QtCharts/QAbstractAxis>
24 #include <QtCharts/QAbstractAxis>
25 #include <QtCharts/QChartView>
25 #include <QtCharts/QChartView>
26
26
27 QT_CHARTS_USE_NAMESPACE
27 QT_CHARTS_USE_NAMESPACE
28
28
29 class tst_QAbstractAxis : public QObject
29 class tst_QAbstractAxis : public QObject
30 {
30 {
31 Q_OBJECT
31 Q_OBJECT
32
32
33 public slots:
33 public slots:
34 virtual void initTestCase();
34 virtual void initTestCase();
35 virtual void cleanupTestCase();
35 virtual void cleanupTestCase();
36 virtual void init(QAbstractAxis* axis,QAbstractSeries* series);
36 virtual void init(QAbstractAxis* axis,QAbstractSeries* series);
37 virtual void cleanup();
37 virtual void cleanup();
38
38
39 private slots:
39 private slots:
40 void axisPen_data();
40 void axisPen_data();
41 void axisPen();
41 void axisPen();
42 void axisPenColor_data();
42 void axisPenColor_data();
43 void axisPenColor();
43 void axisPenColor();
44 void gridLinePen_data();
44 void gridLinePen_data();
45 void gridLinePen();
45 void gridLinePen();
46 void minorGridLinePen_data();
46 void minorGridLinePen_data();
47 void minorGridLinePen();
47 void minorGridLinePen();
48 void lineVisible_data();
48 void lineVisible_data();
49 void lineVisible();
49 void lineVisible();
50 void gridLineVisible_data();
50 void gridLineVisible_data();
51 void gridLineVisible();
51 void gridLineVisible();
52 void minorGridLineVisible_data();
52 void minorGridLineVisible_data();
53 void minorGridLineVisible();
53 void minorGridLineVisible();
54 void gridLineColor_data();
55 void gridLineColor();
56 void minorGridLineColor_data();
57 void minorGridLineColor();
54 void visible_data();
58 void visible_data();
55 void visible();
59 void visible();
56 void labelsAngle_data();
60 void labelsAngle_data();
57 void labelsAngle();
61 void labelsAngle();
58 void labelsBrush_data();
62 void labelsBrush_data();
59 void labelsBrush();
63 void labelsBrush();
60 void labelsColor_data();
64 void labelsColor_data();
61 void labelsColor();
65 void labelsColor();
62 void labelsFont_data();
66 void labelsFont_data();
63 void labelsFont();
67 void labelsFont();
64 void labelsVisible_data();
68 void labelsVisible_data();
65 void labelsVisible();
69 void labelsVisible();
66 void orientation_data();
70 void orientation_data();
67 void orientation();
71 void orientation();
68 void setMax_data();
72 void setMax_data();
69 void setMax();
73 void setMax();
70 void setMin_data();
74 void setMin_data();
71 void setMin();
75 void setMin();
72 void setRange_data();
76 void setRange_data();
73 void setRange();
77 void setRange();
74 void shadesBorderColor_data();
78 void shadesBorderColor_data();
75 void shadesBorderColor();
79 void shadesBorderColor();
76 void shadesBrush_data();
80 void shadesBrush_data();
77 void shadesBrush();
81 void shadesBrush();
78 void shadesColor_data();
82 void shadesColor_data();
79 void shadesColor();
83 void shadesColor();
80 void shadesPen_data();
84 void shadesPen_data();
81 void shadesPen();
85 void shadesPen();
82 void shadesVisible_data();
86 void shadesVisible_data();
83 void shadesVisible();
87 void shadesVisible();
84 void show_data();
88 void show_data();
85 void show();
89 void show();
86 void hide_data();
90 void hide_data();
87 void hide();
91 void hide();
88
92
89 protected:
93 protected:
90 void qabstractaxis();
94 void qabstractaxis();
91 protected:
95 protected:
92 QChartView* m_view;
96 QChartView* m_view;
93 QChart* m_chart;
97 QChart* m_chart;
94 QAbstractAxis* m_axis;
98 QAbstractAxis* m_axis;
95 QAbstractSeries* m_series;
99 QAbstractSeries* m_series;
96 };
100 };
97
101
98 #endif
102 #endif
@@ -1,1288 +1,1313
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #include "mainwindow.h"
19 #include "mainwindow.h"
20 #include "chartview.h"
20 #include "chartview.h"
21 #include <QtCharts/QScatterSeries>
21 #include <QtCharts/QScatterSeries>
22 #include <QtCharts/QLineSeries>
22 #include <QtCharts/QLineSeries>
23 #include <QtCharts/QSplineSeries>
23 #include <QtCharts/QSplineSeries>
24 #include <QtCharts/QAreaSeries>
24 #include <QtCharts/QAreaSeries>
25 #include <QtCharts/QBarSeries>
25 #include <QtCharts/QBarSeries>
26 #include <QtCharts/QBarSet>
26 #include <QtCharts/QBarSet>
27 #include <QtCharts/QValueAxis>
27 #include <QtCharts/QValueAxis>
28 #include <QtCharts/QLogValueAxis>
28 #include <QtCharts/QLogValueAxis>
29 #include <QtCharts/QDateTimeAxis>
29 #include <QtCharts/QDateTimeAxis>
30 #include <QtCharts/QCategoryAxis>
30 #include <QtCharts/QCategoryAxis>
31 #include <QtCharts/QPolarChart>
31 #include <QtCharts/QPolarChart>
32 #include <QtCore/QDebug>
32 #include <QtCore/QDebug>
33 #include <QtCore/QtMath>
33 #include <QtCore/QtMath>
34 #include <QtCore/QDateTime>
34 #include <QtCore/QDateTime>
35
35
36 QT_CHARTS_USE_NAMESPACE
36 QT_CHARTS_USE_NAMESPACE
37 #include "ui_mainwindow.h"
37 #include "ui_mainwindow.h"
38
38
39 MainWindow::MainWindow(QWidget *parent) :
39 MainWindow::MainWindow(QWidget *parent) :
40 QMainWindow(parent),
40 QMainWindow(parent),
41 ui(new Ui::MainWindow),
41 ui(new Ui::MainWindow),
42 m_angularTickCount(9),
42 m_angularTickCount(9),
43 m_radialTickCount(11),
43 m_radialTickCount(11),
44 m_labelsAngle(0),
44 m_labelsAngle(0),
45 m_angularMin(0.0),
45 m_angularMin(0.0),
46 m_angularMax(40000.0),
46 m_angularMax(40000.0),
47 m_radialMin(0.0),
47 m_radialMin(0.0),
48 m_radialMax(30000.0),
48 m_radialMax(30000.0),
49 m_angularShadesVisible(false),
49 m_angularShadesVisible(false),
50 m_radialShadesVisible(false),
50 m_radialShadesVisible(false),
51 m_labelsVisible(true),
51 m_labelsVisible(true),
52 m_titleVisible(true),
52 m_titleVisible(true),
53 m_gridVisible(true),
53 m_gridVisible(true),
54 m_arrowVisible(true),
54 m_arrowVisible(true),
55 m_minorGridVisible(true),
55 m_minorGridVisible(true),
56 m_minorArrowVisible(true),
56 m_minorArrowVisible(true),
57 m_angularShadesBrush(new QBrush(Qt::NoBrush)),
57 m_angularShadesBrush(new QBrush(Qt::NoBrush)),
58 m_radialShadesBrush(new QBrush(Qt::NoBrush)),
58 m_radialShadesBrush(new QBrush(Qt::NoBrush)),
59 m_labelBrush(new QBrush(Qt::black)),
59 m_labelBrush(new QBrush(Qt::black)),
60 m_titleBrush(new QBrush(Qt::black)),
60 m_titleBrush(new QBrush(Qt::black)),
61 m_backgroundBrush(new QBrush(Qt::white)),
61 m_backgroundBrush(new QBrush(Qt::white)),
62 m_plotAreaBackgroundBrush(new QBrush(Qt::NoBrush)),
62 m_plotAreaBackgroundBrush(new QBrush(Qt::NoBrush)),
63 m_angularShadesPen(new QPen(Qt::NoPen)),
63 m_angularShadesPen(new QPen(Qt::NoPen)),
64 m_radialShadesPen(new QPen(Qt::NoPen)),
64 m_radialShadesPen(new QPen(Qt::NoPen)),
65 m_gridPen(new QPen(QRgb(0x010101))), // Note: Pure black is default color, so it gets overridden by
65 m_gridPen(new QPen(QRgb(0x010101))), // Note: Pure black is default color, so it gets overridden by
66 m_arrowPen(new QPen(QRgb(0x010101))), // default theme if set to that initially. This is an example of workaround.
66 m_arrowPen(new QPen(QRgb(0x010101))), // default theme if set to that initially. This is an example of workaround.
67 m_minorGridPen(new QPen(QBrush(QRgb(0x010101)), 1, Qt::DashLine)),
67 m_minorGridPen(new QPen(QBrush(QRgb(0x010101)), 1, Qt::DashLine)),
68 m_backgroundPen(new QPen(Qt::NoPen)),
68 m_backgroundPen(new QPen(Qt::NoPen)),
69 m_plotAreaBackgroundPen(new QPen(Qt::NoPen)),
69 m_plotAreaBackgroundPen(new QPen(Qt::NoPen)),
70 m_labelFormat(QString("%.2f")),
70 m_labelFormat(QString("%.2f")),
71 m_animationOptions(QChart::NoAnimation),
71 m_animationOptions(QChart::NoAnimation),
72 m_angularTitle(QString("Angular Title")),
72 m_angularTitle(QString("Angular Title")),
73 m_radialTitle(QString("Radial Title")),
73 m_radialTitle(QString("Radial Title")),
74 m_base(2.0),
74 m_base(2.0),
75 m_dateFormat(QString("mm-ss-zzz")),
75 m_dateFormat(QString("mm-ss-zzz")),
76 m_chart(0),
76 m_chart(0),
77 m_angularAxis(0),
77 m_angularAxis(0),
78 m_radialAxis(0),
78 m_radialAxis(0),
79 m_angularAxisMode(AxisModeNone),
79 m_angularAxisMode(AxisModeNone),
80 m_radialAxisMode(AxisModeNone),
80 m_radialAxisMode(AxisModeNone),
81 m_moreCategories(false),
81 m_moreCategories(false),
82 m_series1(0),
82 m_series1(0),
83 m_series2(0),
83 m_series2(0),
84 m_series3(0),
84 m_series3(0),
85 m_series4(0),
85 m_series4(0),
86 m_series5(0),
86 m_series5(0),
87 m_series6(0),
87 m_series6(0),
88 m_series7(0)
88 m_series7(0)
89 {
89 {
90 ui->setupUi(this);
90 ui->setupUi(this);
91
91
92 ui->angularTicksSpin->setValue(m_angularTickCount);
92 ui->angularTicksSpin->setValue(m_angularTickCount);
93 ui->radialTicksSpin->setValue(m_radialTickCount);
93 ui->radialTicksSpin->setValue(m_radialTickCount);
94 ui->anglesSpin->setValue(m_labelsAngle);
94 ui->anglesSpin->setValue(m_labelsAngle);
95 ui->radialMinSpin->setValue(m_radialMin);
95 ui->radialMinSpin->setValue(m_radialMin);
96 ui->radialMaxSpin->setValue(m_radialMax);
96 ui->radialMaxSpin->setValue(m_radialMax);
97 ui->angularMinSpin->setValue(m_angularMin);
97 ui->angularMinSpin->setValue(m_angularMin);
98 ui->angularMaxSpin->setValue(m_angularMax);
98 ui->angularMaxSpin->setValue(m_angularMax);
99 ui->angularShadesComboBox->setCurrentIndex(0);
99 ui->angularShadesComboBox->setCurrentIndex(0);
100 ui->radialShadesComboBox->setCurrentIndex(0);
100 ui->radialShadesComboBox->setCurrentIndex(0);
101 ui->labelFormatEdit->setText(m_labelFormat);
101 ui->labelFormatEdit->setText(m_labelFormat);
102 ui->dateFormatEdit->setText(m_dateFormat);
102 ui->dateFormatEdit->setText(m_dateFormat);
103 ui->moreCategoriesCheckBox->setChecked(m_moreCategories);
103 ui->moreCategoriesCheckBox->setChecked(m_moreCategories);
104
104
105 ui->series1checkBox->setChecked(true);
105 ui->series1checkBox->setChecked(true);
106 ui->series2checkBox->setChecked(true);
106 ui->series2checkBox->setChecked(true);
107 ui->series3checkBox->setChecked(true);
107 ui->series3checkBox->setChecked(true);
108 ui->series4checkBox->setChecked(true);
108 ui->series4checkBox->setChecked(true);
109 ui->series5checkBox->setChecked(true);
109 ui->series5checkBox->setChecked(true);
110 ui->series6checkBox->setChecked(true);
110 ui->series6checkBox->setChecked(true);
111 ui->series7checkBox->setChecked(true);
111 ui->series7checkBox->setChecked(true);
112
112
113 m_currentLabelFont.setFamily(ui->labelFontComboBox->currentFont().family());
113 m_currentLabelFont.setFamily(ui->labelFontComboBox->currentFont().family());
114 m_currentLabelFont.setPixelSize(15);
114 m_currentLabelFont.setPixelSize(15);
115 m_currentTitleFont.setFamily(ui->titleFontComboBox->currentFont().family());
115 m_currentTitleFont.setFamily(ui->titleFontComboBox->currentFont().family());
116 m_currentTitleFont.setPixelSize(30);
116 m_currentTitleFont.setPixelSize(30);
117
117
118 ui->labelFontSizeSpin->setValue(m_currentLabelFont.pixelSize());
118 ui->labelFontSizeSpin->setValue(m_currentLabelFont.pixelSize());
119 ui->titleFontSizeSpin->setValue(m_currentTitleFont.pixelSize());
119 ui->titleFontSizeSpin->setValue(m_currentTitleFont.pixelSize());
120
120
121 ui->logBaseSpin->setValue(m_base);
121 ui->logBaseSpin->setValue(m_base);
122
122
123 initXYValueChart();
123 initXYValueChart();
124 setAngularAxis(AxisModeValue);
124 setAngularAxis(AxisModeValue);
125 setRadialAxis(AxisModeValue);
125 setRadialAxis(AxisModeValue);
126
126
127 ui->angularAxisComboBox->setCurrentIndex(int(m_angularAxisMode));
127 ui->angularAxisComboBox->setCurrentIndex(int(m_angularAxisMode));
128 ui->radialAxisComboBox->setCurrentIndex(int(m_radialAxisMode));
128 ui->radialAxisComboBox->setCurrentIndex(int(m_radialAxisMode));
129
129
130 connect(ui->angularTicksSpin, SIGNAL(valueChanged(int)),
130 connect(ui->angularTicksSpin, SIGNAL(valueChanged(int)),
131 this, SLOT(angularTicksChanged(int)));
131 this, SLOT(angularTicksChanged(int)));
132 connect(ui->radialTicksSpin, SIGNAL(valueChanged(int)),
132 connect(ui->radialTicksSpin, SIGNAL(valueChanged(int)),
133 this, SLOT(radialTicksChanged(int)));
133 this, SLOT(radialTicksChanged(int)));
134 connect(ui->angularMinorTicksSpin, SIGNAL(valueChanged(int)),
134 connect(ui->angularMinorTicksSpin, SIGNAL(valueChanged(int)),
135 this, SLOT(angularMinorTicksChanged(int)));
135 this, SLOT(angularMinorTicksChanged(int)));
136 connect(ui->radialMinorTicksSpin, SIGNAL(valueChanged(int)),
136 connect(ui->radialMinorTicksSpin, SIGNAL(valueChanged(int)),
137 this, SLOT(radialMinorTicksChanged(int)));
137 this, SLOT(radialMinorTicksChanged(int)));
138 connect(ui->anglesSpin, SIGNAL(valueChanged(int)),
138 connect(ui->anglesSpin, SIGNAL(valueChanged(int)),
139 this, SLOT(anglesChanged(int)));
139 this, SLOT(anglesChanged(int)));
140 connect(ui->radialMinSpin, SIGNAL(valueChanged(double)),
140 connect(ui->radialMinSpin, SIGNAL(valueChanged(double)),
141 this, SLOT(radialMinChanged(double)));
141 this, SLOT(radialMinChanged(double)));
142 connect(ui->radialMaxSpin, SIGNAL(valueChanged(double)),
142 connect(ui->radialMaxSpin, SIGNAL(valueChanged(double)),
143 this, SLOT(radialMaxChanged(double)));
143 this, SLOT(radialMaxChanged(double)));
144 connect(ui->angularMinSpin, SIGNAL(valueChanged(double)),
144 connect(ui->angularMinSpin, SIGNAL(valueChanged(double)),
145 this, SLOT(angularMinChanged(double)));
145 this, SLOT(angularMinChanged(double)));
146 connect(ui->angularMaxSpin, SIGNAL(valueChanged(double)),
146 connect(ui->angularMaxSpin, SIGNAL(valueChanged(double)),
147 this, SLOT(angularMaxChanged(double)));
147 this, SLOT(angularMaxChanged(double)));
148 connect(ui->angularShadesComboBox, SIGNAL(currentIndexChanged(int)),
148 connect(ui->angularShadesComboBox, SIGNAL(currentIndexChanged(int)),
149 this, SLOT(angularShadesIndexChanged(int)));
149 this, SLOT(angularShadesIndexChanged(int)));
150 connect(ui->radialShadesComboBox, SIGNAL(currentIndexChanged(int)),
150 connect(ui->radialShadesComboBox, SIGNAL(currentIndexChanged(int)),
151 this, SLOT(radialShadesIndexChanged(int)));
151 this, SLOT(radialShadesIndexChanged(int)));
152 connect(ui->animationsComboBox, SIGNAL(currentIndexChanged(int)),
152 connect(ui->animationsComboBox, SIGNAL(currentIndexChanged(int)),
153 this, SLOT(animationIndexChanged(int)));
153 this, SLOT(animationIndexChanged(int)));
154 connect(ui->labelFormatEdit, SIGNAL(textEdited(QString)),
154 connect(ui->labelFormatEdit, SIGNAL(textEdited(QString)),
155 this, SLOT(labelFormatEdited(QString)));
155 this, SLOT(labelFormatEdited(QString)));
156 connect(ui->labelFontComboBox, SIGNAL(currentFontChanged(QFont)),
156 connect(ui->labelFontComboBox, SIGNAL(currentFontChanged(QFont)),
157 this, SLOT(labelFontChanged(QFont)));
157 this, SLOT(labelFontChanged(QFont)));
158 connect(ui->labelFontSizeSpin, SIGNAL(valueChanged(int)),
158 connect(ui->labelFontSizeSpin, SIGNAL(valueChanged(int)),
159 this, SLOT(labelFontSizeChanged(int)));
159 this, SLOT(labelFontSizeChanged(int)));
160 connect(ui->labelComboBox, SIGNAL(currentIndexChanged(int)),
160 connect(ui->labelComboBox, SIGNAL(currentIndexChanged(int)),
161 this, SLOT(labelsIndexChanged(int)));
161 this, SLOT(labelsIndexChanged(int)));
162 connect(ui->titleFontComboBox, SIGNAL(currentFontChanged(QFont)),
162 connect(ui->titleFontComboBox, SIGNAL(currentFontChanged(QFont)),
163 this, SLOT(titleFontChanged(QFont)));
163 this, SLOT(titleFontChanged(QFont)));
164 connect(ui->titleFontSizeSpin, SIGNAL(valueChanged(int)),
164 connect(ui->titleFontSizeSpin, SIGNAL(valueChanged(int)),
165 this, SLOT(titleFontSizeChanged(int)));
165 this, SLOT(titleFontSizeChanged(int)));
166 connect(ui->titleComboBox, SIGNAL(currentIndexChanged(int)),
166 connect(ui->titleComboBox, SIGNAL(currentIndexChanged(int)),
167 this, SLOT(titleIndexChanged(int)));
167 this, SLOT(titleIndexChanged(int)));
168 connect(ui->gridComboBox, SIGNAL(currentIndexChanged(int)),
168 connect(ui->gridComboBox, SIGNAL(currentIndexChanged(int)),
169 this, SLOT(gridIndexChanged(int)));
169 this, SLOT(gridIndexChanged(int)));
170 connect(ui->minorGridComboBox, SIGNAL(currentIndexChanged(int)),
170 connect(ui->minorGridComboBox, SIGNAL(currentIndexChanged(int)),
171 this, SLOT(minorGridIndexChanged(int)));
171 this, SLOT(minorGridIndexChanged(int)));
172 connect(ui->gridLineColorComboBox, SIGNAL(currentIndexChanged(int)),
173 this, SLOT(gridLineColorIndexChanged(int)));
172 connect(ui->arrowComboBox, SIGNAL(currentIndexChanged(int)),
174 connect(ui->arrowComboBox, SIGNAL(currentIndexChanged(int)),
173 this, SLOT(arrowIndexChanged(int)));
175 this, SLOT(arrowIndexChanged(int)));
174 connect(ui->logBaseSpin, SIGNAL(valueChanged(double)),
176 connect(ui->logBaseSpin, SIGNAL(valueChanged(double)),
175 this, SLOT(logBaseChanged(double)));
177 this, SLOT(logBaseChanged(double)));
176 connect(ui->angularAxisComboBox, SIGNAL(currentIndexChanged(int)),
178 connect(ui->angularAxisComboBox, SIGNAL(currentIndexChanged(int)),
177 this, SLOT(angularAxisIndexChanged(int)));
179 this, SLOT(angularAxisIndexChanged(int)));
178 connect(ui->radialAxisComboBox, SIGNAL(currentIndexChanged(int)),
180 connect(ui->radialAxisComboBox, SIGNAL(currentIndexChanged(int)),
179 this, SLOT(radialAxisIndexChanged(int)));
181 this, SLOT(radialAxisIndexChanged(int)));
180 connect(ui->niceNumbersCheckBox, SIGNAL(clicked()),
182 connect(ui->niceNumbersCheckBox, SIGNAL(clicked()),
181 this, SLOT(niceNumbersChecked()));
183 this, SLOT(niceNumbersChecked()));
182 connect(ui->dateFormatEdit, SIGNAL(textEdited(QString)),
184 connect(ui->dateFormatEdit, SIGNAL(textEdited(QString)),
183 this, SLOT(dateFormatEdited(QString)));
185 this, SLOT(dateFormatEdited(QString)));
184 connect(ui->moreCategoriesCheckBox, SIGNAL(clicked()),
186 connect(ui->moreCategoriesCheckBox, SIGNAL(clicked()),
185 this, SLOT(moreCategoriesChecked()));
187 this, SLOT(moreCategoriesChecked()));
186 connect(ui->categoryLabelLocationCheckBox, SIGNAL(clicked()),
188 connect(ui->categoryLabelLocationCheckBox, SIGNAL(clicked()),
187 this, SLOT(categoryLabelLocationChecked()));
189 this, SLOT(categoryLabelLocationChecked()));
188 connect(ui->series1checkBox, SIGNAL(clicked()),
190 connect(ui->series1checkBox, SIGNAL(clicked()),
189 this, SLOT(series1CheckBoxChecked()));
191 this, SLOT(series1CheckBoxChecked()));
190 connect(ui->series2checkBox, SIGNAL(clicked()),
192 connect(ui->series2checkBox, SIGNAL(clicked()),
191 this, SLOT(series2CheckBoxChecked()));
193 this, SLOT(series2CheckBoxChecked()));
192 connect(ui->series3checkBox, SIGNAL(clicked()),
194 connect(ui->series3checkBox, SIGNAL(clicked()),
193 this, SLOT(series3CheckBoxChecked()));
195 this, SLOT(series3CheckBoxChecked()));
194 connect(ui->series4checkBox, SIGNAL(clicked()),
196 connect(ui->series4checkBox, SIGNAL(clicked()),
195 this, SLOT(series4CheckBoxChecked()));
197 this, SLOT(series4CheckBoxChecked()));
196 connect(ui->series5checkBox, SIGNAL(clicked()),
198 connect(ui->series5checkBox, SIGNAL(clicked()),
197 this, SLOT(series5CheckBoxChecked()));
199 this, SLOT(series5CheckBoxChecked()));
198 connect(ui->series6checkBox, SIGNAL(clicked()),
200 connect(ui->series6checkBox, SIGNAL(clicked()),
199 this, SLOT(series6CheckBoxChecked()));
201 this, SLOT(series6CheckBoxChecked()));
200 connect(ui->series7checkBox, SIGNAL(clicked()),
202 connect(ui->series7checkBox, SIGNAL(clicked()),
201 this, SLOT(series7CheckBoxChecked()));
203 this, SLOT(series7CheckBoxChecked()));
202 connect(ui->themeComboBox, SIGNAL(currentIndexChanged(int)),
204 connect(ui->themeComboBox, SIGNAL(currentIndexChanged(int)),
203 this, SLOT(themeIndexChanged(int)));
205 this, SLOT(themeIndexChanged(int)));
204 connect(ui->backgroundComboBox, SIGNAL(currentIndexChanged(int)),
206 connect(ui->backgroundComboBox, SIGNAL(currentIndexChanged(int)),
205 this, SLOT(backgroundIndexChanged(int)));
207 this, SLOT(backgroundIndexChanged(int)));
206 connect(ui->plotAreaComboBox, SIGNAL(currentIndexChanged(int)),
208 connect(ui->plotAreaComboBox, SIGNAL(currentIndexChanged(int)),
207 this, SLOT(plotAreaIndexChanged(int)));
209 this, SLOT(plotAreaIndexChanged(int)));
208
210
209 ui->chartView->setChart(m_chart);
211 ui->chartView->setChart(m_chart);
210 ui->chartView->setRenderHint(QPainter::Antialiasing);
212 ui->chartView->setRenderHint(QPainter::Antialiasing);
211 }
213 }
212
214
213 MainWindow::~MainWindow()
215 MainWindow::~MainWindow()
214 {
216 {
215 delete ui;
217 delete ui;
216 delete m_angularShadesBrush;
218 delete m_angularShadesBrush;
217 delete m_radialShadesBrush;
219 delete m_radialShadesBrush;
218 delete m_angularShadesPen;
220 delete m_angularShadesPen;
219 delete m_radialShadesPen;
221 delete m_radialShadesPen;
220 }
222 }
221
223
222 void MainWindow::initXYValueChart()
224 void MainWindow::initXYValueChart()
223 {
225 {
224 qreal seriesAngularMin = 1;
226 qreal seriesAngularMin = 1;
225 qreal seriesAngularMax = 46000;
227 qreal seriesAngularMax = 46000;
226 qreal seriesRadialMin = 1;
228 qreal seriesRadialMin = 1;
227 qreal seriesRadialMax = 23500;
229 qreal seriesRadialMax = 23500;
228 qreal radialDimension = seriesRadialMax - seriesRadialMin;
230 qreal radialDimension = seriesRadialMax - seriesRadialMin;
229 qreal angularDimension = seriesAngularMax - seriesAngularMin;
231 qreal angularDimension = seriesAngularMax - seriesAngularMin;
230
232
231 // Scatter series, points outside min-max ranges should not be drawn
233 // Scatter series, points outside min-max ranges should not be drawn
232 m_series1 = new QScatterSeries();
234 m_series1 = new QScatterSeries();
233 m_series1->setName("scatter");
235 m_series1->setName("scatter");
234 qreal scatterCount = 10;
236 qreal scatterCount = 10;
235 qreal scatterAngularStep = angularDimension / scatterCount;
237 qreal scatterAngularStep = angularDimension / scatterCount;
236 qreal scatterRadialStep = radialDimension / scatterCount;
238 qreal scatterRadialStep = radialDimension / scatterCount;
237 for (qreal i = 0.0; i < scatterCount; i++) {
239 for (qreal i = 0.0; i < scatterCount; i++) {
238 m_series1->append((i * scatterAngularStep) + seriesAngularMin, (i * scatterRadialStep) + seriesRadialMin);
240 m_series1->append((i * scatterAngularStep) + seriesAngularMin, (i * scatterRadialStep) + seriesRadialMin);
239 //qDebug() << m_series1->points().last();
241 //qDebug() << m_series1->points().last();
240 }
242 }
241 m_series1->setMarkerSize(10);
243 m_series1->setMarkerSize(10);
242 *m_series1 << QPointF(50, 50) << QPointF(150, 150) << QPointF(250, 250) << QPointF(350, 350) << QPointF(450, 450);
244 *m_series1 << QPointF(50, 50) << QPointF(150, 150) << QPointF(250, 250) << QPointF(350, 350) << QPointF(450, 450);
243 *m_series1 << QPointF(1050, 0.50) << QPointF(1150, 0.25) << QPointF(1250, 0.12) << QPointF(1350, 0.075) << QPointF(1450, 0.036);
245 *m_series1 << QPointF(1050, 0.50) << QPointF(1150, 0.25) << QPointF(1250, 0.12) << QPointF(1350, 0.075) << QPointF(1450, 0.036);
244 *m_series1 << QPointF(0.50, 2000) << QPointF(0.25, 3500) << QPointF(0.12, 5000) << QPointF(0.075, 6500) << QPointF(0.036, 8000);
246 *m_series1 << QPointF(0.50, 2000) << QPointF(0.25, 3500) << QPointF(0.12, 5000) << QPointF(0.075, 6500) << QPointF(0.036, 8000);
245
247
246 // Line series, points outside min-max ranges should not be drawn,
248 // Line series, points outside min-max ranges should not be drawn,
247 // but lines should be properly interpolated at chart edges
249 // but lines should be properly interpolated at chart edges
248 m_series2 = new QLineSeries();
250 m_series2 = new QLineSeries();
249 m_series2->setName("line 1");
251 m_series2->setName("line 1");
250 qreal lineCount = 100;
252 qreal lineCount = 100;
251 qreal lineAngularStep = angularDimension / lineCount;
253 qreal lineAngularStep = angularDimension / lineCount;
252 qreal lineRadialStep = radialDimension / lineCount;
254 qreal lineRadialStep = radialDimension / lineCount;
253 for (qreal i = 0.0; i < lineCount; i++) {
255 for (qreal i = 0.0; i < lineCount; i++) {
254 m_series2->append((i * lineAngularStep) + seriesAngularMin, (i * lineRadialStep) + seriesRadialMin);
256 m_series2->append((i * lineAngularStep) + seriesAngularMin, (i * lineRadialStep) + seriesRadialMin);
255 //qDebug() << m_series2->points().last();
257 //qDebug() << m_series2->points().last();
256 }
258 }
257 QPen series2Pen = QPen(Qt::blue, 10);
259 QPen series2Pen = QPen(Qt::blue, 10);
258 //series2Pen.setStyle(Qt::DashDotDotLine);
260 //series2Pen.setStyle(Qt::DashDotDotLine);
259 m_series2->setPen(series2Pen);
261 m_series2->setPen(series2Pen);
260
262
261 m_series3 = new QLineSeries();
263 m_series3 = new QLineSeries();
262 m_series3->setName("Area upper");
264 m_series3->setName("Area upper");
263 lineCount = 87;
265 lineCount = 87;
264 lineAngularStep = angularDimension / lineCount;
266 lineAngularStep = angularDimension / lineCount;
265 lineRadialStep = radialDimension / lineCount;
267 lineRadialStep = radialDimension / lineCount;
266 for (qreal i = 1.0; i <= lineCount; i++) {
268 for (qreal i = 1.0; i <= lineCount; i++) {
267 m_series3->append((i * lineAngularStep) + seriesAngularMin, (i * lineRadialStep) + seriesRadialMin + 200.0);
269 m_series3->append((i * lineAngularStep) + seriesAngularMin, (i * lineRadialStep) + seriesRadialMin + 200.0);
268 //qDebug() << m_series3->points().last();
270 //qDebug() << m_series3->points().last();
269 }
271 }
270
272
271 m_series4 = new QLineSeries();
273 m_series4 = new QLineSeries();
272 m_series4->setName("Area lower");
274 m_series4->setName("Area lower");
273 lineCount = 89;
275 lineCount = 89;
274 lineAngularStep = angularDimension / lineCount;
276 lineAngularStep = angularDimension / lineCount;
275 lineRadialStep = radialDimension / lineCount;
277 lineRadialStep = radialDimension / lineCount;
276 for (qreal i = 1.0; i <= lineCount; i++) {
278 for (qreal i = 1.0; i <= lineCount; i++) {
277 m_series4->append((i * lineAngularStep) + seriesAngularMin + 100.0, (i * lineRadialStep) + seriesRadialMin + i * 300.0);
279 m_series4->append((i * lineAngularStep) + seriesAngularMin + 100.0, (i * lineRadialStep) + seriesRadialMin + i * 300.0);
278 //qDebug() << m_series4->points().last();
280 //qDebug() << m_series4->points().last();
279 }
281 }
280
282
281 m_series5 = new QAreaSeries();
283 m_series5 = new QAreaSeries();
282 m_series5->setName("area");
284 m_series5->setName("area");
283 m_series5->setUpperSeries(m_series3);
285 m_series5->setUpperSeries(m_series3);
284 m_series5->setLowerSeries(m_series4);
286 m_series5->setLowerSeries(m_series4);
285 m_series5->setOpacity(0.5);
287 m_series5->setOpacity(0.5);
286
288
287 m_series6 = new QSplineSeries();
289 m_series6 = new QSplineSeries();
288 m_series6->setName("spline");
290 m_series6->setName("spline");
289 qreal ad = angularDimension / 20;
291 qreal ad = angularDimension / 20;
290 qreal rd = radialDimension / 10;
292 qreal rd = radialDimension / 10;
291 m_series6->append(seriesAngularMin, seriesRadialMin + rd * 2);
293 m_series6->append(seriesAngularMin, seriesRadialMin + rd * 2);
292 m_series6->append(seriesAngularMin + ad, seriesRadialMin + rd * 5);
294 m_series6->append(seriesAngularMin + ad, seriesRadialMin + rd * 5);
293 m_series6->append(seriesAngularMin + ad * 2, seriesRadialMin + rd * 4);
295 m_series6->append(seriesAngularMin + ad * 2, seriesRadialMin + rd * 4);
294 m_series6->append(seriesAngularMin + ad * 3, seriesRadialMin + rd * 9);
296 m_series6->append(seriesAngularMin + ad * 3, seriesRadialMin + rd * 9);
295 m_series6->append(seriesAngularMin + ad * 4, seriesRadialMin + rd * 11);
297 m_series6->append(seriesAngularMin + ad * 4, seriesRadialMin + rd * 11);
296 m_series6->append(seriesAngularMin + ad * 5, seriesRadialMin + rd * 12);
298 m_series6->append(seriesAngularMin + ad * 5, seriesRadialMin + rd * 12);
297 m_series6->append(seriesAngularMin + ad * 6, seriesRadialMin + rd * 9);
299 m_series6->append(seriesAngularMin + ad * 6, seriesRadialMin + rd * 9);
298 m_series6->append(seriesAngularMin + ad * 7, seriesRadialMin + rd * 11);
300 m_series6->append(seriesAngularMin + ad * 7, seriesRadialMin + rd * 11);
299 m_series6->append(seriesAngularMin + ad * 8, seriesRadialMin + rd * 12);
301 m_series6->append(seriesAngularMin + ad * 8, seriesRadialMin + rd * 12);
300 m_series6->append(seriesAngularMin + ad * 9, seriesRadialMin + rd * 6);
302 m_series6->append(seriesAngularMin + ad * 9, seriesRadialMin + rd * 6);
301 m_series6->append(seriesAngularMin + ad * 10, seriesRadialMin + rd * 4);
303 m_series6->append(seriesAngularMin + ad * 10, seriesRadialMin + rd * 4);
302 m_series6->append(seriesAngularMin + ad * 10, seriesRadialMin + rd * 8);
304 m_series6->append(seriesAngularMin + ad * 10, seriesRadialMin + rd * 8);
303 m_series6->append(seriesAngularMin + ad * 11, seriesRadialMin + rd * 9);
305 m_series6->append(seriesAngularMin + ad * 11, seriesRadialMin + rd * 9);
304 m_series6->append(seriesAngularMin + ad * 12, seriesRadialMin + rd * 11);
306 m_series6->append(seriesAngularMin + ad * 12, seriesRadialMin + rd * 11);
305 m_series6->append(seriesAngularMin + ad * 13, seriesRadialMin + rd * 12);
307 m_series6->append(seriesAngularMin + ad * 13, seriesRadialMin + rd * 12);
306 m_series6->append(seriesAngularMin + ad * 14, seriesRadialMin + rd * 6);
308 m_series6->append(seriesAngularMin + ad * 14, seriesRadialMin + rd * 6);
307 m_series6->append(seriesAngularMin + ad * 15, seriesRadialMin + rd * 3);
309 m_series6->append(seriesAngularMin + ad * 15, seriesRadialMin + rd * 3);
308 m_series6->append(seriesAngularMin + ad * 16, seriesRadialMin + rd * 2);
310 m_series6->append(seriesAngularMin + ad * 16, seriesRadialMin + rd * 2);
309 m_series6->append(seriesAngularMin + ad * 17, seriesRadialMin + rd * 6);
311 m_series6->append(seriesAngularMin + ad * 17, seriesRadialMin + rd * 6);
310 m_series6->append(seriesAngularMin + ad * 18, seriesRadialMin + rd * 6);
312 m_series6->append(seriesAngularMin + ad * 18, seriesRadialMin + rd * 6);
311 m_series6->append(seriesAngularMin + ad * 19, seriesRadialMin + rd * 6);
313 m_series6->append(seriesAngularMin + ad * 19, seriesRadialMin + rd * 6);
312 m_series6->append(seriesAngularMin + ad * 20, seriesRadialMin + rd * 6);
314 m_series6->append(seriesAngularMin + ad * 20, seriesRadialMin + rd * 6);
313 m_series6->append(seriesAngularMin + ad * 19, seriesRadialMin + rd * 2);
315 m_series6->append(seriesAngularMin + ad * 19, seriesRadialMin + rd * 2);
314 m_series6->append(seriesAngularMin + ad * 18, seriesRadialMin + rd * 9);
316 m_series6->append(seriesAngularMin + ad * 18, seriesRadialMin + rd * 9);
315 m_series6->append(seriesAngularMin + ad * 17, seriesRadialMin + rd * 7);
317 m_series6->append(seriesAngularMin + ad * 17, seriesRadialMin + rd * 7);
316 m_series6->append(seriesAngularMin + ad * 16, seriesRadialMin + rd * 3);
318 m_series6->append(seriesAngularMin + ad * 16, seriesRadialMin + rd * 3);
317 m_series6->append(seriesAngularMin + ad * 15, seriesRadialMin + rd * 1);
319 m_series6->append(seriesAngularMin + ad * 15, seriesRadialMin + rd * 1);
318 m_series6->append(seriesAngularMin + ad * 14, seriesRadialMin + rd * 7);
320 m_series6->append(seriesAngularMin + ad * 14, seriesRadialMin + rd * 7);
319 m_series6->append(seriesAngularMin + ad * 13, seriesRadialMin + rd * 5);
321 m_series6->append(seriesAngularMin + ad * 13, seriesRadialMin + rd * 5);
320 m_series6->append(seriesAngularMin + ad * 12, seriesRadialMin + rd * 9);
322 m_series6->append(seriesAngularMin + ad * 12, seriesRadialMin + rd * 9);
321 m_series6->append(seriesAngularMin + ad * 11, seriesRadialMin + rd * 1);
323 m_series6->append(seriesAngularMin + ad * 11, seriesRadialMin + rd * 1);
322 m_series6->append(seriesAngularMin + ad * 10, seriesRadialMin + rd * 4);
324 m_series6->append(seriesAngularMin + ad * 10, seriesRadialMin + rd * 4);
323 m_series6->append(seriesAngularMin + ad * 9, seriesRadialMin + rd * 1);
325 m_series6->append(seriesAngularMin + ad * 9, seriesRadialMin + rd * 1);
324 m_series6->append(seriesAngularMin + ad * 8, seriesRadialMin + rd * 2);
326 m_series6->append(seriesAngularMin + ad * 8, seriesRadialMin + rd * 2);
325 m_series6->append(seriesAngularMin + ad * 7, seriesRadialMin + rd * 4);
327 m_series6->append(seriesAngularMin + ad * 7, seriesRadialMin + rd * 4);
326 m_series6->append(seriesAngularMin + ad * 6, seriesRadialMin + rd * 8);
328 m_series6->append(seriesAngularMin + ad * 6, seriesRadialMin + rd * 8);
327 m_series6->append(seriesAngularMin + ad * 5, seriesRadialMin + rd * 12);
329 m_series6->append(seriesAngularMin + ad * 5, seriesRadialMin + rd * 12);
328 m_series6->append(seriesAngularMin + ad * 4, seriesRadialMin + rd * 9);
330 m_series6->append(seriesAngularMin + ad * 4, seriesRadialMin + rd * 9);
329 m_series6->append(seriesAngularMin + ad * 3, seriesRadialMin + rd * 8);
331 m_series6->append(seriesAngularMin + ad * 3, seriesRadialMin + rd * 8);
330 m_series6->append(seriesAngularMin + ad * 2, seriesRadialMin + rd * 7);
332 m_series6->append(seriesAngularMin + ad * 2, seriesRadialMin + rd * 7);
331 m_series6->append(seriesAngularMin + ad, seriesRadialMin + rd * 4);
333 m_series6->append(seriesAngularMin + ad, seriesRadialMin + rd * 4);
332 m_series6->append(seriesAngularMin, seriesRadialMin + rd * 10);
334 m_series6->append(seriesAngularMin, seriesRadialMin + rd * 10);
333
335
334 m_series6->setPointsVisible(true);
336 m_series6->setPointsVisible(true);
335 QPen series6Pen = QPen(Qt::red, 10);
337 QPen series6Pen = QPen(Qt::red, 10);
336 //series6Pen.setStyle(Qt::DashDotDotLine);
338 //series6Pen.setStyle(Qt::DashDotDotLine);
337 m_series6->setPen(series6Pen);
339 m_series6->setPen(series6Pen);
338
340
339 // m_series7 shows points at category intersections
341 // m_series7 shows points at category intersections
340 m_series7 = new QScatterSeries();
342 m_series7 = new QScatterSeries();
341 m_series7->setName("Category check");
343 m_series7->setName("Category check");
342 m_series7->setMarkerSize(7);
344 m_series7->setMarkerSize(7);
343 m_series7->setBrush(QColor(Qt::red));
345 m_series7->setBrush(QColor(Qt::red));
344 m_series7->setMarkerShape(QScatterSeries::MarkerShapeRectangle);
346 m_series7->setMarkerShape(QScatterSeries::MarkerShapeRectangle);
345 *m_series7 << QPointF(1000, 1000)
347 *m_series7 << QPointF(1000, 1000)
346 << QPointF(1000, 2000)
348 << QPointF(1000, 2000)
347 << QPointF(1000, 4000)
349 << QPointF(1000, 4000)
348 << QPointF(1000, 9000)
350 << QPointF(1000, 9000)
349 << QPointF(1000, 14000)
351 << QPointF(1000, 14000)
350 << QPointF(1000, 16500)
352 << QPointF(1000, 16500)
351 << QPointF(1000, 19000)
353 << QPointF(1000, 19000)
352
354
353 << QPointF(4000, 1000)
355 << QPointF(4000, 1000)
354 << QPointF(4000, 2000)
356 << QPointF(4000, 2000)
355 << QPointF(4000, 4000)
357 << QPointF(4000, 4000)
356 << QPointF(4000, 9000)
358 << QPointF(4000, 9000)
357 << QPointF(4000, 14000)
359 << QPointF(4000, 14000)
358 << QPointF(4000, 16500)
360 << QPointF(4000, 16500)
359 << QPointF(4000, 19000)
361 << QPointF(4000, 19000)
360
362
361 << QPointF(7000, 1000)
363 << QPointF(7000, 1000)
362 << QPointF(7000, 2000)
364 << QPointF(7000, 2000)
363 << QPointF(7000, 4000)
365 << QPointF(7000, 4000)
364 << QPointF(7000, 9000)
366 << QPointF(7000, 9000)
365 << QPointF(7000, 14000)
367 << QPointF(7000, 14000)
366 << QPointF(7000, 16500)
368 << QPointF(7000, 16500)
367 << QPointF(7000, 19000)
369 << QPointF(7000, 19000)
368
370
369 << QPointF(12000, 1000)
371 << QPointF(12000, 1000)
370 << QPointF(12000, 2000)
372 << QPointF(12000, 2000)
371 << QPointF(12000, 4000)
373 << QPointF(12000, 4000)
372 << QPointF(12000, 9000)
374 << QPointF(12000, 9000)
373 << QPointF(12000, 14000)
375 << QPointF(12000, 14000)
374 << QPointF(12000, 16500)
376 << QPointF(12000, 16500)
375 << QPointF(12000, 19000)
377 << QPointF(12000, 19000)
376
378
377 << QPointF(17000, 1000)
379 << QPointF(17000, 1000)
378 << QPointF(17000, 2000)
380 << QPointF(17000, 2000)
379 << QPointF(17000, 4000)
381 << QPointF(17000, 4000)
380 << QPointF(17000, 9000)
382 << QPointF(17000, 9000)
381 << QPointF(17000, 14000)
383 << QPointF(17000, 14000)
382 << QPointF(17000, 16500)
384 << QPointF(17000, 16500)
383 << QPointF(17000, 19000)
385 << QPointF(17000, 19000)
384
386
385 << QPointF(22000, 1000)
387 << QPointF(22000, 1000)
386 << QPointF(22000, 2000)
388 << QPointF(22000, 2000)
387 << QPointF(22000, 4000)
389 << QPointF(22000, 4000)
388 << QPointF(22000, 9000)
390 << QPointF(22000, 9000)
389 << QPointF(22000, 14000)
391 << QPointF(22000, 14000)
390 << QPointF(22000, 16500)
392 << QPointF(22000, 16500)
391 << QPointF(22000, 19000)
393 << QPointF(22000, 19000)
392
394
393 << QPointF(28000, 1000)
395 << QPointF(28000, 1000)
394 << QPointF(28000, 2000)
396 << QPointF(28000, 2000)
395 << QPointF(28000, 4000)
397 << QPointF(28000, 4000)
396 << QPointF(28000, 9000)
398 << QPointF(28000, 9000)
397 << QPointF(28000, 14000)
399 << QPointF(28000, 14000)
398 << QPointF(28000, 16500)
400 << QPointF(28000, 16500)
399 << QPointF(28000, 19000);
401 << QPointF(28000, 19000);
400
402
401 m_chart = new QPolarChart();
403 m_chart = new QPolarChart();
402
404
403 m_chart->addSeries(m_series1);
405 m_chart->addSeries(m_series1);
404 m_chart->addSeries(m_series2);
406 m_chart->addSeries(m_series2);
405 m_chart->addSeries(m_series3);
407 m_chart->addSeries(m_series3);
406 m_chart->addSeries(m_series4);
408 m_chart->addSeries(m_series4);
407 m_chart->addSeries(m_series5);
409 m_chart->addSeries(m_series5);
408 m_chart->addSeries(m_series6);
410 m_chart->addSeries(m_series6);
409 m_chart->addSeries(m_series7);
411 m_chart->addSeries(m_series7);
410
412
411 connect(m_series1, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
413 connect(m_series1, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
412 connect(m_series2, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
414 connect(m_series2, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
413 connect(m_series3, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
415 connect(m_series3, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
414 connect(m_series4, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
416 connect(m_series4, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
415 connect(m_series5, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
417 connect(m_series5, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
416 connect(m_series6, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
418 connect(m_series6, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
417 connect(m_series7, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
419 connect(m_series7, SIGNAL(clicked(QPointF)), this, SLOT(seriesClicked(QPointF)));
418 connect(m_series1, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
420 connect(m_series1, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
419 connect(m_series2, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
421 connect(m_series2, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
420 connect(m_series3, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
422 connect(m_series3, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
421 connect(m_series4, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
423 connect(m_series4, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
422 connect(m_series5, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
424 connect(m_series5, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
423 connect(m_series6, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
425 connect(m_series6, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
424 connect(m_series7, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
426 connect(m_series7, SIGNAL(hovered(QPointF, bool)), this, SLOT(seriesHovered(QPointF, bool)));
425
427
426 m_chart->setTitle("Use arrow keys to scroll and +/- to zoom");
428 m_chart->setTitle("Use arrow keys to scroll and +/- to zoom");
427 m_chart->setAnimationOptions(m_animationOptions);
429 m_chart->setAnimationOptions(m_animationOptions);
428 //m_chart->legend()->setVisible(false);
430 //m_chart->legend()->setVisible(false);
429 m_chart->setAcceptHoverEvents(true);
431 m_chart->setAcceptHoverEvents(true);
430 m_chart->setBackgroundBrush(*m_backgroundBrush);
432 m_chart->setBackgroundBrush(*m_backgroundBrush);
431 m_chart->setBackgroundPen(*m_backgroundPen);
433 m_chart->setBackgroundPen(*m_backgroundPen);
432 m_chart->setPlotAreaBackgroundBrush(*m_plotAreaBackgroundBrush);
434 m_chart->setPlotAreaBackgroundBrush(*m_plotAreaBackgroundBrush);
433 m_chart->setPlotAreaBackgroundPen(*m_plotAreaBackgroundPen);
435 m_chart->setPlotAreaBackgroundPen(*m_plotAreaBackgroundPen);
434 }
436 }
435
437
436 void MainWindow::setAngularAxis(MainWindow::AxisMode mode)
438 void MainWindow::setAngularAxis(MainWindow::AxisMode mode)
437 {
439 {
438 if (m_angularAxis) {
440 if (m_angularAxis) {
439 m_chart->removeAxis(m_angularAxis);
441 m_chart->removeAxis(m_angularAxis);
440 delete m_angularAxis;
442 delete m_angularAxis;
441 m_angularAxis = 0;
443 m_angularAxis = 0;
442 }
444 }
443
445
444 m_angularAxisMode = mode;
446 m_angularAxisMode = mode;
445
447
446 switch (m_angularAxisMode) {
448 switch (m_angularAxisMode) {
447 case AxisModeNone:
449 case AxisModeNone:
448 return;
450 return;
449 case AxisModeValue:
451 case AxisModeValue:
450 m_angularAxis = new QValueAxis();
452 m_angularAxis = new QValueAxis();
451 static_cast<QValueAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
453 static_cast<QValueAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
452 static_cast<QValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
454 static_cast<QValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
453 break;
455 break;
454 case AxisModeLogValue:
456 case AxisModeLogValue:
455 m_angularAxis = new QLogValueAxis();
457 m_angularAxis = new QLogValueAxis();
456 static_cast<QLogValueAxis *>(m_angularAxis)->setBase(m_base);
458 static_cast<QLogValueAxis *>(m_angularAxis)->setBase(m_base);
457 static_cast<QLogValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
459 static_cast<QLogValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
458 break;
460 break;
459 case AxisModeDateTime:
461 case AxisModeDateTime:
460 m_angularAxis = new QDateTimeAxis();
462 m_angularAxis = new QDateTimeAxis();
461 static_cast<QDateTimeAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
463 static_cast<QDateTimeAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
462 static_cast<QDateTimeAxis *>(m_angularAxis)->setFormat(m_dateFormat);
464 static_cast<QDateTimeAxis *>(m_angularAxis)->setFormat(m_dateFormat);
463 break;
465 break;
464 case AxisModeCategory:
466 case AxisModeCategory:
465 m_angularAxis = new QCategoryAxis();
467 m_angularAxis = new QCategoryAxis();
466 applyCategories();
468 applyCategories();
467 break;
469 break;
468 default:
470 default:
469 qWarning() << "Unsupported AxisMode";
471 qWarning() << "Unsupported AxisMode";
470 break;
472 break;
471 }
473 }
472
474
473 m_angularAxis->setLabelsAngle(m_labelsAngle);
475 m_angularAxis->setLabelsAngle(m_labelsAngle);
474 m_angularAxis->setLabelsFont(m_currentLabelFont);
476 m_angularAxis->setLabelsFont(m_currentLabelFont);
475 m_angularAxis->setLabelsBrush(*m_labelBrush);
477 m_angularAxis->setLabelsBrush(*m_labelBrush);
476 m_angularAxis->setLabelsVisible(m_labelsVisible);
478 m_angularAxis->setLabelsVisible(m_labelsVisible);
477 m_angularAxis->setShadesBrush(*m_angularShadesBrush);
479 m_angularAxis->setShadesBrush(*m_angularShadesBrush);
478 m_angularAxis->setShadesPen(*m_angularShadesPen);
480 m_angularAxis->setShadesPen(*m_angularShadesPen);
479 m_angularAxis->setShadesVisible(m_angularShadesVisible);
481 m_angularAxis->setShadesVisible(m_angularShadesVisible);
480 m_angularAxis->setTitleFont(m_currentTitleFont);
482 m_angularAxis->setTitleFont(m_currentTitleFont);
481 m_angularAxis->setTitleBrush(*m_titleBrush);
483 m_angularAxis->setTitleBrush(*m_titleBrush);
482 m_angularAxis->setTitleVisible(m_titleVisible);
484 m_angularAxis->setTitleVisible(m_titleVisible);
483 m_angularAxis->setTitleText(m_angularTitle);
485 m_angularAxis->setTitleText(m_angularTitle);
484 m_angularAxis->setGridLinePen(*m_gridPen);
486 m_angularAxis->setGridLinePen(*m_gridPen);
485 m_angularAxis->setGridLineVisible(m_gridVisible);
487 m_angularAxis->setGridLineVisible(m_gridVisible);
486 m_angularAxis->setLinePen(*m_arrowPen);
488 m_angularAxis->setLinePen(*m_arrowPen);
487 m_angularAxis->setLineVisible(m_arrowVisible);
489 m_angularAxis->setLineVisible(m_arrowVisible);
488 m_angularAxis->setMinorGridLinePen(*m_minorGridPen);
490 m_angularAxis->setMinorGridLinePen(*m_minorGridPen);
489 m_angularAxis->setMinorGridLineVisible(m_minorGridVisible);
491 m_angularAxis->setMinorGridLineVisible(m_minorGridVisible);
490
492
491 m_chart->addAxis(m_angularAxis, QPolarChart::PolarOrientationAngular);
493 m_chart->addAxis(m_angularAxis, QPolarChart::PolarOrientationAngular);
492
494
493 m_series1->attachAxis(m_angularAxis);
495 m_series1->attachAxis(m_angularAxis);
494 m_series2->attachAxis(m_angularAxis);
496 m_series2->attachAxis(m_angularAxis);
495 m_series3->attachAxis(m_angularAxis);
497 m_series3->attachAxis(m_angularAxis);
496 m_series4->attachAxis(m_angularAxis);
498 m_series4->attachAxis(m_angularAxis);
497 m_series5->attachAxis(m_angularAxis);
499 m_series5->attachAxis(m_angularAxis);
498 m_series6->attachAxis(m_angularAxis);
500 m_series6->attachAxis(m_angularAxis);
499 m_series7->attachAxis(m_angularAxis);
501 m_series7->attachAxis(m_angularAxis);
500
502
501 applyRanges();
503 applyRanges();
502
504
503 //connect(m_angularAxis, SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(angularRangeChanged(qreal, qreal)));
505 //connect(m_angularAxis, SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(angularRangeChanged(qreal, qreal)));
504 }
506 }
505
507
506 void MainWindow::setRadialAxis(MainWindow::AxisMode mode)
508 void MainWindow::setRadialAxis(MainWindow::AxisMode mode)
507 {
509 {
508 if (m_radialAxis) {
510 if (m_radialAxis) {
509 m_chart->removeAxis(m_radialAxis);
511 m_chart->removeAxis(m_radialAxis);
510 delete m_radialAxis;
512 delete m_radialAxis;
511 m_radialAxis = 0;
513 m_radialAxis = 0;
512 }
514 }
513
515
514 m_radialAxisMode = mode;
516 m_radialAxisMode = mode;
515
517
516 switch (m_radialAxisMode) {
518 switch (m_radialAxisMode) {
517 case AxisModeNone:
519 case AxisModeNone:
518 return;
520 return;
519 case AxisModeValue:
521 case AxisModeValue:
520 m_radialAxis = new QValueAxis();
522 m_radialAxis = new QValueAxis();
521 static_cast<QValueAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
523 static_cast<QValueAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
522 static_cast<QValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
524 static_cast<QValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
523 break;
525 break;
524 case AxisModeLogValue:
526 case AxisModeLogValue:
525 m_radialAxis = new QLogValueAxis();
527 m_radialAxis = new QLogValueAxis();
526 static_cast<QLogValueAxis *>(m_radialAxis)->setBase(m_base);
528 static_cast<QLogValueAxis *>(m_radialAxis)->setBase(m_base);
527 static_cast<QLogValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
529 static_cast<QLogValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
528 break;
530 break;
529 case AxisModeDateTime:
531 case AxisModeDateTime:
530 m_radialAxis = new QDateTimeAxis();
532 m_radialAxis = new QDateTimeAxis();
531 static_cast<QDateTimeAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
533 static_cast<QDateTimeAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
532 static_cast<QDateTimeAxis *>(m_radialAxis)->setFormat(m_dateFormat);
534 static_cast<QDateTimeAxis *>(m_radialAxis)->setFormat(m_dateFormat);
533 break;
535 break;
534 case AxisModeCategory:
536 case AxisModeCategory:
535 m_radialAxis = new QCategoryAxis();
537 m_radialAxis = new QCategoryAxis();
536 applyCategories();
538 applyCategories();
537 break;
539 break;
538 default:
540 default:
539 qWarning() << "Unsupported AxisMode";
541 qWarning() << "Unsupported AxisMode";
540 break;
542 break;
541 }
543 }
542
544
543 m_radialAxis->setLabelsAngle(m_labelsAngle);
545 m_radialAxis->setLabelsAngle(m_labelsAngle);
544 m_radialAxis->setLabelsFont(m_currentLabelFont);
546 m_radialAxis->setLabelsFont(m_currentLabelFont);
545 m_radialAxis->setLabelsBrush(*m_labelBrush);
547 m_radialAxis->setLabelsBrush(*m_labelBrush);
546 m_radialAxis->setLabelsVisible(m_labelsVisible);
548 m_radialAxis->setLabelsVisible(m_labelsVisible);
547 m_radialAxis->setShadesBrush(*m_radialShadesBrush);
549 m_radialAxis->setShadesBrush(*m_radialShadesBrush);
548 m_radialAxis->setShadesPen(*m_radialShadesPen);
550 m_radialAxis->setShadesPen(*m_radialShadesPen);
549 m_radialAxis->setShadesVisible(m_radialShadesVisible);
551 m_radialAxis->setShadesVisible(m_radialShadesVisible);
550 m_radialAxis->setTitleFont(m_currentTitleFont);
552 m_radialAxis->setTitleFont(m_currentTitleFont);
551 m_radialAxis->setTitleBrush(*m_titleBrush);
553 m_radialAxis->setTitleBrush(*m_titleBrush);
552 m_radialAxis->setTitleVisible(m_titleVisible);
554 m_radialAxis->setTitleVisible(m_titleVisible);
553 m_radialAxis->setTitleText(m_radialTitle);
555 m_radialAxis->setTitleText(m_radialTitle);
554 m_radialAxis->setGridLinePen(*m_gridPen);
556 m_radialAxis->setGridLinePen(*m_gridPen);
555 m_radialAxis->setGridLineVisible(m_gridVisible);
557 m_radialAxis->setGridLineVisible(m_gridVisible);
556 m_radialAxis->setLinePen(*m_arrowPen);
558 m_radialAxis->setLinePen(*m_arrowPen);
557 m_radialAxis->setLineVisible(m_arrowVisible);
559 m_radialAxis->setLineVisible(m_arrowVisible);
558 m_radialAxis->setMinorGridLinePen(*m_minorGridPen);
560 m_radialAxis->setMinorGridLinePen(*m_minorGridPen);
559 m_radialAxis->setMinorGridLineVisible(m_minorGridVisible);
561 m_radialAxis->setMinorGridLineVisible(m_minorGridVisible);
560
562
561 m_chart->addAxis(m_radialAxis, QPolarChart::PolarOrientationRadial);
563 m_chart->addAxis(m_radialAxis, QPolarChart::PolarOrientationRadial);
562
564
563 m_series1->attachAxis(m_radialAxis);
565 m_series1->attachAxis(m_radialAxis);
564 m_series2->attachAxis(m_radialAxis);
566 m_series2->attachAxis(m_radialAxis);
565 m_series3->attachAxis(m_radialAxis);
567 m_series3->attachAxis(m_radialAxis);
566 m_series4->attachAxis(m_radialAxis);
568 m_series4->attachAxis(m_radialAxis);
567 m_series5->attachAxis(m_radialAxis);
569 m_series5->attachAxis(m_radialAxis);
568 m_series6->attachAxis(m_radialAxis);
570 m_series6->attachAxis(m_radialAxis);
569 m_series7->attachAxis(m_radialAxis);
571 m_series7->attachAxis(m_radialAxis);
570
572
571 applyRanges();
573 applyRanges();
572
574
573 series1CheckBoxChecked();
575 series1CheckBoxChecked();
574 series2CheckBoxChecked();
576 series2CheckBoxChecked();
575 series3CheckBoxChecked();
577 series3CheckBoxChecked();
576 series4CheckBoxChecked();
578 series4CheckBoxChecked();
577 series5CheckBoxChecked();
579 series5CheckBoxChecked();
578 series6CheckBoxChecked();
580 series6CheckBoxChecked();
579 series7CheckBoxChecked();
581 series7CheckBoxChecked();
580
582
581 //connect(m_radialAxis, SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(radialRangeChanged(qreal, qreal)));
583 //connect(m_radialAxis, SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(radialRangeChanged(qreal, qreal)));
582 }
584 }
583
585
584 void MainWindow::applyRanges()
586 void MainWindow::applyRanges()
585 {
587 {
586 if (ui->niceNumbersCheckBox->isChecked()) {
588 if (ui->niceNumbersCheckBox->isChecked()) {
587 if (m_angularAxisMode == AxisModeValue) {
589 if (m_angularAxisMode == AxisModeValue) {
588 static_cast<QValueAxis *>(m_angularAxis)->applyNiceNumbers();
590 static_cast<QValueAxis *>(m_angularAxis)->applyNiceNumbers();
589 m_angularMin = static_cast<QValueAxis *>(m_angularAxis)->min();
591 m_angularMin = static_cast<QValueAxis *>(m_angularAxis)->min();
590 m_angularMax = static_cast<QValueAxis *>(m_angularAxis)->max();
592 m_angularMax = static_cast<QValueAxis *>(m_angularAxis)->max();
591 m_angularTickCount = static_cast<QValueAxis *>(m_angularAxis)->tickCount();
593 m_angularTickCount = static_cast<QValueAxis *>(m_angularAxis)->tickCount();
592 }
594 }
593 if (m_radialAxisMode == AxisModeValue) {
595 if (m_radialAxisMode == AxisModeValue) {
594 static_cast<QValueAxis *>(m_radialAxis)->applyNiceNumbers();
596 static_cast<QValueAxis *>(m_radialAxis)->applyNiceNumbers();
595 m_radialMin = static_cast<QValueAxis *>(m_radialAxis)->min();
597 m_radialMin = static_cast<QValueAxis *>(m_radialAxis)->min();
596 m_radialMax = static_cast<QValueAxis *>(m_radialAxis)->max();
598 m_radialMax = static_cast<QValueAxis *>(m_radialAxis)->max();
597 m_radialTickCount = static_cast<QValueAxis *>(m_radialAxis)->tickCount();
599 m_radialTickCount = static_cast<QValueAxis *>(m_radialAxis)->tickCount();
598 }
600 }
599 }
601 }
600
602
601 if (m_angularAxis)
603 if (m_angularAxis)
602 m_angularAxis->setRange(m_angularMin, m_angularMax);
604 m_angularAxis->setRange(m_angularMin, m_angularMax);
603 if (m_radialAxis)
605 if (m_radialAxis)
604 m_radialAxis->setRange(m_radialMin, m_radialMax);
606 m_radialAxis->setRange(m_radialMin, m_radialMax);
605 }
607 }
606
608
607 void MainWindow::angularTicksChanged(int value)
609 void MainWindow::angularTicksChanged(int value)
608 {
610 {
609 m_angularTickCount = value;
611 m_angularTickCount = value;
610 if (m_angularAxisMode == AxisModeValue)
612 if (m_angularAxisMode == AxisModeValue)
611 static_cast<QValueAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
613 static_cast<QValueAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
612 else if (m_angularAxisMode == AxisModeDateTime)
614 else if (m_angularAxisMode == AxisModeDateTime)
613 static_cast<QDateTimeAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
615 static_cast<QDateTimeAxis *>(m_angularAxis)->setTickCount(m_angularTickCount);
614 }
616 }
615
617
616 void MainWindow::radialTicksChanged(int value)
618 void MainWindow::radialTicksChanged(int value)
617 {
619 {
618 m_radialTickCount = value;
620 m_radialTickCount = value;
619 if (m_radialAxisMode == AxisModeValue)
621 if (m_radialAxisMode == AxisModeValue)
620 static_cast<QValueAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
622 static_cast<QValueAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
621 else if (m_radialAxisMode == AxisModeDateTime)
623 else if (m_radialAxisMode == AxisModeDateTime)
622 static_cast<QDateTimeAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
624 static_cast<QDateTimeAxis *>(m_radialAxis)->setTickCount(m_radialTickCount);
623 }
625 }
624
626
625 void MainWindow::angularMinorTicksChanged(int value)
627 void MainWindow::angularMinorTicksChanged(int value)
626 {
628 {
627 // Minor tick valid only for QValueAxis
629 // Minor tick valid only for QValueAxis
628 m_angularMinorTickCount = value;
630 m_angularMinorTickCount = value;
629 if (m_angularAxisMode == AxisModeValue)
631 if (m_angularAxisMode == AxisModeValue)
630 static_cast<QValueAxis *>(m_angularAxis)->setMinorTickCount(m_angularMinorTickCount);
632 static_cast<QValueAxis *>(m_angularAxis)->setMinorTickCount(m_angularMinorTickCount);
631 }
633 }
632
634
633 void MainWindow::radialMinorTicksChanged(int value)
635 void MainWindow::radialMinorTicksChanged(int value)
634 {
636 {
635 // Minor tick valid only for QValueAxis
637 // Minor tick valid only for QValueAxis
636 m_radialMinorTickCount = value;
638 m_radialMinorTickCount = value;
637 if (m_radialAxisMode == AxisModeValue)
639 if (m_radialAxisMode == AxisModeValue)
638 static_cast<QValueAxis *>(m_radialAxis)->setMinorTickCount(m_radialMinorTickCount);
640 static_cast<QValueAxis *>(m_radialAxis)->setMinorTickCount(m_radialMinorTickCount);
639 }
641 }
640
642
641 void MainWindow::anglesChanged(int value)
643 void MainWindow::anglesChanged(int value)
642 {
644 {
643 m_labelsAngle = value;
645 m_labelsAngle = value;
644 m_radialAxis->setLabelsAngle(m_labelsAngle);
646 m_radialAxis->setLabelsAngle(m_labelsAngle);
645 m_angularAxis->setLabelsAngle(m_labelsAngle);
647 m_angularAxis->setLabelsAngle(m_labelsAngle);
646 }
648 }
647
649
648 void MainWindow::angularMinChanged(double value)
650 void MainWindow::angularMinChanged(double value)
649 {
651 {
650 m_angularMin = value;
652 m_angularMin = value;
651 if (m_angularAxisMode != AxisModeDateTime) {
653 if (m_angularAxisMode != AxisModeDateTime) {
652 m_angularAxis->setMin(m_angularMin);
654 m_angularAxis->setMin(m_angularMin);
653 } else {
655 } else {
654 QDateTime dateTime;
656 QDateTime dateTime;
655 dateTime.setMSecsSinceEpoch(qint64(m_angularMin));
657 dateTime.setMSecsSinceEpoch(qint64(m_angularMin));
656 m_angularAxis->setMin(dateTime);
658 m_angularAxis->setMin(dateTime);
657 }
659 }
658 }
660 }
659
661
660 void MainWindow::angularMaxChanged(double value)
662 void MainWindow::angularMaxChanged(double value)
661 {
663 {
662 m_angularMax = value;
664 m_angularMax = value;
663 if (m_angularAxisMode != AxisModeDateTime) {
665 if (m_angularAxisMode != AxisModeDateTime) {
664 m_angularAxis->setMax(m_angularMax);
666 m_angularAxis->setMax(m_angularMax);
665 } else {
667 } else {
666 QDateTime dateTime;
668 QDateTime dateTime;
667 dateTime.setMSecsSinceEpoch(qint64(m_angularMax));
669 dateTime.setMSecsSinceEpoch(qint64(m_angularMax));
668 m_angularAxis->setMax(dateTime);
670 m_angularAxis->setMax(dateTime);
669 }
671 }
670 }
672 }
671
673
672 void MainWindow::radialMinChanged(double value)
674 void MainWindow::radialMinChanged(double value)
673 {
675 {
674 m_radialMin = value;
676 m_radialMin = value;
675 if (m_radialAxisMode != AxisModeDateTime) {
677 if (m_radialAxisMode != AxisModeDateTime) {
676 m_radialAxis->setMin(m_radialMin);
678 m_radialAxis->setMin(m_radialMin);
677 } else {
679 } else {
678 QDateTime dateTime;
680 QDateTime dateTime;
679 dateTime.setMSecsSinceEpoch(qint64(m_radialMin));
681 dateTime.setMSecsSinceEpoch(qint64(m_radialMin));
680 m_radialAxis->setMin(dateTime);
682 m_radialAxis->setMin(dateTime);
681 }
683 }
682 }
684 }
683
685
684 void MainWindow::radialMaxChanged(double value)
686 void MainWindow::radialMaxChanged(double value)
685 {
687 {
686 m_radialMax = value;
688 m_radialMax = value;
687 if (m_radialAxisMode != AxisModeDateTime) {
689 if (m_radialAxisMode != AxisModeDateTime) {
688 m_radialAxis->setMax(m_radialMax);
690 m_radialAxis->setMax(m_radialMax);
689 } else {
691 } else {
690 QDateTime dateTime;
692 QDateTime dateTime;
691 dateTime.setMSecsSinceEpoch(qint64(m_radialMax));
693 dateTime.setMSecsSinceEpoch(qint64(m_radialMax));
692 m_radialAxis->setMax(dateTime);
694 m_radialAxis->setMax(dateTime);
693 }
695 }
694 }
696 }
695
697
696 void MainWindow::angularShadesIndexChanged(int index)
698 void MainWindow::angularShadesIndexChanged(int index)
697 {
699 {
698 delete m_angularShadesBrush;
700 delete m_angularShadesBrush;
699 delete m_angularShadesPen;
701 delete m_angularShadesPen;
700
702
701 switch (index) {
703 switch (index) {
702 case 0:
704 case 0:
703 m_angularShadesBrush = new QBrush(Qt::NoBrush);
705 m_angularShadesBrush = new QBrush(Qt::NoBrush);
704 m_angularShadesPen = new QPen(Qt::NoPen);
706 m_angularShadesPen = new QPen(Qt::NoPen);
705 m_angularShadesVisible = false;
707 m_angularShadesVisible = false;
706 break;
708 break;
707 case 1:
709 case 1:
708 m_angularShadesBrush = new QBrush(Qt::lightGray);
710 m_angularShadesBrush = new QBrush(Qt::lightGray);
709 m_angularShadesPen = new QPen(Qt::NoPen);
711 m_angularShadesPen = new QPen(Qt::NoPen);
710 m_angularShadesVisible = true;
712 m_angularShadesVisible = true;
711 break;
713 break;
712 case 2:
714 case 2:
713 m_angularShadesBrush = new QBrush(Qt::yellow);
715 m_angularShadesBrush = new QBrush(Qt::yellow);
714 m_angularShadesPen = new QPen(Qt::DotLine);
716 m_angularShadesPen = new QPen(Qt::DotLine);
715 m_angularShadesPen->setWidth(2);
717 m_angularShadesPen->setWidth(2);
716 m_angularShadesVisible = true;
718 m_angularShadesVisible = true;
717 break;
719 break;
718 default:
720 default:
719 break;
721 break;
720 }
722 }
721
723
722 m_angularAxis->setShadesBrush(*m_angularShadesBrush);
724 m_angularAxis->setShadesBrush(*m_angularShadesBrush);
723 m_angularAxis->setShadesPen(*m_angularShadesPen);
725 m_angularAxis->setShadesPen(*m_angularShadesPen);
724 m_angularAxis->setShadesVisible(m_angularShadesVisible);
726 m_angularAxis->setShadesVisible(m_angularShadesVisible);
725 }
727 }
726
728
727 void MainWindow::radialShadesIndexChanged(int index)
729 void MainWindow::radialShadesIndexChanged(int index)
728 {
730 {
729 delete m_radialShadesBrush;
731 delete m_radialShadesBrush;
730 delete m_radialShadesPen;
732 delete m_radialShadesPen;
731
733
732 switch (index) {
734 switch (index) {
733 case 0:
735 case 0:
734 m_radialShadesBrush = new QBrush(Qt::NoBrush);
736 m_radialShadesBrush = new QBrush(Qt::NoBrush);
735 m_radialShadesPen = new QPen(Qt::NoPen);
737 m_radialShadesPen = new QPen(Qt::NoPen);
736 m_radialShadesVisible = false;
738 m_radialShadesVisible = false;
737 break;
739 break;
738 case 1:
740 case 1:
739 m_radialShadesBrush = new QBrush(Qt::green);
741 m_radialShadesBrush = new QBrush(Qt::green);
740 m_radialShadesPen = new QPen(Qt::NoPen);
742 m_radialShadesPen = new QPen(Qt::NoPen);
741 m_radialShadesVisible = true;
743 m_radialShadesVisible = true;
742 break;
744 break;
743 case 2:
745 case 2:
744 m_radialShadesBrush = new QBrush(Qt::blue);
746 m_radialShadesBrush = new QBrush(Qt::blue);
745 m_radialShadesPen = new QPen(Qt::DotLine);
747 m_radialShadesPen = new QPen(Qt::DotLine);
746 m_radialShadesPen->setWidth(2);
748 m_radialShadesPen->setWidth(2);
747 m_radialShadesVisible = true;
749 m_radialShadesVisible = true;
748 break;
750 break;
749 default:
751 default:
750 break;
752 break;
751 }
753 }
752
754
753 m_radialAxis->setShadesBrush(*m_radialShadesBrush);
755 m_radialAxis->setShadesBrush(*m_radialShadesBrush);
754 m_radialAxis->setShadesPen(*m_radialShadesPen);
756 m_radialAxis->setShadesPen(*m_radialShadesPen);
755 m_radialAxis->setShadesVisible(m_radialShadesVisible);
757 m_radialAxis->setShadesVisible(m_radialShadesVisible);
756 }
758 }
757
759
758 void MainWindow::labelFormatEdited(const QString &text)
760 void MainWindow::labelFormatEdited(const QString &text)
759 {
761 {
760 m_labelFormat = text;
762 m_labelFormat = text;
761 if (m_angularAxisMode == AxisModeValue)
763 if (m_angularAxisMode == AxisModeValue)
762 static_cast<QValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
764 static_cast<QValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
763 else if (m_angularAxisMode == AxisModeLogValue)
765 else if (m_angularAxisMode == AxisModeLogValue)
764 static_cast<QLogValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
766 static_cast<QLogValueAxis *>(m_angularAxis)->setLabelFormat(m_labelFormat);
765
767
766 if (m_radialAxisMode == AxisModeValue)
768 if (m_radialAxisMode == AxisModeValue)
767 static_cast<QValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
769 static_cast<QValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
768 else if (m_radialAxisMode == AxisModeLogValue)
770 else if (m_radialAxisMode == AxisModeLogValue)
769 static_cast<QLogValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
771 static_cast<QLogValueAxis *>(m_radialAxis)->setLabelFormat(m_labelFormat);
770 }
772 }
771
773
772 void MainWindow::labelFontChanged(const QFont &font)
774 void MainWindow::labelFontChanged(const QFont &font)
773 {
775 {
774 m_currentLabelFont = font;
776 m_currentLabelFont = font;
775 m_currentLabelFont.setPixelSize(ui->labelFontSizeSpin->value());
777 m_currentLabelFont.setPixelSize(ui->labelFontSizeSpin->value());
776 m_angularAxis->setLabelsFont(m_currentLabelFont);
778 m_angularAxis->setLabelsFont(m_currentLabelFont);
777 m_radialAxis->setLabelsFont(m_currentLabelFont);
779 m_radialAxis->setLabelsFont(m_currentLabelFont);
778 }
780 }
779
781
780 void MainWindow::labelFontSizeChanged(int value)
782 void MainWindow::labelFontSizeChanged(int value)
781 {
783 {
782 m_currentLabelFont = ui->labelFontComboBox->currentFont();
784 m_currentLabelFont = ui->labelFontComboBox->currentFont();
783 m_currentLabelFont.setPixelSize(value);
785 m_currentLabelFont.setPixelSize(value);
784 m_angularAxis->setLabelsFont(m_currentLabelFont);
786 m_angularAxis->setLabelsFont(m_currentLabelFont);
785 m_radialAxis->setLabelsFont(m_currentLabelFont);
787 m_radialAxis->setLabelsFont(m_currentLabelFont);
786 }
788 }
787
789
788 void MainWindow::animationIndexChanged(int index)
790 void MainWindow::animationIndexChanged(int index)
789 {
791 {
790 switch (index) {
792 switch (index) {
791 case 0:
793 case 0:
792 m_animationOptions = QChart::NoAnimation;
794 m_animationOptions = QChart::NoAnimation;
793 break;
795 break;
794 case 1:
796 case 1:
795 m_animationOptions = QChart::SeriesAnimations;
797 m_animationOptions = QChart::SeriesAnimations;
796 break;
798 break;
797 case 2:
799 case 2:
798 m_animationOptions = QChart::GridAxisAnimations;
800 m_animationOptions = QChart::GridAxisAnimations;
799 break;
801 break;
800 case 3:
802 case 3:
801 m_animationOptions = QChart::AllAnimations;
803 m_animationOptions = QChart::AllAnimations;
802 break;
804 break;
803 default:
805 default:
804 break;
806 break;
805 }
807 }
806
808
807 m_chart->setAnimationOptions(m_animationOptions);
809 m_chart->setAnimationOptions(m_animationOptions);
808 }
810 }
809
811
810 void MainWindow::labelsIndexChanged(int index)
812 void MainWindow::labelsIndexChanged(int index)
811 {
813 {
812 delete m_labelBrush;
814 delete m_labelBrush;
813
815
814 switch (index) {
816 switch (index) {
815 case 0:
817 case 0:
816 m_labelBrush = new QBrush(Qt::NoBrush);
818 m_labelBrush = new QBrush(Qt::NoBrush);
817 m_labelsVisible = false;
819 m_labelsVisible = false;
818 break;
820 break;
819 case 1:
821 case 1:
820 m_labelBrush = new QBrush(Qt::black);
822 m_labelBrush = new QBrush(Qt::black);
821 m_labelsVisible = true;
823 m_labelsVisible = true;
822 break;
824 break;
823 case 2:
825 case 2:
824 m_labelBrush = new QBrush(Qt::white);
826 m_labelBrush = new QBrush(Qt::white);
825 m_labelsVisible = true;
827 m_labelsVisible = true;
826 break;
828 break;
827 default:
829 default:
828 break;
830 break;
829 }
831 }
830
832
831 m_radialAxis->setLabelsBrush(*m_labelBrush);
833 m_radialAxis->setLabelsBrush(*m_labelBrush);
832 m_radialAxis->setLabelsVisible(m_labelsVisible);
834 m_radialAxis->setLabelsVisible(m_labelsVisible);
833 m_angularAxis->setLabelsBrush(*m_labelBrush);
835 m_angularAxis->setLabelsBrush(*m_labelBrush);
834 m_angularAxis->setLabelsVisible(m_labelsVisible);
836 m_angularAxis->setLabelsVisible(m_labelsVisible);
835 }
837 }
836
838
837 void MainWindow::titleIndexChanged(int index)
839 void MainWindow::titleIndexChanged(int index)
838 {
840 {
839 delete m_titleBrush;
841 delete m_titleBrush;
840
842
841 switch (index) {
843 switch (index) {
842 case 0:
844 case 0:
843 m_titleBrush = new QBrush(Qt::NoBrush);
845 m_titleBrush = new QBrush(Qt::NoBrush);
844 m_titleVisible = false;
846 m_titleVisible = false;
845 m_angularTitle = QString();
847 m_angularTitle = QString();
846 m_radialTitle = QString();
848 m_radialTitle = QString();
847 break;
849 break;
848 case 1:
850 case 1:
849 m_titleBrush = new QBrush(Qt::NoBrush);
851 m_titleBrush = new QBrush(Qt::NoBrush);
850 m_titleVisible = true;
852 m_titleVisible = true;
851 m_angularTitle = QString();
853 m_angularTitle = QString();
852 m_radialTitle = QString();
854 m_radialTitle = QString();
853 break;
855 break;
854 case 2:
856 case 2:
855 m_titleBrush = new QBrush(Qt::NoBrush);
857 m_titleBrush = new QBrush(Qt::NoBrush);
856 m_titleVisible = false;
858 m_titleVisible = false;
857 m_angularTitle = QString("Invisible Ang. Title!");
859 m_angularTitle = QString("Invisible Ang. Title!");
858 m_radialTitle = QString("Invisible Rad. Title!");
860 m_radialTitle = QString("Invisible Rad. Title!");
859 break;
861 break;
860 case 3:
862 case 3:
861 m_titleBrush = new QBrush(Qt::black);
863 m_titleBrush = new QBrush(Qt::black);
862 m_titleVisible = true;
864 m_titleVisible = true;
863 m_angularTitle = QString("Angular Title");
865 m_angularTitle = QString("Angular Title");
864 m_radialTitle = QString("Radial Title");
866 m_radialTitle = QString("Radial Title");
865 break;
867 break;
866 case 4:
868 case 4:
867 m_titleBrush = new QBrush(Qt::white);
869 m_titleBrush = new QBrush(Qt::white);
868 m_titleVisible = true;
870 m_titleVisible = true;
869 m_angularTitle = QString("Angular Blue Title");
871 m_angularTitle = QString("Angular Blue Title");
870 m_radialTitle = QString("Radial Blue Title");
872 m_radialTitle = QString("Radial Blue Title");
871 break;
873 break;
872 default:
874 default:
873 break;
875 break;
874 }
876 }
875
877
876 m_radialAxis->setTitleBrush(*m_titleBrush);
878 m_radialAxis->setTitleBrush(*m_titleBrush);
877 m_radialAxis->setTitleVisible(m_titleVisible);
879 m_radialAxis->setTitleVisible(m_titleVisible);
878 m_radialAxis->setTitleText(m_radialTitle);
880 m_radialAxis->setTitleText(m_radialTitle);
879 m_angularAxis->setTitleBrush(*m_titleBrush);
881 m_angularAxis->setTitleBrush(*m_titleBrush);
880 m_angularAxis->setTitleVisible(m_titleVisible);
882 m_angularAxis->setTitleVisible(m_titleVisible);
881 m_angularAxis->setTitleText(m_angularTitle);
883 m_angularAxis->setTitleText(m_angularTitle);
882 }
884 }
883
885
884 void MainWindow::titleFontChanged(const QFont &font)
886 void MainWindow::titleFontChanged(const QFont &font)
885 {
887 {
886 m_currentTitleFont = font;
888 m_currentTitleFont = font;
887 m_currentTitleFont.setPixelSize(ui->titleFontSizeSpin->value());
889 m_currentTitleFont.setPixelSize(ui->titleFontSizeSpin->value());
888 m_angularAxis->setTitleFont(m_currentTitleFont);
890 m_angularAxis->setTitleFont(m_currentTitleFont);
889 m_radialAxis->setTitleFont(m_currentTitleFont);
891 m_radialAxis->setTitleFont(m_currentTitleFont);
890 }
892 }
891
893
892 void MainWindow::titleFontSizeChanged(int value)
894 void MainWindow::titleFontSizeChanged(int value)
893 {
895 {
894 m_currentTitleFont = ui->titleFontComboBox->currentFont();
896 m_currentTitleFont = ui->titleFontComboBox->currentFont();
895 m_currentTitleFont.setPixelSize(value);
897 m_currentTitleFont.setPixelSize(value);
896 m_angularAxis->setTitleFont(m_currentTitleFont);
898 m_angularAxis->setTitleFont(m_currentTitleFont);
897 m_radialAxis->setTitleFont(m_currentTitleFont);
899 m_radialAxis->setTitleFont(m_currentTitleFont);
898 }
900 }
899
901
900 void MainWindow::gridIndexChanged(int index)
902 void MainWindow::gridIndexChanged(int index)
901 {
903 {
902 delete m_gridPen;
904 delete m_gridPen;
903
905
904 switch (index) {
906 switch (index) {
905 case 0:
907 case 0:
906 m_gridPen = new QPen(Qt::NoPen);
908 m_gridPen = new QPen(Qt::NoPen);
907 m_gridVisible = false;
909 m_gridVisible = false;
908 break;
910 break;
909 case 1:
911 case 1:
910 m_gridPen = new QPen(Qt::black);
912 m_gridPen = new QPen(Qt::black);
911 m_gridVisible = true;
913 m_gridVisible = true;
912 break;
914 break;
913 case 2:
915 case 2:
914 m_gridPen = new QPen(Qt::red);
916 m_gridPen = new QPen(Qt::red);
915 m_gridPen->setStyle(Qt::DashDotLine);
917 m_gridPen->setStyle(Qt::DashDotLine);
916 m_gridPen->setWidth(3);
918 m_gridPen->setWidth(3);
917 m_gridVisible = true;
919 m_gridVisible = true;
918 break;
920 break;
919 default:
921 default:
920 break;
922 break;
921 }
923 }
922
924
923 m_angularAxis->setGridLinePen(*m_gridPen);
925 m_angularAxis->setGridLinePen(*m_gridPen);
924 m_angularAxis->setGridLineVisible(m_gridVisible);
926 m_angularAxis->setGridLineVisible(m_gridVisible);
925 m_radialAxis->setGridLinePen(*m_gridPen);
927 m_radialAxis->setGridLinePen(*m_gridPen);
926 m_radialAxis->setGridLineVisible(m_gridVisible);
928 m_radialAxis->setGridLineVisible(m_gridVisible);
927 }
929 }
928
930
929 void MainWindow::minorGridIndexChanged(int index)
931 void MainWindow::minorGridIndexChanged(int index)
930 {
932 {
931 delete m_minorGridPen;
933 delete m_minorGridPen;
932
934
933 switch (index) {
935 switch (index) {
934 case 0:
936 case 0:
935 m_minorGridPen = new QPen(Qt::NoPen);
937 m_minorGridPen = new QPen(Qt::NoPen);
936 m_minorGridVisible = false;
938 m_minorGridVisible = false;
937 break;
939 break;
938 case 1:
940 case 1:
939 m_minorGridPen = new QPen(Qt::black);
941 m_minorGridPen = new QPen(Qt::black);
940 m_minorGridPen->setStyle(Qt::DashLine);
942 m_minorGridPen->setStyle(Qt::DashLine);
941 m_minorGridVisible = true;
943 m_minorGridVisible = true;
942 break;
944 break;
943 case 2:
945 case 2:
944 m_minorGridPen = new QPen(Qt::green);
946 m_minorGridPen = new QPen(Qt::green);
945 m_minorGridPen->setStyle(Qt::DotLine);
947 m_minorGridPen->setStyle(Qt::DotLine);
946 m_minorGridPen->setWidth(1);
948 m_minorGridPen->setWidth(1);
947 m_minorGridVisible = true;
949 m_minorGridVisible = true;
948 break;
950 break;
949 default:
951 default:
950 break;
952 break;
951 }
953 }
952
954
953 m_angularAxis->setMinorGridLinePen(*m_minorGridPen);
955 m_angularAxis->setMinorGridLinePen(*m_minorGridPen);
954 m_angularAxis->setMinorGridLineVisible(m_minorGridVisible);
956 m_angularAxis->setMinorGridLineVisible(m_minorGridVisible);
955 m_radialAxis->setMinorGridLinePen(*m_minorGridPen);
957 m_radialAxis->setMinorGridLinePen(*m_minorGridPen);
956 m_radialAxis->setMinorGridLineVisible(m_minorGridVisible);
958 m_radialAxis->setMinorGridLineVisible(m_minorGridVisible);
957 }
959 }
958
960
961 void MainWindow::gridLineColorIndexChanged(int index)
962 {
963 QColor color;
964 switch (index) {
965 case 0:
966 color = Qt::black;
967 break;
968 case 1:
969 color = Qt::green;
970 break;
971 case 2:
972 color = Qt::red;
973 break;
974 default:
975 break;
976 }
977
978 m_angularAxis->setGridLineColor(color);
979 m_radialAxis->setGridLineColor(color);
980 m_angularAxis->setMinorGridLineColor(color);
981 m_radialAxis->setMinorGridLineColor(color);
982 }
983
959 void MainWindow::arrowIndexChanged(int index)
984 void MainWindow::arrowIndexChanged(int index)
960 {
985 {
961 delete m_arrowPen;
986 delete m_arrowPen;
962
987
963 switch (index) {
988 switch (index) {
964 case 0:
989 case 0:
965 m_arrowPen = new QPen(Qt::NoPen);
990 m_arrowPen = new QPen(Qt::NoPen);
966 m_arrowVisible = false;
991 m_arrowVisible = false;
967 break;
992 break;
968 case 1:
993 case 1:
969 m_arrowPen = new QPen(Qt::black);
994 m_arrowPen = new QPen(Qt::black);
970 m_arrowVisible = true;
995 m_arrowVisible = true;
971 break;
996 break;
972 case 2:
997 case 2:
973 m_arrowPen = new QPen(Qt::red);
998 m_arrowPen = new QPen(Qt::red);
974 m_arrowPen->setStyle(Qt::DashDotLine);
999 m_arrowPen->setStyle(Qt::DashDotLine);
975 m_arrowPen->setWidth(3);
1000 m_arrowPen->setWidth(3);
976 m_arrowVisible = true;
1001 m_arrowVisible = true;
977 break;
1002 break;
978 default:
1003 default:
979 break;
1004 break;
980 }
1005 }
981
1006
982 m_angularAxis->setLinePen(*m_arrowPen);
1007 m_angularAxis->setLinePen(*m_arrowPen);
983 m_angularAxis->setLineVisible(m_arrowVisible);
1008 m_angularAxis->setLineVisible(m_arrowVisible);
984 m_radialAxis->setLinePen(*m_arrowPen);
1009 m_radialAxis->setLinePen(*m_arrowPen);
985 m_radialAxis->setLineVisible(m_arrowVisible);
1010 m_radialAxis->setLineVisible(m_arrowVisible);
986 }
1011 }
987
1012
988 void MainWindow::angularRangeChanged(qreal min, qreal max)
1013 void MainWindow::angularRangeChanged(qreal min, qreal max)
989 {
1014 {
990 if (!qFuzzyCompare(qreal(ui->angularMinSpin->value()), min))
1015 if (!qFuzzyCompare(qreal(ui->angularMinSpin->value()), min))
991 ui->angularMinSpin->setValue(min);
1016 ui->angularMinSpin->setValue(min);
992 if (!qFuzzyCompare(qreal(ui->angularMaxSpin->value()), max))
1017 if (!qFuzzyCompare(qreal(ui->angularMaxSpin->value()), max))
993 ui->angularMaxSpin->setValue(max);
1018 ui->angularMaxSpin->setValue(max);
994 }
1019 }
995
1020
996 void MainWindow::radialRangeChanged(qreal min, qreal max)
1021 void MainWindow::radialRangeChanged(qreal min, qreal max)
997 {
1022 {
998 if (!qFuzzyCompare(qreal(ui->radialMinSpin->value()), min))
1023 if (!qFuzzyCompare(qreal(ui->radialMinSpin->value()), min))
999 ui->radialMinSpin->setValue(min);
1024 ui->radialMinSpin->setValue(min);
1000 if (!qFuzzyCompare(qreal(ui->radialMaxSpin->value()), max))
1025 if (!qFuzzyCompare(qreal(ui->radialMaxSpin->value()), max))
1001 ui->radialMaxSpin->setValue(max);
1026 ui->radialMaxSpin->setValue(max);
1002 }
1027 }
1003
1028
1004 void MainWindow::angularAxisIndexChanged(int index)
1029 void MainWindow::angularAxisIndexChanged(int index)
1005 {
1030 {
1006 switch (index) {
1031 switch (index) {
1007 case 0:
1032 case 0:
1008 setAngularAxis(AxisModeNone);
1033 setAngularAxis(AxisModeNone);
1009 break;
1034 break;
1010 case 1:
1035 case 1:
1011 setAngularAxis(AxisModeValue);
1036 setAngularAxis(AxisModeValue);
1012 angularMinorTicksChanged(ui->angularMinorTicksSpin->value());
1037 angularMinorTicksChanged(ui->angularMinorTicksSpin->value());
1013 break;
1038 break;
1014 case 2:
1039 case 2:
1015 setAngularAxis(AxisModeLogValue);
1040 setAngularAxis(AxisModeLogValue);
1016 break;
1041 break;
1017 case 3:
1042 case 3:
1018 setAngularAxis(AxisModeDateTime);
1043 setAngularAxis(AxisModeDateTime);
1019 break;
1044 break;
1020 case 4:
1045 case 4:
1021 setAngularAxis(AxisModeCategory);
1046 setAngularAxis(AxisModeCategory);
1022 break;
1047 break;
1023 default:
1048 default:
1024 qWarning("Invalid Index!");
1049 qWarning("Invalid Index!");
1025 }
1050 }
1026 }
1051 }
1027
1052
1028 void MainWindow::radialAxisIndexChanged(int index)
1053 void MainWindow::radialAxisIndexChanged(int index)
1029 {
1054 {
1030 switch (index) {
1055 switch (index) {
1031 case 0:
1056 case 0:
1032 setRadialAxis(AxisModeNone);
1057 setRadialAxis(AxisModeNone);
1033 break;
1058 break;
1034 case 1:
1059 case 1:
1035 setRadialAxis(AxisModeValue);
1060 setRadialAxis(AxisModeValue);
1036 radialMinorTicksChanged(ui->radialMinorTicksSpin->value());
1061 radialMinorTicksChanged(ui->radialMinorTicksSpin->value());
1037 break;
1062 break;
1038 case 2:
1063 case 2:
1039 setRadialAxis(AxisModeLogValue);
1064 setRadialAxis(AxisModeLogValue);
1040 break;
1065 break;
1041 case 3:
1066 case 3:
1042 setRadialAxis(AxisModeDateTime);
1067 setRadialAxis(AxisModeDateTime);
1043 break;
1068 break;
1044 case 4:
1069 case 4:
1045 setRadialAxis(AxisModeCategory);
1070 setRadialAxis(AxisModeCategory);
1046 break;
1071 break;
1047 default:
1072 default:
1048 qWarning("Invalid Index!");
1073 qWarning("Invalid Index!");
1049 }
1074 }
1050 }
1075 }
1051
1076
1052 void MainWindow::logBaseChanged(double value)
1077 void MainWindow::logBaseChanged(double value)
1053 {
1078 {
1054 m_base = value;
1079 m_base = value;
1055 if (m_angularAxisMode == AxisModeLogValue)
1080 if (m_angularAxisMode == AxisModeLogValue)
1056 static_cast<QLogValueAxis *>(m_angularAxis)->setBase(m_base);
1081 static_cast<QLogValueAxis *>(m_angularAxis)->setBase(m_base);
1057 if (m_radialAxisMode == AxisModeLogValue)
1082 if (m_radialAxisMode == AxisModeLogValue)
1058 static_cast<QLogValueAxis *>(m_radialAxis)->setBase(m_base);
1083 static_cast<QLogValueAxis *>(m_radialAxis)->setBase(m_base);
1059 }
1084 }
1060
1085
1061 void MainWindow::niceNumbersChecked()
1086 void MainWindow::niceNumbersChecked()
1062 {
1087 {
1063 if (ui->niceNumbersCheckBox->isChecked())
1088 if (ui->niceNumbersCheckBox->isChecked())
1064 applyRanges();
1089 applyRanges();
1065 }
1090 }
1066
1091
1067 void MainWindow::dateFormatEdited(const QString &text)
1092 void MainWindow::dateFormatEdited(const QString &text)
1068 {
1093 {
1069 m_dateFormat = text;
1094 m_dateFormat = text;
1070 if (m_angularAxisMode == AxisModeDateTime)
1095 if (m_angularAxisMode == AxisModeDateTime)
1071 static_cast<QDateTimeAxis *>(m_angularAxis)->setFormat(m_dateFormat);
1096 static_cast<QDateTimeAxis *>(m_angularAxis)->setFormat(m_dateFormat);
1072 if (m_radialAxisMode == AxisModeDateTime)
1097 if (m_radialAxisMode == AxisModeDateTime)
1073 static_cast<QDateTimeAxis *>(m_radialAxis)->setFormat(m_dateFormat);
1098 static_cast<QDateTimeAxis *>(m_radialAxis)->setFormat(m_dateFormat);
1074 }
1099 }
1075
1100
1076 void MainWindow::moreCategoriesChecked()
1101 void MainWindow::moreCategoriesChecked()
1077 {
1102 {
1078 applyCategories();
1103 applyCategories();
1079 m_moreCategories = ui->moreCategoriesCheckBox->isChecked();
1104 m_moreCategories = ui->moreCategoriesCheckBox->isChecked();
1080 }
1105 }
1081
1106
1082 void MainWindow::categoryLabelLocationChecked()
1107 void MainWindow::categoryLabelLocationChecked()
1083 {
1108 {
1084 applyCategories();
1109 applyCategories();
1085 }
1110 }
1086
1111
1087 void MainWindow::series1CheckBoxChecked()
1112 void MainWindow::series1CheckBoxChecked()
1088 {
1113 {
1089 if (ui->series1checkBox->isChecked())
1114 if (ui->series1checkBox->isChecked())
1090 m_series1->setVisible(true);
1115 m_series1->setVisible(true);
1091 else
1116 else
1092 m_series1->setVisible(false);
1117 m_series1->setVisible(false);
1093 }
1118 }
1094
1119
1095 void MainWindow::series2CheckBoxChecked()
1120 void MainWindow::series2CheckBoxChecked()
1096 {
1121 {
1097 if (ui->series2checkBox->isChecked())
1122 if (ui->series2checkBox->isChecked())
1098 m_series2->setVisible(true);
1123 m_series2->setVisible(true);
1099 else
1124 else
1100 m_series2->setVisible(false);
1125 m_series2->setVisible(false);
1101 }
1126 }
1102
1127
1103 void MainWindow::series3CheckBoxChecked()
1128 void MainWindow::series3CheckBoxChecked()
1104 {
1129 {
1105 if (ui->series3checkBox->isChecked())
1130 if (ui->series3checkBox->isChecked())
1106 m_series3->setVisible(true);
1131 m_series3->setVisible(true);
1107 else
1132 else
1108 m_series3->setVisible(false);
1133 m_series3->setVisible(false);
1109 }
1134 }
1110
1135
1111 void MainWindow::series4CheckBoxChecked()
1136 void MainWindow::series4CheckBoxChecked()
1112 {
1137 {
1113 if (ui->series4checkBox->isChecked())
1138 if (ui->series4checkBox->isChecked())
1114 m_series4->setVisible(true);
1139 m_series4->setVisible(true);
1115 else
1140 else
1116 m_series4->setVisible(false);
1141 m_series4->setVisible(false);
1117 }
1142 }
1118
1143
1119 void MainWindow::series5CheckBoxChecked()
1144 void MainWindow::series5CheckBoxChecked()
1120 {
1145 {
1121 if (ui->series5checkBox->isChecked())
1146 if (ui->series5checkBox->isChecked())
1122 m_series5->setVisible(true);
1147 m_series5->setVisible(true);
1123 else
1148 else
1124 m_series5->setVisible(false);
1149 m_series5->setVisible(false);
1125 }
1150 }
1126
1151
1127 void MainWindow::series6CheckBoxChecked()
1152 void MainWindow::series6CheckBoxChecked()
1128 {
1153 {
1129 if (ui->series6checkBox->isChecked())
1154 if (ui->series6checkBox->isChecked())
1130 m_series6->setVisible(true);
1155 m_series6->setVisible(true);
1131 else
1156 else
1132 m_series6->setVisible(false);
1157 m_series6->setVisible(false);
1133 }
1158 }
1134
1159
1135 void MainWindow::series7CheckBoxChecked()
1160 void MainWindow::series7CheckBoxChecked()
1136 {
1161 {
1137 if (ui->series7checkBox->isChecked())
1162 if (ui->series7checkBox->isChecked())
1138 m_series7->setVisible(true);
1163 m_series7->setVisible(true);
1139 else
1164 else
1140 m_series7->setVisible(false);
1165 m_series7->setVisible(false);
1141 }
1166 }
1142
1167
1143 void MainWindow::themeIndexChanged(int index)
1168 void MainWindow::themeIndexChanged(int index)
1144 {
1169 {
1145 m_chart->setTheme(QChart::ChartTheme(index));
1170 m_chart->setTheme(QChart::ChartTheme(index));
1146 }
1171 }
1147
1172
1148 void MainWindow::seriesHovered(QPointF point, bool state)
1173 void MainWindow::seriesHovered(QPointF point, bool state)
1149 {
1174 {
1150 QAbstractSeries *series = qobject_cast<QAbstractSeries *>(sender());
1175 QAbstractSeries *series = qobject_cast<QAbstractSeries *>(sender());
1151 if (series) {
1176 if (series) {
1152 if (state) {
1177 if (state) {
1153 QString str("'%3' - %1 x %2");
1178 QString str("'%3' - %1 x %2");
1154 ui->hoverLabel->setText(str.arg(point.x()).arg(point.y()).arg(series->name()));
1179 ui->hoverLabel->setText(str.arg(point.x()).arg(point.y()).arg(series->name()));
1155 } else {
1180 } else {
1156 ui->hoverLabel->setText("No hover");
1181 ui->hoverLabel->setText("No hover");
1157 }
1182 }
1158 } else {
1183 } else {
1159 qDebug() << "seriesHovered - invalid sender!";
1184 qDebug() << "seriesHovered - invalid sender!";
1160 }
1185 }
1161 }
1186 }
1162
1187
1163 void MainWindow::seriesClicked(const QPointF &point)
1188 void MainWindow::seriesClicked(const QPointF &point)
1164 {
1189 {
1165 QAbstractSeries *series = qobject_cast<QAbstractSeries *>(sender());
1190 QAbstractSeries *series = qobject_cast<QAbstractSeries *>(sender());
1166 if (series) {
1191 if (series) {
1167 QString str("'%3' clicked at: %1 x %2");
1192 QString str("'%3' clicked at: %1 x %2");
1168 m_angularTitle = str.arg(point.x()).arg(point.y()).arg(series->name());
1193 m_angularTitle = str.arg(point.x()).arg(point.y()).arg(series->name());
1169 m_angularAxis->setTitleText(m_angularTitle);
1194 m_angularAxis->setTitleText(m_angularTitle);
1170 } else {
1195 } else {
1171 qDebug() << "seriesClicked - invalid sender!";
1196 qDebug() << "seriesClicked - invalid sender!";
1172 }
1197 }
1173 }
1198 }
1174
1199
1175 void MainWindow::backgroundIndexChanged(int index)
1200 void MainWindow::backgroundIndexChanged(int index)
1176 {
1201 {
1177 delete m_backgroundBrush;
1202 delete m_backgroundBrush;
1178 delete m_backgroundPen;
1203 delete m_backgroundPen;
1179
1204
1180 switch (index) {
1205 switch (index) {
1181 case 0:
1206 case 0:
1182 m_backgroundBrush = new QBrush(Qt::white);
1207 m_backgroundBrush = new QBrush(Qt::white);
1183 m_backgroundPen = new QPen(Qt::NoPen);
1208 m_backgroundPen = new QPen(Qt::NoPen);
1184 break;
1209 break;
1185 case 1:
1210 case 1:
1186 m_backgroundBrush = new QBrush(Qt::blue);
1211 m_backgroundBrush = new QBrush(Qt::blue);
1187 m_backgroundPen = new QPen(Qt::NoPen);
1212 m_backgroundPen = new QPen(Qt::NoPen);
1188 break;
1213 break;
1189 case 2:
1214 case 2:
1190 m_backgroundBrush = new QBrush(Qt::yellow);
1215 m_backgroundBrush = new QBrush(Qt::yellow);
1191 m_backgroundPen = new QPen(Qt::black, 2);
1216 m_backgroundPen = new QPen(Qt::black, 2);
1192 break;
1217 break;
1193 default:
1218 default:
1194 break;
1219 break;
1195 }
1220 }
1196 m_chart->setBackgroundBrush(*m_backgroundBrush);
1221 m_chart->setBackgroundBrush(*m_backgroundBrush);
1197 m_chart->setBackgroundPen(*m_backgroundPen);
1222 m_chart->setBackgroundPen(*m_backgroundPen);
1198 }
1223 }
1199
1224
1200 void MainWindow::plotAreaIndexChanged(int index)
1225 void MainWindow::plotAreaIndexChanged(int index)
1201 {
1226 {
1202 delete m_plotAreaBackgroundBrush;
1227 delete m_plotAreaBackgroundBrush;
1203 delete m_plotAreaBackgroundPen;
1228 delete m_plotAreaBackgroundPen;
1204
1229
1205 switch (index) {
1230 switch (index) {
1206 case 0:
1231 case 0:
1207 m_plotAreaBackgroundBrush = new QBrush(Qt::green);
1232 m_plotAreaBackgroundBrush = new QBrush(Qt::green);
1208 m_plotAreaBackgroundPen = new QPen(Qt::green);
1233 m_plotAreaBackgroundPen = new QPen(Qt::green);
1209 m_chart->setPlotAreaBackgroundVisible(false);
1234 m_chart->setPlotAreaBackgroundVisible(false);
1210 break;
1235 break;
1211 case 1:
1236 case 1:
1212 m_plotAreaBackgroundBrush = new QBrush(Qt::magenta);
1237 m_plotAreaBackgroundBrush = new QBrush(Qt::magenta);
1213 m_plotAreaBackgroundPen = new QPen(Qt::NoPen);
1238 m_plotAreaBackgroundPen = new QPen(Qt::NoPen);
1214 m_chart->setPlotAreaBackgroundVisible(true);
1239 m_chart->setPlotAreaBackgroundVisible(true);
1215 break;
1240 break;
1216 case 2:
1241 case 2:
1217 m_plotAreaBackgroundBrush = new QBrush(Qt::lightGray);
1242 m_plotAreaBackgroundBrush = new QBrush(Qt::lightGray);
1218 m_plotAreaBackgroundPen = new QPen(Qt::red, 6);
1243 m_plotAreaBackgroundPen = new QPen(Qt::red, 6);
1219 m_chart->setPlotAreaBackgroundVisible(true);
1244 m_chart->setPlotAreaBackgroundVisible(true);
1220 break;
1245 break;
1221 default:
1246 default:
1222 break;
1247 break;
1223 }
1248 }
1224 m_chart->setPlotAreaBackgroundBrush(*m_plotAreaBackgroundBrush);
1249 m_chart->setPlotAreaBackgroundBrush(*m_plotAreaBackgroundBrush);
1225 m_chart->setPlotAreaBackgroundPen(*m_plotAreaBackgroundPen);
1250 m_chart->setPlotAreaBackgroundPen(*m_plotAreaBackgroundPen);
1226 }
1251 }
1227
1252
1228 void MainWindow::applyCategories()
1253 void MainWindow::applyCategories()
1229 {
1254 {
1230 // Basic layout is three categories, extended has five
1255 // Basic layout is three categories, extended has five
1231 if (m_angularAxisMode == AxisModeCategory) {
1256 if (m_angularAxisMode == AxisModeCategory) {
1232 QCategoryAxis *angCatAxis = static_cast<QCategoryAxis *>(m_angularAxis);
1257 QCategoryAxis *angCatAxis = static_cast<QCategoryAxis *>(m_angularAxis);
1233 if (angCatAxis->count() == 0) {
1258 if (angCatAxis->count() == 0) {
1234 angCatAxis->setStartValue(4000);
1259 angCatAxis->setStartValue(4000);
1235 angCatAxis->append("Category A", 7000);
1260 angCatAxis->append("Category A", 7000);
1236 angCatAxis->append("Category B", 12000);
1261 angCatAxis->append("Category B", 12000);
1237 angCatAxis->append("Category C", 17000);
1262 angCatAxis->append("Category C", 17000);
1238 }
1263 }
1239 if (angCatAxis->count() == 3 && ui->moreCategoriesCheckBox->isChecked()) {
1264 if (angCatAxis->count() == 3 && ui->moreCategoriesCheckBox->isChecked()) {
1240 angCatAxis->setStartValue(1000);
1265 angCatAxis->setStartValue(1000);
1241 angCatAxis->replaceLabel("Category A", "Cat A");
1266 angCatAxis->replaceLabel("Category A", "Cat A");
1242 angCatAxis->replaceLabel("Category B", "Cat B");
1267 angCatAxis->replaceLabel("Category B", "Cat B");
1243 angCatAxis->replaceLabel("Category C", "Cat C");
1268 angCatAxis->replaceLabel("Category C", "Cat C");
1244 angCatAxis->append("Cat D", 22000);
1269 angCatAxis->append("Cat D", 22000);
1245 angCatAxis->append("Cat E", 28000);
1270 angCatAxis->append("Cat E", 28000);
1246 } else if (angCatAxis->count() == 5 && !ui->moreCategoriesCheckBox->isChecked()) {
1271 } else if (angCatAxis->count() == 5 && !ui->moreCategoriesCheckBox->isChecked()) {
1247 angCatAxis->setStartValue(4000);
1272 angCatAxis->setStartValue(4000);
1248 angCatAxis->replaceLabel("Cat A", "Category A");
1273 angCatAxis->replaceLabel("Cat A", "Category A");
1249 angCatAxis->replaceLabel("Cat B", "Category B");
1274 angCatAxis->replaceLabel("Cat B", "Category B");
1250 angCatAxis->replaceLabel("Cat C", "Category C");
1275 angCatAxis->replaceLabel("Cat C", "Category C");
1251 angCatAxis->remove("Cat D");
1276 angCatAxis->remove("Cat D");
1252 angCatAxis->remove("Cat E");
1277 angCatAxis->remove("Cat E");
1253 }
1278 }
1254 if (ui->categoryLabelLocationCheckBox->isChecked())
1279 if (ui->categoryLabelLocationCheckBox->isChecked())
1255 angCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionOnValue);
1280 angCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionOnValue);
1256 else
1281 else
1257 angCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionCenter);
1282 angCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionCenter);
1258 }
1283 }
1259
1284
1260 if (m_radialAxisMode == AxisModeCategory) {
1285 if (m_radialAxisMode == AxisModeCategory) {
1261 QCategoryAxis *radCatAxis = static_cast<QCategoryAxis *>(m_radialAxis);
1286 QCategoryAxis *radCatAxis = static_cast<QCategoryAxis *>(m_radialAxis);
1262 if (radCatAxis->count() == 0) {
1287 if (radCatAxis->count() == 0) {
1263 radCatAxis->setStartValue(2000);
1288 radCatAxis->setStartValue(2000);
1264 radCatAxis->append("Category 1", 4000);
1289 radCatAxis->append("Category 1", 4000);
1265 radCatAxis->append("Category 2", 9000);
1290 radCatAxis->append("Category 2", 9000);
1266 radCatAxis->append("Category 3", 14000);
1291 radCatAxis->append("Category 3", 14000);
1267 }
1292 }
1268 if (radCatAxis->count() == 3 && ui->moreCategoriesCheckBox->isChecked()) {
1293 if (radCatAxis->count() == 3 && ui->moreCategoriesCheckBox->isChecked()) {
1269 radCatAxis->setStartValue(1000);
1294 radCatAxis->setStartValue(1000);
1270 radCatAxis->replaceLabel("Category 1", "Cat 1");
1295 radCatAxis->replaceLabel("Category 1", "Cat 1");
1271 radCatAxis->replaceLabel("Category 2", "Cat 2");
1296 radCatAxis->replaceLabel("Category 2", "Cat 2");
1272 radCatAxis->replaceLabel("Category 3", "Cat 3");
1297 radCatAxis->replaceLabel("Category 3", "Cat 3");
1273 radCatAxis->append("Cat 4", 16500);
1298 radCatAxis->append("Cat 4", 16500);
1274 radCatAxis->append("Cat 5", 19000);
1299 radCatAxis->append("Cat 5", 19000);
1275 } else if (radCatAxis->count() == 5 && !ui->moreCategoriesCheckBox->isChecked()) {
1300 } else if (radCatAxis->count() == 5 && !ui->moreCategoriesCheckBox->isChecked()) {
1276 radCatAxis->setStartValue(2000);
1301 radCatAxis->setStartValue(2000);
1277 radCatAxis->replaceLabel("Cat 1", "Category 1");
1302 radCatAxis->replaceLabel("Cat 1", "Category 1");
1278 radCatAxis->replaceLabel("Cat 2", "Category 2");
1303 radCatAxis->replaceLabel("Cat 2", "Category 2");
1279 radCatAxis->replaceLabel("Cat 3", "Category 3");
1304 radCatAxis->replaceLabel("Cat 3", "Category 3");
1280 radCatAxis->remove("Cat 4");
1305 radCatAxis->remove("Cat 4");
1281 radCatAxis->remove("Cat 5");
1306 radCatAxis->remove("Cat 5");
1282 }
1307 }
1283 if (ui->categoryLabelLocationCheckBox->isChecked())
1308 if (ui->categoryLabelLocationCheckBox->isChecked())
1284 radCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionOnValue);
1309 radCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionOnValue);
1285 else
1310 else
1286 radCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionCenter);
1311 radCatAxis->setLabelsPosition(QCategoryAxis::AxisLabelsPositionCenter);
1287 }
1312 }
1288 }
1313 }
@@ -1,169 +1,170
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 #ifndef MAINWINDOW_H
19 #ifndef MAINWINDOW_H
20 #define MAINWINDOW_H
20 #define MAINWINDOW_H
21
21
22 #include <QtCharts/QPolarChart>
22 #include <QtCharts/QPolarChart>
23 #include <QtWidgets/QMainWindow>
23 #include <QtWidgets/QMainWindow>
24 #include <QtGui/QFont>
24 #include <QtGui/QFont>
25 #include <QtCharts/QChart>
25 #include <QtCharts/QChart>
26 #include <QtCharts/QScatterSeries>
26 #include <QtCharts/QScatterSeries>
27 #include <QtCharts/QLineSeries>
27 #include <QtCharts/QLineSeries>
28 #include <QtCharts/QSplineSeries>
28 #include <QtCharts/QSplineSeries>
29 #include <QtCharts/QAreaSeries>
29 #include <QtCharts/QAreaSeries>
30
30
31 QT_BEGIN_NAMESPACE
31 QT_BEGIN_NAMESPACE
32 class QBrush;
32 class QBrush;
33 class QPen;
33 class QPen;
34
34
35 namespace Ui {
35 namespace Ui {
36 class MainWindow;
36 class MainWindow;
37 }
37 }
38 QT_END_NAMESPACE
38 QT_END_NAMESPACE
39
39
40
40
41 QT_CHARTS_USE_NAMESPACE
41 QT_CHARTS_USE_NAMESPACE
42
42
43 class MainWindow : public QMainWindow
43 class MainWindow : public QMainWindow
44 {
44 {
45 Q_OBJECT
45 Q_OBJECT
46
46
47 public:
47 public:
48 explicit MainWindow(QWidget *parent = 0);
48 explicit MainWindow(QWidget *parent = 0);
49 ~MainWindow();
49 ~MainWindow();
50
50
51 public slots:
51 public slots:
52 void angularTicksChanged(int value);
52 void angularTicksChanged(int value);
53 void radialTicksChanged(int value);
53 void radialTicksChanged(int value);
54 void angularMinorTicksChanged(int value);
54 void angularMinorTicksChanged(int value);
55 void radialMinorTicksChanged(int value);
55 void radialMinorTicksChanged(int value);
56 void anglesChanged(int value);
56 void anglesChanged(int value);
57 void angularMinChanged(double value);
57 void angularMinChanged(double value);
58 void angularMaxChanged(double value);
58 void angularMaxChanged(double value);
59 void radialMinChanged(double value);
59 void radialMinChanged(double value);
60 void radialMaxChanged(double value);
60 void radialMaxChanged(double value);
61 void angularShadesIndexChanged(int index);
61 void angularShadesIndexChanged(int index);
62 void radialShadesIndexChanged(int index);
62 void radialShadesIndexChanged(int index);
63 void labelFormatEdited(const QString &text);
63 void labelFormatEdited(const QString &text);
64 void labelFontChanged(const QFont &font);
64 void labelFontChanged(const QFont &font);
65 void labelFontSizeChanged(int value);
65 void labelFontSizeChanged(int value);
66 void animationIndexChanged(int index);
66 void animationIndexChanged(int index);
67 void labelsIndexChanged(int index);
67 void labelsIndexChanged(int index);
68 void titleIndexChanged(int index);
68 void titleIndexChanged(int index);
69 void titleFontChanged(const QFont &font);
69 void titleFontChanged(const QFont &font);
70 void titleFontSizeChanged(int value);
70 void titleFontSizeChanged(int value);
71 void gridIndexChanged(int index);
71 void gridIndexChanged(int index);
72 void minorGridIndexChanged(int index);
72 void minorGridIndexChanged(int index);
73 void gridLineColorIndexChanged(int index);
73 void arrowIndexChanged(int index);
74 void arrowIndexChanged(int index);
74 void angularRangeChanged(qreal min, qreal max);
75 void angularRangeChanged(qreal min, qreal max);
75 void radialRangeChanged(qreal min, qreal max);
76 void radialRangeChanged(qreal min, qreal max);
76 void angularAxisIndexChanged(int index);
77 void angularAxisIndexChanged(int index);
77 void radialAxisIndexChanged(int index);
78 void radialAxisIndexChanged(int index);
78 void logBaseChanged(double value);
79 void logBaseChanged(double value);
79 void niceNumbersChecked();
80 void niceNumbersChecked();
80 void dateFormatEdited(const QString &text);
81 void dateFormatEdited(const QString &text);
81 void moreCategoriesChecked();
82 void moreCategoriesChecked();
82 void categoryLabelLocationChecked();
83 void categoryLabelLocationChecked();
83 void series1CheckBoxChecked();
84 void series1CheckBoxChecked();
84 void series2CheckBoxChecked();
85 void series2CheckBoxChecked();
85 void series3CheckBoxChecked();
86 void series3CheckBoxChecked();
86 void series4CheckBoxChecked();
87 void series4CheckBoxChecked();
87 void series5CheckBoxChecked();
88 void series5CheckBoxChecked();
88 void series6CheckBoxChecked();
89 void series6CheckBoxChecked();
89 void series7CheckBoxChecked();
90 void series7CheckBoxChecked();
90 void themeIndexChanged(int index);
91 void themeIndexChanged(int index);
91 void seriesHovered(QPointF point, bool state);
92 void seriesHovered(QPointF point, bool state);
92 void seriesClicked(const QPointF &point);
93 void seriesClicked(const QPointF &point);
93 void backgroundIndexChanged(int index);
94 void backgroundIndexChanged(int index);
94 void plotAreaIndexChanged(int index);
95 void plotAreaIndexChanged(int index);
95
96
96 private:
97 private:
97 enum AxisMode {
98 enum AxisMode {
98 AxisModeNone,
99 AxisModeNone,
99 AxisModeValue,
100 AxisModeValue,
100 AxisModeLogValue,
101 AxisModeLogValue,
101 AxisModeDateTime,
102 AxisModeDateTime,
102 AxisModeCategory
103 AxisModeCategory
103 };
104 };
104
105
105 void initXYValueChart();
106 void initXYValueChart();
106 void setAngularAxis(AxisMode mode);
107 void setAngularAxis(AxisMode mode);
107 void setRadialAxis(AxisMode mode);
108 void setRadialAxis(AxisMode mode);
108
109
109 void applyRanges();
110 void applyRanges();
110 void applyCategories();
111 void applyCategories();
111
112
112 Ui::MainWindow *ui;
113 Ui::MainWindow *ui;
113
114
114 int m_angularTickCount;
115 int m_angularTickCount;
115 int m_radialTickCount;
116 int m_radialTickCount;
116 int m_angularMinorTickCount;
117 int m_angularMinorTickCount;
117 int m_radialMinorTickCount;
118 int m_radialMinorTickCount;
118 qreal m_labelsAngle;
119 qreal m_labelsAngle;
119 qreal m_angularMin;
120 qreal m_angularMin;
120 qreal m_angularMax;
121 qreal m_angularMax;
121 qreal m_radialMin;
122 qreal m_radialMin;
122 qreal m_radialMax;
123 qreal m_radialMax;
123 bool m_angularShadesVisible;
124 bool m_angularShadesVisible;
124 bool m_radialShadesVisible;
125 bool m_radialShadesVisible;
125 bool m_labelsVisible;
126 bool m_labelsVisible;
126 bool m_titleVisible;
127 bool m_titleVisible;
127 bool m_gridVisible;
128 bool m_gridVisible;
128 bool m_arrowVisible;
129 bool m_arrowVisible;
129 bool m_minorGridVisible;
130 bool m_minorGridVisible;
130 bool m_minorArrowVisible;
131 bool m_minorArrowVisible;
131 QBrush *m_angularShadesBrush;
132 QBrush *m_angularShadesBrush;
132 QBrush *m_radialShadesBrush;
133 QBrush *m_radialShadesBrush;
133 QBrush *m_labelBrush;
134 QBrush *m_labelBrush;
134 QBrush *m_titleBrush;
135 QBrush *m_titleBrush;
135 QBrush *m_backgroundBrush;
136 QBrush *m_backgroundBrush;
136 QBrush *m_plotAreaBackgroundBrush;
137 QBrush *m_plotAreaBackgroundBrush;
137 QPen *m_angularShadesPen;
138 QPen *m_angularShadesPen;
138 QPen *m_radialShadesPen;
139 QPen *m_radialShadesPen;
139 QPen *m_gridPen;
140 QPen *m_gridPen;
140 QPen *m_arrowPen;
141 QPen *m_arrowPen;
141 QPen *m_minorGridPen;
142 QPen *m_minorGridPen;
142 QPen *m_backgroundPen;
143 QPen *m_backgroundPen;
143 QPen *m_plotAreaBackgroundPen;
144 QPen *m_plotAreaBackgroundPen;
144 QString m_labelFormat;
145 QString m_labelFormat;
145 QFont m_currentLabelFont;
146 QFont m_currentLabelFont;
146 QFont m_currentTitleFont;
147 QFont m_currentTitleFont;
147 QChart::AnimationOptions m_animationOptions;
148 QChart::AnimationOptions m_animationOptions;
148 QString m_angularTitle;
149 QString m_angularTitle;
149 QString m_radialTitle;
150 QString m_radialTitle;
150 qreal m_base;
151 qreal m_base;
151 QString m_dateFormat;
152 QString m_dateFormat;
152
153
153 QPolarChart *m_chart;
154 QPolarChart *m_chart;
154 QAbstractAxis *m_angularAxis;
155 QAbstractAxis *m_angularAxis;
155 QAbstractAxis *m_radialAxis;
156 QAbstractAxis *m_radialAxis;
156 AxisMode m_angularAxisMode;
157 AxisMode m_angularAxisMode;
157 AxisMode m_radialAxisMode;
158 AxisMode m_radialAxisMode;
158 bool m_moreCategories;
159 bool m_moreCategories;
159
160
160 QScatterSeries *m_series1;
161 QScatterSeries *m_series1;
161 QLineSeries *m_series2;
162 QLineSeries *m_series2;
162 QLineSeries *m_series3;
163 QLineSeries *m_series3;
163 QLineSeries *m_series4;
164 QLineSeries *m_series4;
164 QAreaSeries *m_series5;
165 QAreaSeries *m_series5;
165 QSplineSeries *m_series6;
166 QSplineSeries *m_series6;
166 QScatterSeries *m_series7;
167 QScatterSeries *m_series7;
167 };
168 };
168
169
169 #endif // MAINWINDOW_H
170 #endif // MAINWINDOW_H
@@ -1,949 +1,983
1 <?xml version="1.0" encoding="UTF-8"?>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
2 <ui version="4.0">
3 <class>MainWindow</class>
3 <class>MainWindow</class>
4 <widget class="QMainWindow" name="MainWindow">
4 <widget class="QMainWindow" name="MainWindow">
5 <property name="geometry">
5 <property name="geometry">
6 <rect>
6 <rect>
7 <x>0</x>
7 <x>0</x>
8 <y>0</y>
8 <y>0</y>
9 <width>1193</width>
9 <width>1193</width>
10 <height>1004</height>
10 <height>1004</height>
11 </rect>
11 </rect>
12 </property>
12 </property>
13 <property name="windowTitle">
13 <property name="windowTitle">
14 <string>MainWindow</string>
14 <string>MainWindow</string>
15 </property>
15 </property>
16 <widget class="QWidget" name="centralWidget">
16 <widget class="QWidget" name="centralWidget">
17 <layout class="QHBoxLayout" name="horizontalLayout">
17 <layout class="QHBoxLayout" name="horizontalLayout">
18 <item>
18 <item>
19 <widget class="ChartView" name="chartView"/>
19 <widget class="ChartView" name="chartView"/>
20 </item>
20 </item>
21 <item>
21 <item>
22 <widget class="QGroupBox" name="settingsBox">
22 <widget class="QGroupBox" name="settingsBox">
23 <property name="sizePolicy">
23 <property name="sizePolicy">
24 <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
24 <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
25 <horstretch>0</horstretch>
25 <horstretch>0</horstretch>
26 <verstretch>0</verstretch>
26 <verstretch>0</verstretch>
27 </sizepolicy>
27 </sizepolicy>
28 </property>
28 </property>
29 <property name="minimumSize">
29 <property name="minimumSize">
30 <size>
30 <size>
31 <width>200</width>
31 <width>200</width>
32 <height>0</height>
32 <height>0</height>
33 </size>
33 </size>
34 </property>
34 </property>
35 <property name="title">
35 <property name="title">
36 <string>Settings</string>
36 <string>Settings</string>
37 </property>
37 </property>
38 <widget class="QComboBox" name="angularShadesComboBox">
38 <widget class="QComboBox" name="angularShadesComboBox">
39 <property name="geometry">
39 <property name="geometry">
40 <rect>
40 <rect>
41 <x>10</x>
41 <x>10</x>
42 <y>313</y>
42 <y>313</y>
43 <width>187</width>
43 <width>187</width>
44 <height>20</height>
44 <height>20</height>
45 </rect>
45 </rect>
46 </property>
46 </property>
47 <item>
47 <item>
48 <property name="text">
48 <property name="text">
49 <string>No angular shades</string>
49 <string>No angular shades</string>
50 </property>
50 </property>
51 </item>
51 </item>
52 <item>
52 <item>
53 <property name="text">
53 <property name="text">
54 <string>Gray angular shades</string>
54 <string>Gray angular shades</string>
55 </property>
55 </property>
56 </item>
56 </item>
57 <item>
57 <item>
58 <property name="text">
58 <property name="text">
59 <string>Yellow ang. shades + custom pen</string>
59 <string>Yellow ang. shades + custom pen</string>
60 </property>
60 </property>
61 </item>
61 </item>
62 </widget>
62 </widget>
63 <widget class="QComboBox" name="radialShadesComboBox">
63 <widget class="QComboBox" name="radialShadesComboBox">
64 <property name="geometry">
64 <property name="geometry">
65 <rect>
65 <rect>
66 <x>10</x>
66 <x>10</x>
67 <y>339</y>
67 <y>339</y>
68 <width>175</width>
68 <width>175</width>
69 <height>20</height>
69 <height>20</height>
70 </rect>
70 </rect>
71 </property>
71 </property>
72 <item>
72 <item>
73 <property name="text">
73 <property name="text">
74 <string>No radial shades</string>
74 <string>No radial shades</string>
75 </property>
75 </property>
76 </item>
76 </item>
77 <item>
77 <item>
78 <property name="text">
78 <property name="text">
79 <string>Green radial shades</string>
79 <string>Green radial shades</string>
80 </property>
80 </property>
81 </item>
81 </item>
82 <item>
82 <item>
83 <property name="text">
83 <property name="text">
84 <string>Blue rad. shades + custom pen</string>
84 <string>Blue rad. shades + custom pen</string>
85 </property>
85 </property>
86 </item>
86 </item>
87 </widget>
87 </widget>
88 <widget class="QComboBox" name="animationsComboBox">
88 <widget class="QComboBox" name="animationsComboBox">
89 <property name="geometry">
89 <property name="geometry">
90 <rect>
90 <rect>
91 <x>10</x>
91 <x>10</x>
92 <y>471</y>
92 <y>471</y>
93 <width>104</width>
93 <width>104</width>
94 <height>20</height>
94 <height>20</height>
95 </rect>
95 </rect>
96 </property>
96 </property>
97 <item>
97 <item>
98 <property name="text">
98 <property name="text">
99 <string>No animations</string>
99 <string>No animations</string>
100 </property>
100 </property>
101 </item>
101 </item>
102 <item>
102 <item>
103 <property name="text">
103 <property name="text">
104 <string>Series animation</string>
104 <string>Series animation</string>
105 </property>
105 </property>
106 </item>
106 </item>
107 <item>
107 <item>
108 <property name="text">
108 <property name="text">
109 <string>Grid animation</string>
109 <string>Grid animation</string>
110 </property>
110 </property>
111 </item>
111 </item>
112 <item>
112 <item>
113 <property name="text">
113 <property name="text">
114 <string>All animations</string>
114 <string>All animations</string>
115 </property>
115 </property>
116 </item>
116 </item>
117 </widget>
117 </widget>
118 <widget class="QComboBox" name="labelComboBox">
118 <widget class="QComboBox" name="labelComboBox">
119 <property name="geometry">
119 <property name="geometry">
120 <rect>
120 <rect>
121 <x>10</x>
121 <x>10</x>
122 <y>445</y>
122 <y>445</y>
123 <width>134</width>
123 <width>134</width>
124 <height>20</height>
124 <height>20</height>
125 </rect>
125 </rect>
126 </property>
126 </property>
127 <property name="currentIndex">
127 <property name="currentIndex">
128 <number>1</number>
128 <number>1</number>
129 </property>
129 </property>
130 <item>
130 <item>
131 <property name="text">
131 <property name="text">
132 <string>No labels</string>
132 <string>No labels</string>
133 </property>
133 </property>
134 </item>
134 </item>
135 <item>
135 <item>
136 <property name="text">
136 <property name="text">
137 <string>Black label</string>
137 <string>Black label</string>
138 </property>
138 </property>
139 </item>
139 </item>
140 <item>
140 <item>
141 <property name="text">
141 <property name="text">
142 <string>White label + blue pen</string>
142 <string>White label + blue pen</string>
143 </property>
143 </property>
144 </item>
144 </item>
145 </widget>
145 </widget>
146 <widget class="QComboBox" name="titleComboBox">
146 <widget class="QComboBox" name="titleComboBox">
147 <property name="geometry">
147 <property name="geometry">
148 <rect>
148 <rect>
149 <x>10</x>
149 <x>10</x>
150 <y>551</y>
150 <y>551</y>
151 <width>130</width>
151 <width>130</width>
152 <height>20</height>
152 <height>20</height>
153 </rect>
153 </rect>
154 </property>
154 </property>
155 <property name="sizePolicy">
155 <property name="sizePolicy">
156 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
156 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
157 <horstretch>0</horstretch>
157 <horstretch>0</horstretch>
158 <verstretch>0</verstretch>
158 <verstretch>0</verstretch>
159 </sizepolicy>
159 </sizepolicy>
160 </property>
160 </property>
161 <property name="currentIndex">
161 <property name="currentIndex">
162 <number>3</number>
162 <number>3</number>
163 </property>
163 </property>
164 <item>
164 <item>
165 <property name="text">
165 <property name="text">
166 <string>Invisible empty title</string>
166 <string>Invisible empty title</string>
167 </property>
167 </property>
168 </item>
168 </item>
169 <item>
169 <item>
170 <property name="text">
170 <property name="text">
171 <string>Visible empty title</string>
171 <string>Visible empty title</string>
172 </property>
172 </property>
173 </item>
173 </item>
174 <item>
174 <item>
175 <property name="text">
175 <property name="text">
176 <string>Invisible title</string>
176 <string>Invisible title</string>
177 </property>
177 </property>
178 </item>
178 </item>
179 <item>
179 <item>
180 <property name="text">
180 <property name="text">
181 <string>Black title</string>
181 <string>Black title</string>
182 </property>
182 </property>
183 </item>
183 </item>
184 <item>
184 <item>
185 <property name="text">
185 <property name="text">
186 <string>White title + blue pen</string>
186 <string>White title + blue pen</string>
187 </property>
187 </property>
188 </item>
188 </item>
189 </widget>
189 </widget>
190 <widget class="QComboBox" name="gridComboBox">
190 <widget class="QComboBox" name="gridComboBox">
191 <property name="geometry">
191 <property name="geometry">
192 <rect>
192 <rect>
193 <x>10</x>
193 <x>10</x>
194 <y>577</y>
194 <y>577</y>
195 <width>104</width>
195 <width>104</width>
196 <height>20</height>
196 <height>20</height>
197 </rect>
197 </rect>
198 </property>
198 </property>
199 <property name="sizePolicy">
199 <property name="sizePolicy">
200 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
200 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
201 <horstretch>0</horstretch>
201 <horstretch>0</horstretch>
202 <verstretch>0</verstretch>
202 <verstretch>0</verstretch>
203 </sizepolicy>
203 </sizepolicy>
204 </property>
204 </property>
205 <property name="currentIndex">
205 <property name="currentIndex">
206 <number>1</number>
206 <number>1</number>
207 </property>
207 </property>
208 <item>
208 <item>
209 <property name="text">
209 <property name="text">
210 <string>Invisible grid</string>
210 <string>Invisible grid</string>
211 </property>
211 </property>
212 </item>
212 </item>
213 <item>
213 <item>
214 <property name="text">
214 <property name="text">
215 <string>Black grid</string>
215 <string>Black grid</string>
216 </property>
216 </property>
217 </item>
217 </item>
218 <item>
218 <item>
219 <property name="text">
219 <property name="text">
220 <string>Custom grid pen</string>
220 <string>Custom grid pen</string>
221 </property>
221 </property>
222 </item>
222 </item>
223 </widget>
223 </widget>
224 <widget class="QComboBox" name="arrowComboBox">
224 <widget class="QComboBox" name="arrowComboBox">
225 <property name="geometry">
225 <property name="geometry">
226 <rect>
226 <rect>
227 <x>10</x>
227 <x>10</x>
228 <y>603</y>
228 <y>603</y>
229 <width>114</width>
229 <width>114</width>
230 <height>20</height>
230 <height>20</height>
231 </rect>
231 </rect>
232 </property>
232 </property>
233 <property name="sizePolicy">
233 <property name="sizePolicy">
234 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
234 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
235 <horstretch>0</horstretch>
235 <horstretch>0</horstretch>
236 <verstretch>0</verstretch>
236 <verstretch>0</verstretch>
237 </sizepolicy>
237 </sizepolicy>
238 </property>
238 </property>
239 <property name="currentIndex">
239 <property name="currentIndex">
240 <number>1</number>
240 <number>1</number>
241 </property>
241 </property>
242 <item>
242 <item>
243 <property name="text">
243 <property name="text">
244 <string>Invisible arrow</string>
244 <string>Invisible arrow</string>
245 </property>
245 </property>
246 </item>
246 </item>
247 <item>
247 <item>
248 <property name="text">
248 <property name="text">
249 <string>Black arrow</string>
249 <string>Black arrow</string>
250 </property>
250 </property>
251 </item>
251 </item>
252 <item>
252 <item>
253 <property name="text">
253 <property name="text">
254 <string>Custom arrow pen</string>
254 <string>Custom arrow pen</string>
255 </property>
255 </property>
256 </item>
256 </item>
257 </widget>
257 </widget>
258 <widget class="QComboBox" name="angularAxisComboBox">
258 <widget class="QComboBox" name="angularAxisComboBox">
259 <property name="geometry">
259 <property name="geometry">
260 <rect>
260 <rect>
261 <x>10</x>
261 <x>10</x>
262 <y>23</y>
262 <y>23</y>
263 <width>134</width>
263 <width>134</width>
264 <height>20</height>
264 <height>20</height>
265 </rect>
265 </rect>
266 </property>
266 </property>
267 <property name="currentIndex">
267 <property name="currentIndex">
268 <number>1</number>
268 <number>1</number>
269 </property>
269 </property>
270 <item>
270 <item>
271 <property name="text">
271 <property name="text">
272 <string>No Angular Axis</string>
272 <string>No Angular Axis</string>
273 </property>
273 </property>
274 </item>
274 </item>
275 <item>
275 <item>
276 <property name="text">
276 <property name="text">
277 <string>Angular Value Axis</string>
277 <string>Angular Value Axis</string>
278 </property>
278 </property>
279 </item>
279 </item>
280 <item>
280 <item>
281 <property name="text">
281 <property name="text">
282 <string>Angular Log Axis</string>
282 <string>Angular Log Axis</string>
283 </property>
283 </property>
284 </item>
284 </item>
285 <item>
285 <item>
286 <property name="text">
286 <property name="text">
287 <string>Angular DateTime Axis</string>
287 <string>Angular DateTime Axis</string>
288 </property>
288 </property>
289 </item>
289 </item>
290 <item>
290 <item>
291 <property name="text">
291 <property name="text">
292 <string>Angular Category Axis</string>
292 <string>Angular Category Axis</string>
293 </property>
293 </property>
294 </item>
294 </item>
295 </widget>
295 </widget>
296 <widget class="QComboBox" name="radialAxisComboBox">
296 <widget class="QComboBox" name="radialAxisComboBox">
297 <property name="geometry">
297 <property name="geometry">
298 <rect>
298 <rect>
299 <x>10</x>
299 <x>10</x>
300 <y>49</y>
300 <y>49</y>
301 <width>126</width>
301 <width>126</width>
302 <height>20</height>
302 <height>20</height>
303 </rect>
303 </rect>
304 </property>
304 </property>
305 <property name="currentIndex">
305 <property name="currentIndex">
306 <number>1</number>
306 <number>1</number>
307 </property>
307 </property>
308 <item>
308 <item>
309 <property name="text">
309 <property name="text">
310 <string>No Radial Axis</string>
310 <string>No Radial Axis</string>
311 </property>
311 </property>
312 </item>
312 </item>
313 <item>
313 <item>
314 <property name="text">
314 <property name="text">
315 <string>Radial Value Axis</string>
315 <string>Radial Value Axis</string>
316 </property>
316 </property>
317 </item>
317 </item>
318 <item>
318 <item>
319 <property name="text">
319 <property name="text">
320 <string>Radial Log Axis</string>
320 <string>Radial Log Axis</string>
321 </property>
321 </property>
322 </item>
322 </item>
323 <item>
323 <item>
324 <property name="text">
324 <property name="text">
325 <string>Radial DateTime Axis</string>
325 <string>Radial DateTime Axis</string>
326 </property>
326 </property>
327 </item>
327 </item>
328 <item>
328 <item>
329 <property name="text">
329 <property name="text">
330 <string>Radial Category Axis</string>
330 <string>Radial Category Axis</string>
331 </property>
331 </property>
332 </item>
332 </item>
333 </widget>
333 </widget>
334 <widget class="QComboBox" name="themeComboBox">
334 <widget class="QComboBox" name="themeComboBox">
335 <property name="geometry">
335 <property name="geometry">
336 <rect>
336 <rect>
337 <x>10</x>
337 <x>10</x>
338 <y>814</y>
338 <y>810</y>
339 <width>131</width>
339 <width>131</width>
340 <height>20</height>
340 <height>20</height>
341 </rect>
341 </rect>
342 </property>
342 </property>
343 <property name="sizePolicy">
343 <property name="sizePolicy">
344 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
344 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
345 <horstretch>0</horstretch>
345 <horstretch>0</horstretch>
346 <verstretch>0</verstretch>
346 <verstretch>0</verstretch>
347 </sizepolicy>
347 </sizepolicy>
348 </property>
348 </property>
349 <property name="currentIndex">
349 <property name="currentIndex">
350 <number>0</number>
350 <number>0</number>
351 </property>
351 </property>
352 <item>
352 <item>
353 <property name="text">
353 <property name="text">
354 <string>Theme: Light</string>
354 <string>Theme: Light</string>
355 </property>
355 </property>
356 </item>
356 </item>
357 <item>
357 <item>
358 <property name="text">
358 <property name="text">
359 <string>Theme: Blue Cerulean</string>
359 <string>Theme: Blue Cerulean</string>
360 </property>
360 </property>
361 </item>
361 </item>
362 <item>
362 <item>
363 <property name="text">
363 <property name="text">
364 <string>Theme: Dark</string>
364 <string>Theme: Dark</string>
365 </property>
365 </property>
366 </item>
366 </item>
367 <item>
367 <item>
368 <property name="text">
368 <property name="text">
369 <string>Theme: Brown Sand</string>
369 <string>Theme: Brown Sand</string>
370 </property>
370 </property>
371 </item>
371 </item>
372 <item>
372 <item>
373 <property name="text">
373 <property name="text">
374 <string>Theme: Blue Ncs</string>
374 <string>Theme: Blue Ncs</string>
375 </property>
375 </property>
376 </item>
376 </item>
377 <item>
377 <item>
378 <property name="text">
378 <property name="text">
379 <string>Theme: High Contrast</string>
379 <string>Theme: High Contrast</string>
380 </property>
380 </property>
381 </item>
381 </item>
382 <item>
382 <item>
383 <property name="text">
383 <property name="text">
384 <string>Theme: Blue Icy</string>
384 <string>Theme: Blue Icy</string>
385 </property>
385 </property>
386 </item>
386 </item>
387 <item>
387 <item>
388 <property name="text">
388 <property name="text">
389 <string>Theme: Qt</string>
389 <string>Theme: Qt</string>
390 </property>
390 </property>
391 </item>
391 </item>
392 </widget>
392 </widget>
393 <widget class="QLabel" name="hoverLabel">
393 <widget class="QLabel" name="hoverLabel">
394 <property name="geometry">
394 <property name="geometry">
395 <rect>
395 <rect>
396 <x>10</x>
396 <x>10</x>
397 <y>840</y>
397 <y>830</y>
398 <width>117</width>
398 <width>117</width>
399 <height>16</height>
399 <height>16</height>
400 </rect>
400 </rect>
401 </property>
401 </property>
402 <property name="text">
402 <property name="text">
403 <string>Hover coordinates here!</string>
403 <string>Hover coordinates here!</string>
404 </property>
404 </property>
405 </widget>
405 </widget>
406 <widget class="QComboBox" name="backgroundComboBox">
406 <widget class="QComboBox" name="backgroundComboBox">
407 <property name="geometry">
407 <property name="geometry">
408 <rect>
408 <rect>
409 <x>10</x>
409 <x>10</x>
410 <y>877</y>
410 <y>877</y>
411 <width>195</width>
411 <width>195</width>
412 <height>20</height>
412 <height>20</height>
413 </rect>
413 </rect>
414 </property>
414 </property>
415 <property name="sizePolicy">
415 <property name="sizePolicy">
416 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
416 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
417 <horstretch>0</horstretch>
417 <horstretch>0</horstretch>
418 <verstretch>0</verstretch>
418 <verstretch>0</verstretch>
419 </sizepolicy>
419 </sizepolicy>
420 </property>
420 </property>
421 <property name="currentIndex">
421 <property name="currentIndex">
422 <number>0</number>
422 <number>0</number>
423 </property>
423 </property>
424 <item>
424 <item>
425 <property name="text">
425 <property name="text">
426 <string>Background: White</string>
426 <string>Background: White</string>
427 </property>
427 </property>
428 </item>
428 </item>
429 <item>
429 <item>
430 <property name="text">
430 <property name="text">
431 <string>Background: Blue</string>
431 <string>Background: Blue</string>
432 </property>
432 </property>
433 </item>
433 </item>
434 <item>
434 <item>
435 <property name="text">
435 <property name="text">
436 <string>Background: Yellow + Black Border</string>
436 <string>Background: Yellow + Black Border</string>
437 </property>
437 </property>
438 </item>
438 </item>
439 </widget>
439 </widget>
440 <widget class="QComboBox" name="plotAreaComboBox">
440 <widget class="QComboBox" name="plotAreaComboBox">
441 <property name="geometry">
441 <property name="geometry">
442 <rect>
442 <rect>
443 <x>10</x>
443 <x>10</x>
444 <y>903</y>
444 <y>903</y>
445 <width>165</width>
445 <width>165</width>
446 <height>20</height>
446 <height>20</height>
447 </rect>
447 </rect>
448 </property>
448 </property>
449 <property name="sizePolicy">
449 <property name="sizePolicy">
450 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
450 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
451 <horstretch>0</horstretch>
451 <horstretch>0</horstretch>
452 <verstretch>0</verstretch>
452 <verstretch>0</verstretch>
453 </sizepolicy>
453 </sizepolicy>
454 </property>
454 </property>
455 <property name="currentIndex">
455 <property name="currentIndex">
456 <number>0</number>
456 <number>0</number>
457 </property>
457 </property>
458 <item>
458 <item>
459 <property name="text">
459 <property name="text">
460 <string>PlotArea: Transparent</string>
460 <string>PlotArea: Transparent</string>
461 </property>
461 </property>
462 </item>
462 </item>
463 <item>
463 <item>
464 <property name="text">
464 <property name="text">
465 <string>PlotArea: Magenta</string>
465 <string>PlotArea: Magenta</string>
466 </property>
466 </property>
467 </item>
467 </item>
468 <item>
468 <item>
469 <property name="text">
469 <property name="text">
470 <string>PlotArea: Gray + Red Border</string>
470 <string>PlotArea: Gray + Red Border</string>
471 </property>
471 </property>
472 </item>
472 </item>
473 </widget>
473 </widget>
474 <widget class="QWidget" name="layoutWidget">
474 <widget class="QWidget" name="layoutWidget">
475 <property name="geometry">
475 <property name="geometry">
476 <rect>
476 <rect>
477 <x>10</x>
477 <x>10</x>
478 <y>207</y>
478 <y>207</y>
479 <width>185</width>
479 <width>185</width>
480 <height>100</height>
480 <height>100</height>
481 </rect>
481 </rect>
482 </property>
482 </property>
483 <layout class="QGridLayout" name="gridLayout_2">
483 <layout class="QGridLayout" name="gridLayout_2">
484 <item row="2" column="1">
484 <item row="2" column="1">
485 <widget class="QDoubleSpinBox" name="radialMinSpin">
485 <widget class="QDoubleSpinBox" name="radialMinSpin">
486 <property name="decimals">
486 <property name="decimals">
487 <number>5</number>
487 <number>5</number>
488 </property>
488 </property>
489 <property name="minimum">
489 <property name="minimum">
490 <double>-999999999.000000000000000</double>
490 <double>-999999999.000000000000000</double>
491 </property>
491 </property>
492 <property name="maximum">
492 <property name="maximum">
493 <double>999999999.000000000000000</double>
493 <double>999999999.000000000000000</double>
494 </property>
494 </property>
495 <property name="singleStep">
495 <property name="singleStep">
496 <double>10.000000000000000</double>
496 <double>10.000000000000000</double>
497 </property>
497 </property>
498 </widget>
498 </widget>
499 </item>
499 </item>
500 <item row="3" column="0">
500 <item row="3" column="0">
501 <widget class="QLabel" name="label_11">
501 <widget class="QLabel" name="label_11">
502 <property name="text">
502 <property name="text">
503 <string>Radial max</string>
503 <string>Radial max</string>
504 </property>
504 </property>
505 </widget>
505 </widget>
506 </item>
506 </item>
507 <item row="2" column="0">
507 <item row="2" column="0">
508 <widget class="QLabel" name="label_12">
508 <widget class="QLabel" name="label_12">
509 <property name="text">
509 <property name="text">
510 <string>Radial min</string>
510 <string>Radial min</string>
511 </property>
511 </property>
512 </widget>
512 </widget>
513 </item>
513 </item>
514 <item row="1" column="0">
514 <item row="1" column="0">
515 <widget class="QLabel" name="label_5">
515 <widget class="QLabel" name="label_5">
516 <property name="text">
516 <property name="text">
517 <string>Angular max</string>
517 <string>Angular max</string>
518 </property>
518 </property>
519 </widget>
519 </widget>
520 </item>
520 </item>
521 <item row="0" column="1">
521 <item row="0" column="1">
522 <widget class="QDoubleSpinBox" name="angularMinSpin">
522 <widget class="QDoubleSpinBox" name="angularMinSpin">
523 <property name="decimals">
523 <property name="decimals">
524 <number>5</number>
524 <number>5</number>
525 </property>
525 </property>
526 <property name="minimum">
526 <property name="minimum">
527 <double>-999999999.000000000000000</double>
527 <double>-999999999.000000000000000</double>
528 </property>
528 </property>
529 <property name="maximum">
529 <property name="maximum">
530 <double>999999999.000000000000000</double>
530 <double>999999999.000000000000000</double>
531 </property>
531 </property>
532 <property name="singleStep">
532 <property name="singleStep">
533 <double>10.000000000000000</double>
533 <double>10.000000000000000</double>
534 </property>
534 </property>
535 </widget>
535 </widget>
536 </item>
536 </item>
537 <item row="0" column="0">
537 <item row="0" column="0">
538 <widget class="QLabel" name="label_4">
538 <widget class="QLabel" name="label_4">
539 <property name="text">
539 <property name="text">
540 <string>Angular min</string>
540 <string>Angular min</string>
541 </property>
541 </property>
542 </widget>
542 </widget>
543 </item>
543 </item>
544 <item row="3" column="1">
544 <item row="3" column="1">
545 <widget class="QDoubleSpinBox" name="radialMaxSpin">
545 <widget class="QDoubleSpinBox" name="radialMaxSpin">
546 <property name="decimals">
546 <property name="decimals">
547 <number>5</number>
547 <number>5</number>
548 </property>
548 </property>
549 <property name="minimum">
549 <property name="minimum">
550 <double>-999999999.000000000000000</double>
550 <double>-999999999.000000000000000</double>
551 </property>
551 </property>
552 <property name="maximum">
552 <property name="maximum">
553 <double>999999999.000000000000000</double>
553 <double>999999999.000000000000000</double>
554 </property>
554 </property>
555 <property name="singleStep">
555 <property name="singleStep">
556 <double>10.000000000000000</double>
556 <double>10.000000000000000</double>
557 </property>
557 </property>
558 </widget>
558 </widget>
559 </item>
559 </item>
560 <item row="1" column="1">
560 <item row="1" column="1">
561 <widget class="QDoubleSpinBox" name="angularMaxSpin">
561 <widget class="QDoubleSpinBox" name="angularMaxSpin">
562 <property name="decimals">
562 <property name="decimals">
563 <number>5</number>
563 <number>5</number>
564 </property>
564 </property>
565 <property name="minimum">
565 <property name="minimum">
566 <double>-999999999.000000000000000</double>
566 <double>-999999999.000000000000000</double>
567 </property>
567 </property>
568 <property name="maximum">
568 <property name="maximum">
569 <double>999999999.000000000000000</double>
569 <double>999999999.000000000000000</double>
570 </property>
570 </property>
571 <property name="singleStep">
571 <property name="singleStep">
572 <double>10.000000000000000</double>
572 <double>10.000000000000000</double>
573 </property>
573 </property>
574 </widget>
574 </widget>
575 </item>
575 </item>
576 </layout>
576 </layout>
577 </widget>
577 </widget>
578 <widget class="QWidget" name="layoutWidget">
578 <widget class="QWidget" name="layoutWidget">
579 <property name="geometry">
579 <property name="geometry">
580 <rect>
580 <rect>
581 <x>10</x>
581 <x>10</x>
582 <y>365</y>
582 <y>365</y>
583 <width>210</width>
583 <width>210</width>
584 <height>74</height>
584 <height>74</height>
585 </rect>
585 </rect>
586 </property>
586 </property>
587 <layout class="QGridLayout" name="gridLayout_3">
587 <layout class="QGridLayout" name="gridLayout_3">
588 <item row="0" column="0">
588 <item row="0" column="0">
589 <widget class="QLabel" name="label_13">
589 <widget class="QLabel" name="label_13">
590 <property name="text">
590 <property name="text">
591 <string>Label format</string>
591 <string>Label format</string>
592 </property>
592 </property>
593 </widget>
593 </widget>
594 </item>
594 </item>
595 <item row="0" column="1">
595 <item row="0" column="1">
596 <widget class="QLineEdit" name="labelFormatEdit"/>
596 <widget class="QLineEdit" name="labelFormatEdit"/>
597 </item>
597 </item>
598 <item row="1" column="0">
598 <item row="1" column="0">
599 <widget class="QLabel" name="label_14">
599 <widget class="QLabel" name="label_14">
600 <property name="text">
600 <property name="text">
601 <string>Label font size</string>
601 <string>Label font size</string>
602 </property>
602 </property>
603 </widget>
603 </widget>
604 </item>
604 </item>
605 <item row="1" column="1">
605 <item row="1" column="1">
606 <widget class="QSpinBox" name="labelFontSizeSpin">
606 <widget class="QSpinBox" name="labelFontSizeSpin">
607 <property name="minimum">
607 <property name="minimum">
608 <number>-100000</number>
608 <number>-100000</number>
609 </property>
609 </property>
610 <property name="maximum">
610 <property name="maximum">
611 <number>100000</number>
611 <number>100000</number>
612 </property>
612 </property>
613 </widget>
613 </widget>
614 </item>
614 </item>
615 <item row="2" column="0" colspan="2">
615 <item row="2" column="0" colspan="2">
616 <widget class="QFontComboBox" name="labelFontComboBox"/>
616 <widget class="QFontComboBox" name="labelFontComboBox"/>
617 </item>
617 </item>
618 </layout>
618 </layout>
619 </widget>
619 </widget>
620 <widget class="QWidget" name="layoutWidget">
620 <widget class="QWidget" name="layoutWidget">
621 <property name="geometry">
621 <property name="geometry">
622 <rect>
622 <rect>
623 <x>10</x>
623 <x>10</x>
624 <y>497</y>
624 <y>497</y>
625 <width>190</width>
625 <width>190</width>
626 <height>48</height>
626 <height>48</height>
627 </rect>
627 </rect>
628 </property>
628 </property>
629 <layout class="QGridLayout" name="gridLayout_4">
629 <layout class="QGridLayout" name="gridLayout_4">
630 <item row="0" column="0">
630 <item row="0" column="0">
631 <widget class="QLabel" name="label_15">
631 <widget class="QLabel" name="label_15">
632 <property name="text">
632 <property name="text">
633 <string>Title font size</string>
633 <string>Title font size</string>
634 </property>
634 </property>
635 </widget>
635 </widget>
636 </item>
636 </item>
637 <item row="0" column="1">
637 <item row="0" column="1">
638 <widget class="QSpinBox" name="titleFontSizeSpin">
638 <widget class="QSpinBox" name="titleFontSizeSpin">
639 <property name="minimum">
639 <property name="minimum">
640 <number>-100000</number>
640 <number>-100000</number>
641 </property>
641 </property>
642 <property name="maximum">
642 <property name="maximum">
643 <number>100000</number>
643 <number>100000</number>
644 </property>
644 </property>
645 </widget>
645 </widget>
646 </item>
646 </item>
647 <item row="1" column="0" colspan="2">
647 <item row="1" column="0" colspan="2">
648 <widget class="QFontComboBox" name="titleFontComboBox"/>
648 <widget class="QFontComboBox" name="titleFontComboBox"/>
649 </item>
649 </item>
650 </layout>
650 </layout>
651 </widget>
651 </widget>
652 <widget class="QWidget" name="layoutWidget">
652 <widget class="QWidget" name="layoutWidget">
653 <property name="geometry">
653 <property name="geometry">
654 <rect>
654 <rect>
655 <x>10</x>
655 <x>10</x>
656 <y>655</y>
656 <y>655</y>
657 <width>168</width>
657 <width>168</width>
658 <height>22</height>
658 <height>22</height>
659 </rect>
659 </rect>
660 </property>
660 </property>
661 <layout class="QHBoxLayout" name="horizontalLayout_2">
661 <layout class="QHBoxLayout" name="horizontalLayout_2">
662 <item>
662 <item>
663 <widget class="QLabel" name="label_16">
663 <widget class="QLabel" name="label_16">
664 <property name="text">
664 <property name="text">
665 <string>Log Base</string>
665 <string>Log Base</string>
666 </property>
666 </property>
667 </widget>
667 </widget>
668 </item>
668 </item>
669 <item>
669 <item>
670 <widget class="QDoubleSpinBox" name="logBaseSpin">
670 <widget class="QDoubleSpinBox" name="logBaseSpin">
671 <property name="decimals">
671 <property name="decimals">
672 <number>5</number>
672 <number>5</number>
673 </property>
673 </property>
674 <property name="minimum">
674 <property name="minimum">
675 <double>-999999999.000000000000000</double>
675 <double>-999999999.000000000000000</double>
676 </property>
676 </property>
677 <property name="maximum">
677 <property name="maximum">
678 <double>999999999.000000000000000</double>
678 <double>999999999.000000000000000</double>
679 </property>
679 </property>
680 <property name="value">
680 <property name="value">
681 <double>8.000000000000000</double>
681 <double>8.000000000000000</double>
682 </property>
682 </property>
683 </widget>
683 </widget>
684 </item>
684 </item>
685 </layout>
685 </layout>
686 </widget>
686 </widget>
687 <widget class="QWidget" name="layoutWidget">
687 <widget class="QWidget" name="layoutWidget">
688 <property name="geometry">
688 <property name="geometry">
689 <rect>
689 <rect>
690 <x>10</x>
690 <x>10</x>
691 <y>680</y>
691 <y>680</y>
692 <width>191</width>
692 <width>198</width>
693 <height>31</height>
693 <height>31</height>
694 </rect>
694 </rect>
695 </property>
695 </property>
696 <layout class="QGridLayout" name="gridLayout_6">
696 <layout class="QGridLayout" name="gridLayout_6">
697 <item row="0" column="1">
697 <item row="0" column="1">
698 <widget class="QCheckBox" name="moreCategoriesCheckBox">
698 <widget class="QCheckBox" name="moreCategoriesCheckBox">
699 <property name="text">
699 <property name="text">
700 <string>More Categories</string>
700 <string>More Categories</string>
701 </property>
701 </property>
702 </widget>
702 </widget>
703 </item>
703 </item>
704 <item row="0" column="0">
704 <item row="0" column="0">
705 <widget class="QCheckBox" name="niceNumbersCheckBox">
705 <widget class="QCheckBox" name="niceNumbersCheckBox">
706 <property name="text">
706 <property name="text">
707 <string>Nice Numbers</string>
707 <string>Nice Numbers</string>
708 </property>
708 </property>
709 </widget>
709 </widget>
710 </item>
710 </item>
711 </layout>
711 </layout>
712 </widget>
712 </widget>
713 <widget class="QWidget" name="layoutWidget">
713 <widget class="QWidget" name="layoutWidget">
714 <property name="geometry">
714 <property name="geometry">
715 <rect>
715 <rect>
716 <x>10</x>
716 <x>10</x>
717 <y>740</y>
717 <y>730</y>
718 <width>221</width>
718 <width>221</width>
719 <height>22</height>
719 <height>22</height>
720 </rect>
720 </rect>
721 </property>
721 </property>
722 <layout class="QHBoxLayout" name="horizontalLayout_4">
722 <layout class="QHBoxLayout" name="horizontalLayout_4">
723 <item>
723 <item>
724 <widget class="QLabel" name="label_17">
724 <widget class="QLabel" name="label_17">
725 <property name="text">
725 <property name="text">
726 <string>DateTime format</string>
726 <string>DateTime format</string>
727 </property>
727 </property>
728 </widget>
728 </widget>
729 </item>
729 </item>
730 <item>
730 <item>
731 <widget class="QLineEdit" name="dateFormatEdit"/>
731 <widget class="QLineEdit" name="dateFormatEdit"/>
732 </item>
732 </item>
733 </layout>
733 </layout>
734 </widget>
734 </widget>
735 <widget class="QWidget" name="layoutWidget">
735 <widget class="QWidget" name="layoutWidget">
736 <property name="geometry">
736 <property name="geometry">
737 <rect>
737 <rect>
738 <x>10</x>
738 <x>10</x>
739 <y>766</y>
739 <y>760</y>
740 <width>136</width>
740 <width>136</width>
741 <height>42</height>
741 <height>42</height>
742 </rect>
742 </rect>
743 </property>
743 </property>
744 <layout class="QGridLayout" name="gridLayout_5">
744 <layout class="QGridLayout" name="gridLayout_5">
745 <item row="0" column="0">
745 <item row="0" column="0">
746 <widget class="QCheckBox" name="series1checkBox">
746 <widget class="QCheckBox" name="series1checkBox">
747 <property name="text">
747 <property name="text">
748 <string>1</string>
748 <string>1</string>
749 </property>
749 </property>
750 </widget>
750 </widget>
751 </item>
751 </item>
752 <item row="0" column="1">
752 <item row="0" column="1">
753 <widget class="QCheckBox" name="series2checkBox">
753 <widget class="QCheckBox" name="series2checkBox">
754 <property name="text">
754 <property name="text">
755 <string>2</string>
755 <string>2</string>
756 </property>
756 </property>
757 </widget>
757 </widget>
758 </item>
758 </item>
759 <item row="0" column="2">
759 <item row="0" column="2">
760 <widget class="QCheckBox" name="series3checkBox">
760 <widget class="QCheckBox" name="series3checkBox">
761 <property name="text">
761 <property name="text">
762 <string>3</string>
762 <string>3</string>
763 </property>
763 </property>
764 </widget>
764 </widget>
765 </item>
765 </item>
766 <item row="0" column="3" rowspan="2">
766 <item row="0" column="3" rowspan="2">
767 <widget class="QCheckBox" name="series7checkBox">
767 <widget class="QCheckBox" name="series7checkBox">
768 <property name="text">
768 <property name="text">
769 <string>7</string>
769 <string>7</string>
770 </property>
770 </property>
771 </widget>
771 </widget>
772 </item>
772 </item>
773 <item row="1" column="0">
773 <item row="1" column="0">
774 <widget class="QCheckBox" name="series4checkBox">
774 <widget class="QCheckBox" name="series4checkBox">
775 <property name="text">
775 <property name="text">
776 <string>4</string>
776 <string>4</string>
777 </property>
777 </property>
778 </widget>
778 </widget>
779 </item>
779 </item>
780 <item row="1" column="1">
780 <item row="1" column="1">
781 <widget class="QCheckBox" name="series5checkBox">
781 <widget class="QCheckBox" name="series5checkBox">
782 <property name="text">
782 <property name="text">
783 <string>5</string>
783 <string>5</string>
784 </property>
784 </property>
785 </widget>
785 </widget>
786 </item>
786 </item>
787 <item row="1" column="2">
787 <item row="1" column="2">
788 <widget class="QCheckBox" name="series6checkBox">
788 <widget class="QCheckBox" name="series6checkBox">
789 <property name="text">
789 <property name="text">
790 <string>6</string>
790 <string>6</string>
791 </property>
791 </property>
792 </widget>
792 </widget>
793 </item>
793 </item>
794 </layout>
794 </layout>
795 </widget>
795 </widget>
796 <widget class="QWidget" name="layoutWidget">
796 <widget class="QWidget" name="layoutWidget">
797 <property name="geometry">
797 <property name="geometry">
798 <rect>
798 <rect>
799 <x>10</x>
799 <x>10</x>
800 <y>75</y>
800 <y>75</y>
801 <width>178</width>
801 <width>178</width>
802 <height>126</height>
802 <height>126</height>
803 </rect>
803 </rect>
804 </property>
804 </property>
805 <layout class="QGridLayout" name="gridLayout">
805 <layout class="QGridLayout" name="gridLayout">
806 <item row="1" column="0">
806 <item row="1" column="0">
807 <widget class="QLabel" name="label_2">
807 <widget class="QLabel" name="label_2">
808 <property name="text">
808 <property name="text">
809 <string>Angular Tick count</string>
809 <string>Angular Tick count</string>
810 </property>
810 </property>
811 </widget>
811 </widget>
812 </item>
812 </item>
813 <item row="2" column="1">
813 <item row="2" column="1">
814 <widget class="QSpinBox" name="anglesSpin">
814 <widget class="QSpinBox" name="anglesSpin">
815 <property name="minimum">
815 <property name="minimum">
816 <number>-9999</number>
816 <number>-9999</number>
817 </property>
817 </property>
818 <property name="maximum">
818 <property name="maximum">
819 <number>9999</number>
819 <number>9999</number>
820 </property>
820 </property>
821 <property name="singleStep">
821 <property name="singleStep">
822 <number>5</number>
822 <number>5</number>
823 </property>
823 </property>
824 </widget>
824 </widget>
825 </item>
825 </item>
826 <item row="3" column="1">
826 <item row="3" column="1">
827 <widget class="QSpinBox" name="radialMinorTicksSpin"/>
827 <widget class="QSpinBox" name="radialMinorTicksSpin"/>
828 </item>
828 </item>
829 <item row="0" column="0">
829 <item row="0" column="0">
830 <widget class="QLabel" name="label">
830 <widget class="QLabel" name="label">
831 <property name="text">
831 <property name="text">
832 <string>Radial Tick count</string>
832 <string>Radial Tick count</string>
833 </property>
833 </property>
834 </widget>
834 </widget>
835 </item>
835 </item>
836 <item row="4" column="0">
836 <item row="4" column="0">
837 <widget class="QLabel" name="label_7">
837 <widget class="QLabel" name="label_7">
838 <property name="text">
838 <property name="text">
839 <string>Angular Minor Tick count</string>
839 <string>Angular Minor Tick count</string>
840 </property>
840 </property>
841 </widget>
841 </widget>
842 </item>
842 </item>
843 <item row="0" column="1">
843 <item row="0" column="1">
844 <widget class="QSpinBox" name="radialTicksSpin"/>
844 <widget class="QSpinBox" name="radialTicksSpin"/>
845 </item>
845 </item>
846 <item row="4" column="1">
846 <item row="4" column="1">
847 <widget class="QSpinBox" name="angularMinorTicksSpin"/>
847 <widget class="QSpinBox" name="angularMinorTicksSpin"/>
848 </item>
848 </item>
849 <item row="3" column="0">
849 <item row="3" column="0">
850 <widget class="QLabel" name="label_6">
850 <widget class="QLabel" name="label_6">
851 <property name="text">
851 <property name="text">
852 <string>Radial Minor Tick count</string>
852 <string>Radial Minor Tick count</string>
853 </property>
853 </property>
854 </widget>
854 </widget>
855 </item>
855 </item>
856 <item row="1" column="1">
856 <item row="1" column="1">
857 <widget class="QSpinBox" name="angularTicksSpin"/>
857 <widget class="QSpinBox" name="angularTicksSpin"/>
858 </item>
858 </item>
859 <item row="2" column="0">
859 <item row="2" column="0">
860 <widget class="QLabel" name="label_3">
860 <widget class="QLabel" name="label_3">
861 <property name="text">
861 <property name="text">
862 <string>Label angles</string>
862 <string>Label angles</string>
863 </property>
863 </property>
864 </widget>
864 </widget>
865 </item>
865 </item>
866 </layout>
866 </layout>
867 </widget>
867 </widget>
868 <widget class="QComboBox" name="minorGridComboBox">
868 <widget class="QComboBox" name="minorGridComboBox">
869 <property name="geometry">
869 <property name="geometry">
870 <rect>
870 <rect>
871 <x>10</x>
871 <x>10</x>
872 <y>630</y>
872 <y>630</y>
873 <width>141</width>
873 <width>141</width>
874 <height>20</height>
874 <height>20</height>
875 </rect>
875 </rect>
876 </property>
876 </property>
877 <property name="sizePolicy">
877 <property name="sizePolicy">
878 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
878 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
879 <horstretch>0</horstretch>
879 <horstretch>0</horstretch>
880 <verstretch>0</verstretch>
880 <verstretch>0</verstretch>
881 </sizepolicy>
881 </sizepolicy>
882 </property>
882 </property>
883 <property name="currentIndex">
883 <property name="currentIndex">
884 <number>1</number>
884 <number>1</number>
885 </property>
885 </property>
886 <item>
886 <item>
887 <property name="text">
887 <property name="text">
888 <string>Invisible minor grid</string>
888 <string>Invisible minor grid</string>
889 </property>
889 </property>
890 </item>
890 </item>
891 <item>
891 <item>
892 <property name="text">
892 <property name="text">
893 <string>Black minor grid</string>
893 <string>Black minor grid</string>
894 </property>
894 </property>
895 </item>
895 </item>
896 <item>
896 <item>
897 <property name="text">
897 <property name="text">
898 <string>Custom minor grid pen</string>
898 <string>Custom minor grid pen</string>
899 </property>
899 </property>
900 </item>
900 </item>
901 </widget>
901 </widget>
902 <widget class="QCheckBox" name="categoryLabelLocationCheckBox">
902 <widget class="QCheckBox" name="categoryLabelLocationCheckBox">
903 <property name="geometry">
903 <property name="geometry">
904 <rect>
904 <rect>
905 <x>10</x>
905 <x>10</x>
906 <y>710</y>
906 <y>710</y>
907 <width>142</width>
907 <width>142</width>
908 <height>17</height>
908 <height>17</height>
909 </rect>
909 </rect>
910 </property>
910 </property>
911 <property name="text">
911 <property name="text">
912 <string>Category Label On Tick</string>
912 <string>Category Label On Tick</string>
913 </property>
913 </property>
914 </widget>
914 </widget>
915 <widget class="QComboBox" name="gridLineColorComboBox">
916 <property name="geometry">
917 <rect>
918 <x>10</x>
919 <y>850</y>
920 <width>133</width>
921 <height>20</height>
922 </rect>
923 </property>
924 <property name="sizePolicy">
925 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
926 <horstretch>0</horstretch>
927 <verstretch>0</verstretch>
928 </sizepolicy>
929 </property>
930 <property name="currentIndex">
931 <number>0</number>
932 </property>
933 <item>
934 <property name="text">
935 <string>Black grid line</string>
936 </property>
937 </item>
938 <item>
939 <property name="text">
940 <string>Green grid line</string>
941 </property>
942 </item>
943 <item>
944 <property name="text">
945 <string>Red grid line</string>
946 </property>
947 </item>
948 </widget>
915 </widget>
949 </widget>
916 </item>
950 </item>
917 </layout>
951 </layout>
918 </widget>
952 </widget>
919 <widget class="QMenuBar" name="menuBar">
953 <widget class="QMenuBar" name="menuBar">
920 <property name="geometry">
954 <property name="geometry">
921 <rect>
955 <rect>
922 <x>0</x>
956 <x>0</x>
923 <y>0</y>
957 <y>0</y>
924 <width>1193</width>
958 <width>1193</width>
925 <height>21</height>
959 <height>21</height>
926 </rect>
960 </rect>
927 </property>
961 </property>
928 </widget>
962 </widget>
929 <widget class="QToolBar" name="mainToolBar">
963 <widget class="QToolBar" name="mainToolBar">
930 <attribute name="toolBarArea">
964 <attribute name="toolBarArea">
931 <enum>TopToolBarArea</enum>
965 <enum>TopToolBarArea</enum>
932 </attribute>
966 </attribute>
933 <attribute name="toolBarBreak">
967 <attribute name="toolBarBreak">
934 <bool>false</bool>
968 <bool>false</bool>
935 </attribute>
969 </attribute>
936 </widget>
970 </widget>
937 <widget class="QStatusBar" name="statusBar"/>
971 <widget class="QStatusBar" name="statusBar"/>
938 </widget>
972 </widget>
939 <layoutdefault spacing="6" margin="11"/>
973 <layoutdefault spacing="6" margin="11"/>
940 <customwidgets>
974 <customwidgets>
941 <customwidget>
975 <customwidget>
942 <class>ChartView</class>
976 <class>ChartView</class>
943 <extends>QGraphicsView</extends>
977 <extends>QGraphicsView</extends>
944 <header>chartview.h</header>
978 <header>chartview.h</header>
945 </customwidget>
979 </customwidget>
946 </customwidgets>
980 </customwidgets>
947 <resources/>
981 <resources/>
948 <connections/>
982 <connections/>
949 </ui>
983 </ui>
@@ -1,136 +1,146
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 import QtQuick 2.0
19 import QtQuick 2.0
20 import QtCharts 2.1
20 import QtCharts 2.1
21
21
22 ChartView {
22 ChartView {
23 id: chartView
23 id: chartView
24 title: "Chart Title"
24 title: "Chart Title"
25 anchors.fill: parent
25 anchors.fill: parent
26 property variant chart: chartView
26 property variant chart: chartView
27
27
28 LineSeries {
28 LineSeries {
29 name: "line"
29 name: "line"
30 XYPoint { x: 0; y: 0 }
30 XYPoint { x: 0; y: 0 }
31 XYPoint { x: 1.1; y: 2.1 }
31 XYPoint { x: 1.1; y: 2.1 }
32 XYPoint { x: 1.9; y: 3.3 }
32 XYPoint { x: 1.9; y: 3.3 }
33 XYPoint { x: 2.1; y: 2.1 }
33 XYPoint { x: 2.1; y: 2.1 }
34 XYPoint { x: 2.9; y: 4.9 }
34 XYPoint { x: 2.9; y: 4.9 }
35 XYPoint { x: 3.4; y: 3.0 }
35 XYPoint { x: 3.4; y: 3.0 }
36 XYPoint { x: 4.1; y: 3.3 }
36 XYPoint { x: 4.1; y: 3.3 }
37 axisX: axisX
37 axisX: axisX
38 axisY: axisY
38 axisY: axisY
39 }
39 }
40
40
41 onVisibleChanged: console.log("chart.onVisibleChanged: " + visible);
41 onVisibleChanged: console.log("chart.onVisibleChanged: " + visible);
42 onTitleColorChanged: console.log("chart.onTitleColorChanged: " + color);
42 onTitleColorChanged: console.log("chart.onTitleColorChanged: " + color);
43 onBackgroundColorChanged: console.log("chart.onBackgroundColorChanged: " + chart.backgroundColor);
43 onBackgroundColorChanged: console.log("chart.onBackgroundColorChanged: " + chart.backgroundColor);
44 onDropShadowEnabledChanged: console.log("chart.onDropShadowEnabledChanged: " + enabled);
44 onDropShadowEnabledChanged: console.log("chart.onDropShadowEnabledChanged: " + enabled);
45 onBackgroundRoundnessChanged: console.log("chart.onBackgroundRoundnessChanged: " + diameter);
45 onBackgroundRoundnessChanged: console.log("chart.onBackgroundRoundnessChanged: " + diameter);
46 onSeriesAdded: console.log("chart.onSeriesAdded: " + series.name);
46 onSeriesAdded: console.log("chart.onSeriesAdded: " + series.name);
47 onSeriesRemoved: console.log("chart.onSeriesRemoved: " + series.name);
47 onSeriesRemoved: console.log("chart.onSeriesRemoved: " + series.name);
48 onPlotAreaColorChanged: console.log("chart.onPlotAreaColorChanged: " + chart.plotAreaColor);
48 onPlotAreaColorChanged: console.log("chart.onPlotAreaColorChanged: " + chart.plotAreaColor);
49 onAnimationDurationChanged: console.log("chart.onAnimationDurationChanged: "
49 onAnimationDurationChanged: console.log("chart.onAnimationDurationChanged: "
50 + chart.animationDuration);
50 + chart.animationDuration);
51 onAnimationEasingCurveChanged: console.log("chart.onAnimationEasingCurveChanged: "
51 onAnimationEasingCurveChanged: console.log("chart.onAnimationEasingCurveChanged: "
52 + chart.animationEasingCurve.type);
52 + chart.animationEasingCurve.type);
53
53
54 legend.onVisibleChanged: console.log("legend.onVisibleChanged: " + chart.legend.visible);
54 legend.onVisibleChanged: console.log("legend.onVisibleChanged: " + chart.legend.visible);
55 legend.onBackgroundVisibleChanged: console.log("legend.onBackgroundVisibleChanged: " + visible);
55 legend.onBackgroundVisibleChanged: console.log("legend.onBackgroundVisibleChanged: " + visible);
56 legend.onColorChanged: console.log("legend.onColorChanged: " + color);
56 legend.onColorChanged: console.log("legend.onColorChanged: " + color);
57 legend.onBorderColorChanged: console.log("legend.onBorderColorChanged: " + color);
57 legend.onBorderColorChanged: console.log("legend.onBorderColorChanged: " + color);
58 legend.onLabelColorChanged: console.log("legend.onLabelColorChanged: " + color);
58 legend.onLabelColorChanged: console.log("legend.onLabelColorChanged: " + color);
59 legend.onReverseMarkersChanged: console.log("legend.onReverseMarkersChanged: "
59 legend.onReverseMarkersChanged: console.log("legend.onReverseMarkersChanged: "
60 + chart.legend.reverseMarkers)
60 + chart.legend.reverseMarkers)
61 margins.onTopChanged: console.log("chart.margins.onTopChanged: " + top );
61 margins.onTopChanged: console.log("chart.margins.onTopChanged: " + top );
62 margins.onBottomChanged: console.log("chart.margins.onBottomChanged: " + bottom);
62 margins.onBottomChanged: console.log("chart.margins.onBottomChanged: " + bottom);
63 margins.onLeftChanged: console.log("chart.margins.onLeftChanged: " + left);
63 margins.onLeftChanged: console.log("chart.margins.onLeftChanged: " + left);
64 margins.onRightChanged: console.log("chart.margins.onRightChanged: " + right);
64 margins.onRightChanged: console.log("chart.margins.onRightChanged: " + right);
65 onPlotAreaChanged: {
65 onPlotAreaChanged: {
66 console.log("chart.onPlotAreaChanged, width: " + chartView.plotArea.width
66 console.log("chart.onPlotAreaChanged, width: " + chartView.plotArea.width
67 + " height: " + chartView.plotArea.height
67 + " height: " + chartView.plotArea.height
68 + " y: " + chartView.plotArea.y
68 + " y: " + chartView.plotArea.y
69 + " x: " + chartView.plotArea.x);
69 + " x: " + chartView.plotArea.x);
70 marginVisualizer.opacity = 1.0;
70 marginVisualizer.opacity = 1.0;
71 }
71 }
72
72
73 ValueAxis{
73 ValueAxis{
74 id: axisX
74 id: axisX
75 minorGridVisible: false
76 minorTickCount: 2
75 onColorChanged: console.log("axisX.onColorChanged: " + color);
77 onColorChanged: console.log("axisX.onColorChanged: " + color);
76 onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible);
78 onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible);
77 onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color);
79 onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color);
78 onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible);
80 onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible);
79 onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible);
81 onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible);
82 onMinorGridVisibleChanged: console.log("axisX.onMinorGridVisibleChanged: " + visible);
83 onGridLineColorChanged: console.log("axisX.onGridLineColorChanged: " + color);
84 onMinorGridLineColorChanged: console.log("axisX.onMinorGridLineColorChanged: " + color);
80 onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible);
85 onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible);
81 onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color);
86 onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color);
82 onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color);
87 onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color);
83 onMinChanged: console.log("axisX.onMinChanged: " + min);
88 onMinChanged: console.log("axisX.onMinChanged: " + min);
84 onMaxChanged: console.log("axisX.onMaxChanged: " + max);
89 onMaxChanged: console.log("axisX.onMaxChanged: " + max);
85 onReverseChanged: console.log("axisX.onReverseChanged: " + reverse);
90 onReverseChanged: console.log("axisX.onReverseChanged: " + reverse);
86 }
91 }
87
92
88 ValueAxis{
93 ValueAxis{
89 id: axisY
94 id: axisY
95 minorGridVisible: false
96 minorTickCount: 2
90 onColorChanged: console.log("axisY.onColorChanged: " + color);
97 onColorChanged: console.log("axisY.onColorChanged: " + color);
91 onLabelsVisibleChanged: console.log("axisY.onLabelsVisibleChanged: " + visible);
98 onLabelsVisibleChanged: console.log("axisY.onLabelsVisibleChanged: " + visible);
92 onLabelsColorChanged: console.log("axisY.onLabelsColorChanged: " + color);
99 onLabelsColorChanged: console.log("axisY.onLabelsColorChanged: " + color);
93 onVisibleChanged: console.log("axisY.onVisibleChanged: " + visible);
100 onVisibleChanged: console.log("axisY.onVisibleChanged: " + visible);
94 onGridVisibleChanged: console.log("axisY.onGridVisibleChanged: " + visible);
101 onGridVisibleChanged: console.log("axisY.onGridVisibleChanged: " + visible);
102 onMinorGridVisibleChanged: console.log("axisX.onMinorGridVisibleChanged: " + visible);
103 onGridLineColorChanged: console.log("axisX.onGridLineColorChanged: " + color);
104 onMinorGridLineColorChanged: console.log("axisX.onMinorGridLineColorChanged: " + color);
95 onShadesVisibleChanged: console.log("axisY.onShadesVisibleChanged: " + visible);
105 onShadesVisibleChanged: console.log("axisY.onShadesVisibleChanged: " + visible);
96 onShadesColorChanged: console.log("axisY.onShadesColorChanged: " + color);
106 onShadesColorChanged: console.log("axisY.onShadesColorChanged: " + color);
97 onShadesBorderColorChanged: console.log("axisY.onShadesBorderColorChanged: " + color);
107 onShadesBorderColorChanged: console.log("axisY.onShadesBorderColorChanged: " + color);
98 onMinChanged: console.log("axisY.onMinChanged: " + min);
108 onMinChanged: console.log("axisY.onMinChanged: " + min);
99 onMaxChanged: console.log("axisY.onMaxChanged: " + max);
109 onMaxChanged: console.log("axisY.onMaxChanged: " + max);
100 onReverseChanged: console.log("axisY.onReverseChanged: " + reverse);
110 onReverseChanged: console.log("axisY.onReverseChanged: " + reverse);
101 }
111 }
102
112
103 Rectangle {
113 Rectangle {
104 id: marginVisualizer
114 id: marginVisualizer
105 color: "transparent"
115 color: "transparent"
106 border.color: "red"
116 border.color: "red"
107 anchors.fill: parent
117 anchors.fill: parent
108 anchors.topMargin: chartView.margins.top
118 anchors.topMargin: chartView.margins.top
109 anchors.bottomMargin: chartView.margins.bottom
119 anchors.bottomMargin: chartView.margins.bottom
110 anchors.leftMargin: chartView.margins.left
120 anchors.leftMargin: chartView.margins.left
111 anchors.rightMargin: chartView.margins.right
121 anchors.rightMargin: chartView.margins.right
112 opacity: 0.0
122 opacity: 0.0
113 onOpacityChanged: if (opacity > 0.9) opacity = 0.0;
123 onOpacityChanged: if (opacity > 0.9) opacity = 0.0;
114 Behavior on opacity {
124 Behavior on opacity {
115 NumberAnimation { duration: 800 }
125 NumberAnimation { duration: 800 }
116 }
126 }
117 }
127 }
118
128
119 MouseArea {
129 MouseArea {
120 id: zoomArea
130 id: zoomArea
121 anchors.fill: parent
131 anchors.fill: parent
122 acceptedButtons: Qt.LeftButton
132 acceptedButtons: Qt.LeftButton
123 property point mousePoint;
133 property point mousePoint;
124 property point valuePoint;
134 property point valuePoint;
125
135
126 onPressed: {
136 onPressed: {
127 mousePoint.x = mouse.x
137 mousePoint.x = mouse.x
128 mousePoint.y = mouse.y
138 mousePoint.y = mouse.y
129 valuePoint = chart.mapToValue(mousePoint, series("line"));
139 valuePoint = chart.mapToValue(mousePoint, series("line"));
130 // Mouse point and position should be the same!
140 // Mouse point and position should be the same!
131 console.log("mouse point: " + mouse.x + ", " + mouse.y);
141 console.log("mouse point: " + mouse.x + ", " + mouse.y);
132 console.log("value point: " + valuePoint);
142 console.log("value point: " + valuePoint);
133 console.log("position: " + chart.mapToPosition(valuePoint, series("line")));
143 console.log("position: " + chart.mapToPosition(valuePoint, series("line")));
134 }
144 }
135 }
145 }
136 }
146 }
@@ -1,140 +1,148
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd
3 ** Copyright (C) 2015 The Qt Company Ltd
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
5 ** For any questions to The Qt Company, please use contact form at http://qt.io
6 **
6 **
7 ** This file is part of the Qt Charts module.
7 ** This file is part of the Qt Charts module.
8 **
8 **
9 ** Licensees holding valid commercial license for Qt may use this file in
9 ** Licensees holding valid commercial license for Qt may use this file in
10 ** accordance with the Qt License Agreement provided with the Software
10 ** accordance with the Qt License Agreement provided with the Software
11 ** or, alternatively, in accordance with the terms contained in a written
11 ** or, alternatively, in accordance with the terms contained in a written
12 ** agreement between you and The Qt Company.
12 ** agreement between you and The Qt Company.
13 **
13 **
14 ** If you have questions regarding the use of this file, please use
14 ** If you have questions regarding the use of this file, please use
15 ** contact form at http://qt.io
15 ** contact form at http://qt.io
16 **
16 **
17 ****************************************************************************/
17 ****************************************************************************/
18
18
19 import QtQuick 2.0
19 import QtQuick 2.0
20
20
21 Row {
21 Row {
22 anchors.fill: parent
22 anchors.fill: parent
23 spacing: 5
23 spacing: 5
24 property variant axis
24 property variant axis
25
25
26 Flow {
26 Flow {
27 spacing: 5
27 spacing: 5
28 flow: Flow.TopToBottom
28 flow: Flow.TopToBottom
29 height: parent.height
29 height: parent.height
30
30
31 Button {
31 Button {
32 text: "axis visible"
32 text: "axis visible"
33 onClicked: axis.visible = !axis.visible;
33 onClicked: axis.visible = !axis.visible;
34 }
34 }
35 Button {
35 Button {
36 text: "axis line visible"
36 text: "axis line visible"
37 onClicked: axis.lineVisible = !axis.lineVisible;
37 onClicked: axis.lineVisible = !axis.lineVisible;
38 }
38 }
39 Button {
39 Button {
40 text: "axis color"
40 text: "axis color"
41 onClicked: axis.color = main.nextColor();
41 onClicked: axis.color = main.nextColor();
42 }
42 }
43 Button {
43 Button {
44 text: "axis labels visible"
44 text: "axis labels visible"
45 onClicked: axis.labelsVisible = !axis.labelsVisible;
45 onClicked: axis.labelsVisible = !axis.labelsVisible;
46 }
46 }
47 Button {
47 Button {
48 text: "axis labels angle +"
48 text: "axis labels angle +"
49 onClicked: axis.labelsAngle += 5;
49 onClicked: axis.labelsAngle += 5;
50 }
50 }
51 Button {
51 Button {
52 text: "axis labels angle -"
52 text: "axis labels angle -"
53 onClicked: axis.labelsAngle -= 5;
53 onClicked: axis.labelsAngle -= 5;
54 }
54 }
55 Button {
55 Button {
56 text: "axis labels color"
56 text: "axis labels color"
57 onClicked: axis.labelsColor = main.nextColor();
57 onClicked: axis.labelsColor = main.nextColor();
58 }
58 }
59 Button {
59 Button {
60 text: "axis grid visible"
60 text: "axis grid visible"
61 onClicked: axis.gridVisible = !axis.gridVisible;
61 onClicked: axis.gridVisible = !axis.gridVisible;
62 }
62 }
63 Button {
63 Button {
64 text: "axis minor grid visible"
64 text: "axis minor grid visible"
65 onClicked: axis.minorGridVisible = !axis.minorGridVisible;
65 onClicked: axis.minorGridVisible = !axis.minorGridVisible;
66 }
66 }
67 Button {
67 Button {
68 text: "axis grid color"
69 onClicked: axis.gridLineColor = main.nextColor();
70 }
71 Button {
72 text: "axis minor grid color"
73 onClicked: axis.minorGridLineColor = main.nextColor();
74 }
75 Button {
68 text: "axis shades visible"
76 text: "axis shades visible"
69 onClicked: axis.shadesVisible = !axis.shadesVisible;
77 onClicked: axis.shadesVisible = !axis.shadesVisible;
70 }
78 }
71 Button {
79 Button {
72 text: "axis shades color"
80 text: "axis shades color"
73 onClicked: axis.shadesColor = main.nextColor();
81 onClicked: axis.shadesColor = main.nextColor();
74 }
82 }
75 Button {
83 Button {
76 text: "axis shades bcolor"
84 text: "axis shades bcolor"
77 onClicked: axis.shadesBorderColor = main.nextColor();
85 onClicked: axis.shadesBorderColor = main.nextColor();
78 }
86 }
79 Button {
87 Button {
80 text: "axis title text"
88 text: "axis title text"
81 onClicked: axis.titleText = axis.titleText + "X";
89 onClicked: axis.titleText = axis.titleText + "X";
82 }
90 }
83 Button {
91 Button {
84 text: "axis title visible"
92 text: "axis title visible"
85 onClicked: axis.titleVisible = !axis.titleVisible;
93 onClicked: axis.titleVisible = !axis.titleVisible;
86 }
94 }
87 Button {
95 Button {
88 text: "axis max +"
96 text: "axis max +"
89 onClicked: axis.max += 0.1;
97 onClicked: axis.max += 0.1;
90 }
98 }
91 Button {
99 Button {
92 text: "axis max -"
100 text: "axis max -"
93 onClicked: axis.max -= 0.1;
101 onClicked: axis.max -= 0.1;
94 }
102 }
95 Button {
103 Button {
96 text: "axis min +"
104 text: "axis min +"
97 onClicked: axis.min += 0.1;
105 onClicked: axis.min += 0.1;
98 }
106 }
99 Button {
107 Button {
100 text: "axis min -"
108 text: "axis min -"
101 onClicked: axis.min -= 0.1;
109 onClicked: axis.min -= 0.1;
102 }
110 }
103 Button {
111 Button {
104 text: "axis tick count +"
112 text: "axis tick count +"
105 onClicked: axis.tickCount++;
113 onClicked: axis.tickCount++;
106 }
114 }
107 Button {
115 Button {
108 text: "axis tick count -"
116 text: "axis tick count -"
109 onClicked: axis.tickCount--;
117 onClicked: axis.tickCount--;
110 }
118 }
111 Button {
119 Button {
112 text: "axis minor tick count +"
120 text: "axis minor tick count +"
113 onClicked: axis.minorTickCount++;
121 onClicked: axis.minorTickCount++;
114 }
122 }
115 Button {
123 Button {
116 text: "axis minor tick count -"
124 text: "axis minor tick count -"
117 onClicked: axis.minorTickCount--;
125 onClicked: axis.minorTickCount--;
118 }
126 }
119 Button {
127 Button {
120 text: "axis reverse"
128 text: "axis reverse"
121 onClicked: axis.reverse = !axis.reverse;
129 onClicked: axis.reverse = !axis.reverse;
122 }
130 }
123
131
124 FontEditor {
132 FontEditor {
125 id: fontEditor
133 id: fontEditor
126 fontDescription: "axis"
134 fontDescription: "axis"
127 function editedFont() {
135 function editedFont() {
128 return axis.labelsFont;
136 return axis.labelsFont;
129 }
137 }
130 }
138 }
131
139
132 FontEditor {
140 FontEditor {
133 id: titleFontEditor
141 id: titleFontEditor
134 fontDescription: "title"
142 fontDescription: "title"
135 function editedFont() {
143 function editedFont() {
136 return axis.titleFont;
144 return axis.titleFont;
137 }
145 }
138 }
146 }
139 }
147 }
140 }
148 }
General Comments 0
You need to be logged in to leave comments. Login now