##// END OF EJS Templates
Rename axisLabelsChanged to axisRangeChanged
Michal Klocek -
r399:91816cf9fc5c
parent child
Show More
@@ -117,7 +117,7 void AxisItem::handleAxisUpdate(QChartAxis* axis)
117 setShadesBrush(axis->shadesBrush());
117 setShadesBrush(axis->shadesBrush());
118 }
118 }
119
119
120 void AxisItem::handleLabelsChanged(QChartAxis* axis,const QStringList& labels)
120 void AxisItem::handleRangeChanged(QChartAxis* axis,const QStringList& labels)
121 {
121 {
122 int diff = m_thicksList.size() - labels.size();
122 int diff = m_thicksList.size() - labels.size();
123
123
@@ -51,7 +51,7 public:
51
51
52 public slots:
52 public slots:
53 void handleAxisUpdate(QChartAxis* axis); //look and feel
53 void handleAxisUpdate(QChartAxis* axis); //look and feel
54 void handleLabelsChanged(QChartAxis* axis,const QStringList& labels); //labels from dataset
54 void handleRangeChanged(QChartAxis* axis,const QStringList& labels); //labels from dataset
55 void handleGeometryChanged(const QRectF& size); // geometry from presenter
55 void handleGeometryChanged(const QRectF& size); // geometry from presenter
56 public:
56 public:
57 virtual void updateItems(QVector<qreal>& oldLayout,QVector<qreal>& newLayout);
57 virtual void updateItems(QVector<qreal>& oldLayout,QVector<qreal>& newLayout);
@@ -152,8 +152,8 void ChartDataSet::addSeries(QSeries* series, QChartAxis *axisY)
152
152
153 QStringList ylabels = createLabels(axisY,domain.m_minY,domain.m_maxY);
153 QStringList ylabels = createLabels(axisY,domain.m_minY,domain.m_maxY);
154 QStringList xlabels = createLabels(axisX(),domain.m_minX,domain.m_maxX);
154 QStringList xlabels = createLabels(axisX(),domain.m_minX,domain.m_maxX);
155 emit axisLabelsChanged(axisY,ylabels);
155 emit axisRangeChanged(axisY,ylabels);
156 emit axisLabelsChanged(axisX(),xlabels);
156 emit axisRangeChanged(axisX(),xlabels);
157 emit seriesAdded(series);
157 emit seriesAdded(series);
158 emit seriesDomainChanged(series,domain);
158 emit seriesDomainChanged(series,domain);
159
159
@@ -240,11 +240,11 void ChartDataSet::setDomain(int index)
240 foreach(QSeries* series, seriesList) {
240 foreach(QSeries* series, seriesList) {
241 emit seriesDomainChanged(series,domain);
241 emit seriesDomainChanged(series,domain);
242 }
242 }
243 emit axisLabelsChanged(axis,labels);
243 emit axisRangeChanged(axis,labels);
244 }
244 }
245
245
246 QStringList labels = createLabels(axisX(),domain.m_minX,domain.m_maxX);
246 QStringList labels = createLabels(axisX(),domain.m_minX,domain.m_maxX);
247 emit axisLabelsChanged(axisX(),labels);
247 emit axisRangeChanged(axisX(),labels);
248 }
248 }
249
249
250 void ChartDataSet::clearDomains(int toIndex)
250 void ChartDataSet::clearDomains(int toIndex)
@@ -286,12 +286,12 void ChartDataSet::addDomain(const QRectF& rect, const QRectF& viewport)
286 foreach(QSeries* series, seriesList){
286 foreach(QSeries* series, seriesList){
287 emit seriesDomainChanged(series,domain);
287 emit seriesDomainChanged(series,domain);
288 }
288 }
289 emit axisLabelsChanged(axis,labels);
289 emit axisRangeChanged(axis,labels);
290 m_domainMap.insert(axis,domain);
290 m_domainMap.insert(axis,domain);
291 }
291 }
292
292
293 QStringList labels = createLabels(axisX(),domain.m_minX,domain.m_maxX);
293 QStringList labels = createLabels(axisX(),domain.m_minX,domain.m_maxX);
294 emit axisLabelsChanged(axisX(),labels);
294 emit axisRangeChanged(axisX(),labels);
295
295
296 m_domainIndex++;
296 m_domainIndex++;
297 }
297 }
@@ -346,10 +346,10 void ChartDataSet::handleTickChanged(QChartAxis* axis)
346 Domain domain = m_domainMap.value(axisY());
346 Domain domain = m_domainMap.value(axisY());
347 if(axis==axisX()){
347 if(axis==axisX()){
348 QStringList labels = createLabels(axis,domain.m_minX,domain.m_maxX);
348 QStringList labels = createLabels(axis,domain.m_minX,domain.m_maxX);
349 emit axisLabelsChanged(axis,labels);
349 emit axisRangeChanged(axis,labels);
350 }else{
350 }else{
351 QStringList labels = createLabels(axis,domain.m_minY,domain.m_maxY);
351 QStringList labels = createLabels(axis,domain.m_minY,domain.m_maxY);
352 emit axisLabelsChanged(axis,labels);
352 emit axisRangeChanged(axis,labels);
353 }
353 }
354 }
354 }
355
355
@@ -35,7 +35,7 signals:
35 void seriesRemoved(QSeries* series);
35 void seriesRemoved(QSeries* series);
36 void axisAdded(QChartAxis* axis);
36 void axisAdded(QChartAxis* axis);
37 void axisRemoved(QChartAxis* axis);
37 void axisRemoved(QChartAxis* axis);
38 void axisLabelsChanged(QChartAxis* axis, const QStringList& labels);
38 void axisRangeChanged(QChartAxis* axis, const QStringList& labels);
39 void seriesDomainChanged(QSeries* series,const Domain& domain);
39 void seriesDomainChanged(QSeries* series,const Domain& domain);
40
40
41 private slots:
41 private slots:
@@ -48,7 +48,7 void ChartPresenter::createConnections()
48 QObject::connect(m_dataset,SIGNAL(axisAdded(QChartAxis*)),this,SLOT(handleAxisAdded(QChartAxis*)));
48 QObject::connect(m_dataset,SIGNAL(axisAdded(QChartAxis*)),this,SLOT(handleAxisAdded(QChartAxis*)));
49 QObject::connect(m_dataset,SIGNAL(axisRemoved(QChartAxis*)),this,SLOT(handleAxisRemoved(QChartAxis*)));
49 QObject::connect(m_dataset,SIGNAL(axisRemoved(QChartAxis*)),this,SLOT(handleAxisRemoved(QChartAxis*)));
50 QObject::connect(m_dataset,SIGNAL(seriesDomainChanged(QSeries*,const Domain&)),this,SLOT(handleSeriesDomainChanged(QSeries*,const Domain&)));
50 QObject::connect(m_dataset,SIGNAL(seriesDomainChanged(QSeries*,const Domain&)),this,SLOT(handleSeriesDomainChanged(QSeries*,const Domain&)));
51 QObject::connect(m_dataset,SIGNAL(axisLabelsChanged(QChartAxis*,const QStringList&)),this,SLOT(handleAxisLabelsChanged(QChartAxis*,const QStringList&)));
51 QObject::connect(m_dataset,SIGNAL(axisRangeChanged(QChartAxis*,const QStringList&)),this,SLOT(handleAxisRangeChanged(QChartAxis*,const QStringList&)));
52 }
52 }
53
53
54
54
@@ -217,9 +217,9 void ChartPresenter::handleSeriesDomainChanged(QSeries* series, const Domain& do
217 m_chartItems.value(series)->handleDomainChanged(domain);
217 m_chartItems.value(series)->handleDomainChanged(domain);
218 }
218 }
219
219
220 void ChartPresenter::handleAxisLabelsChanged(QChartAxis* axis,const QStringList& labels)
220 void ChartPresenter::handleAxisRangeChanged(QChartAxis* axis,const QStringList& labels)
221 {
221 {
222 m_axisItems.value(axis)->handleLabelsChanged(axis,labels);
222 m_axisItems.value(axis)->handleRangeChanged(axis,labels);
223 }
223 }
224
224
225 void ChartPresenter::setChartTheme(QChart::ChartTheme theme)
225 void ChartPresenter::setChartTheme(QChart::ChartTheme theme)
@@ -52,7 +52,7 public slots:
52 void handleAxisAdded(QChartAxis* axis);
52 void handleAxisAdded(QChartAxis* axis);
53 void handleAxisRemoved(QChartAxis* axis);
53 void handleAxisRemoved(QChartAxis* axis);
54 void handleSeriesDomainChanged(QSeries* series, const Domain& domain);
54 void handleSeriesDomainChanged(QSeries* series, const Domain& domain);
55 void handleAxisLabelsChanged(QChartAxis* axis, const QStringList& labels);
55 void handleAxisRangeChanged(QChartAxis* axis, const QStringList& labels);
56 void handleGeometryChanged();
56 void handleGeometryChanged();
57 signals:
57 signals:
58 void geometryChanged(const QRectF& rect);
58 void geometryChanged(const QRectF& rect);
@@ -108,7 +108,7 void tst_ChartDataSet::addDomain()
108
108
109 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
109 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
110 QSignalSpy spy1(&dataSet,
110 QSignalSpy spy1(&dataSet,
111 SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
111 SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
112 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
112 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
113 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
113 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
114 QSignalSpy spy4(&dataSet,
114 QSignalSpy spy4(&dataSet,
@@ -154,7 +154,7 void tst_ChartDataSet::addSeries()
154
154
155 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
155 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
156 QSignalSpy spy1(&dataSet,
156 QSignalSpy spy1(&dataSet,
157 SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
157 SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
158 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
158 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
159 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
159 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
160 QSignalSpy spy4(&dataSet,
160 QSignalSpy spy4(&dataSet,
@@ -268,7 +268,7 void tst_ChartDataSet::clearDomains()
268
268
269 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
269 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
270 QSignalSpy spy1(&dataSet,
270 QSignalSpy spy1(&dataSet,
271 SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
271 SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
272 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
272 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
273 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
273 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
274 QSignalSpy spy4(&dataSet,
274 QSignalSpy spy4(&dataSet,
@@ -326,7 +326,7 void tst_ChartDataSet::domain()
326
326
327 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
327 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
328 QSignalSpy spy1(&dataSet,
328 QSignalSpy spy1(&dataSet,
329 SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
329 SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
330 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
330 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
331 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
331 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
332 QSignalSpy spy4(&dataSet,
332 QSignalSpy spy4(&dataSet,
@@ -403,7 +403,7 void tst_ChartDataSet::nextpreviousDomain()
403
403
404 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
404 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
405 QSignalSpy spy1(&dataSet,
405 QSignalSpy spy1(&dataSet,
406 SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
406 SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
407 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
407 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
408 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
408 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
409 QSignalSpy spy4(&dataSet,
409 QSignalSpy spy4(&dataSet,
@@ -501,7 +501,7 void tst_ChartDataSet::removeSeries()
501
501
502 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
502 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
503 QSignalSpy spy1(&dataSet,
503 QSignalSpy spy1(&dataSet,
504 SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
504 SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
505 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
505 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
506 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
506 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
507 QSignalSpy spy4(&dataSet,
507 QSignalSpy spy4(&dataSet,
@@ -571,7 +571,7 void tst_ChartDataSet::removeAllSeries()
571 }
571 }
572
572
573 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
573 QSignalSpy spy0(&dataSet, SIGNAL(axisAdded(QChartAxis*)));
574 QSignalSpy spy1(&dataSet, SIGNAL(axisLabelsChanged(QChartAxis*, QStringList const&)));
574 QSignalSpy spy1(&dataSet, SIGNAL(axisRangeChanged(QChartAxis*, QStringList const&)));
575 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
575 QSignalSpy spy2(&dataSet, SIGNAL(axisRemoved(QChartAxis*)));
576 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
576 QSignalSpy spy3(&dataSet, SIGNAL(seriesAdded(QSeries*)));
577 QSignalSpy spy4(&dataSet, SIGNAL(seriesDomainChanged(QSeries*, Domain const&)));
577 QSignalSpy spy4(&dataSet, SIGNAL(seriesDomainChanged(QSeries*, Domain const&)));
General Comments 0
You need to be logged in to leave comments. Login now