##// END OF EJS Templates
Quick fix: Refactoring the name did not work correctly
Marek Rosa -
r864:a8bae3529b3d
parent child
Show More
@@ -144,7 +144,7 void TableWidget::updateChartType()
144 m_series = new QLineSeries;
144 m_series = new QLineSeries;
145 m_series->setModel(m_model);
145 m_series->setModel(m_model);
146 m_series->setModelMapping(0,1, Qt::Vertical);
146 m_series->setModelMapping(0,1, Qt::Vertical);
147 m_series->setModelMappingShift(1, 4);
147 m_series->setModelMappingRange(1, 4);
148 m_chart->addSeries(m_series);
148 m_chart->addSeries(m_series);
149 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
149 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
150 m_model->addMapping(seriesColorHex, QRect(0, 1, 2, 4));
150 m_model->addMapping(seriesColorHex, QRect(0, 1, 2, 4));
@@ -161,7 +161,7 void TableWidget::updateChartType()
161 m_series = new QLineSeries;
161 m_series = new QLineSeries;
162 m_series->setModel(m_model);
162 m_series->setModel(m_model);
163 m_series->setModelMapping(4,5, Qt::Vertical);
163 m_series->setModelMapping(4,5, Qt::Vertical);
164 m_series->setModelMappingShift(2, 0);
164 m_series->setModelMappingRange(2, 0);
165 m_chart->addSeries(m_series);
165 m_chart->addSeries(m_series);
166 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
166 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
167 m_model->addMapping(seriesColorHex, QRect(4, 2, 2, 1000));
167 m_model->addMapping(seriesColorHex, QRect(4, 2, 2, 1000));
@@ -172,7 +172,7 void TableWidget::updateChartType()
172 m_series = new QSplineSeries;
172 m_series = new QSplineSeries;
173 m_series->setModel(m_model);
173 m_series->setModel(m_model);
174 m_series->setModelMapping(0,1, Qt::Vertical);
174 m_series->setModelMapping(0,1, Qt::Vertical);
175 m_series->setModelMappingShift(1, 4);
175 m_series->setModelMappingRange(1, 4);
176 // series->setModelMapping(0,1, Qt::Horizontal);
176 // series->setModelMapping(0,1, Qt::Horizontal);
177 m_chart->addSeries(m_series);
177 m_chart->addSeries(m_series);
178 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
178 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
@@ -182,7 +182,7 void TableWidget::updateChartType()
182 m_series = new QSplineSeries;
182 m_series = new QSplineSeries;
183 m_series->setModel(m_model);
183 m_series->setModel(m_model);
184 m_series->setModelMapping(2,3, Qt::Vertical);
184 m_series->setModelMapping(2,3, Qt::Vertical);
185 m_series->setModelMappingShift(0, 0);
185 m_series->setModelMappingRange(0, 0);
186 // series->setModelMapping(2,3, Qt::Horizontal);
186 // series->setModelMapping(2,3, Qt::Horizontal);
187 m_chart->addSeries(m_series);
187 m_chart->addSeries(m_series);
188 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
188 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
@@ -192,7 +192,7 void TableWidget::updateChartType()
192 m_series = new QSplineSeries;
192 m_series = new QSplineSeries;
193 m_series->setModel(m_model);
193 m_series->setModel(m_model);
194 m_series->setModelMapping(4,5, Qt::Vertical);
194 m_series->setModelMapping(4,5, Qt::Vertical);
195 m_series->setModelMappingShift(2, 0);
195 m_series->setModelMappingRange(2, 0);
196 // series->setModelMapping(4,5, Qt::Horizontal);
196 // series->setModelMapping(4,5, Qt::Horizontal);
197 m_chart->addSeries(m_series);
197 m_chart->addSeries(m_series);
198 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
198 seriesColorHex = "#" + QString::number(m_series->pen().color().rgb(), 16).right(6).toUpper();
@@ -204,7 +204,7 void TableWidget::updateChartType()
204 m_series = new QScatterSeries;
204 m_series = new QScatterSeries;
205 m_series->setModel(m_model);
205 m_series->setModel(m_model);
206 m_series->setModelMapping(0,1, Qt::Vertical);
206 m_series->setModelMapping(0,1, Qt::Vertical);
207 m_series->setModelMappingShift(2, 0);
207 m_series->setModelMappingRange(2, 0);
208 // series->setModelMapping(0,1, Qt::Horizontal);
208 // series->setModelMapping(0,1, Qt::Horizontal);
209 m_chart->addSeries(m_series);
209 m_chart->addSeries(m_series);
210
210
@@ -215,7 +215,7 void TableWidget::updateChartType()
215 m_series = new QScatterSeries;
215 m_series = new QScatterSeries;
216 m_series->setModel(m_model);
216 m_series->setModel(m_model);
217 m_series->setModelMapping(2,3, Qt::Vertical);
217 m_series->setModelMapping(2,3, Qt::Vertical);
218 m_series->setModelMappingShift(1, 6);
218 m_series->setModelMappingRange(1, 6);
219 // series->setModelMapping(2,3, Qt::Horizontal);
219 // series->setModelMapping(2,3, Qt::Horizontal);
220 m_chart->addSeries(m_series);
220 m_chart->addSeries(m_series);
221
221
@@ -272,7 +272,7 void TableWidget::updateChartType()
272 QLineSeries* upperLineSeries = new QLineSeries;
272 QLineSeries* upperLineSeries = new QLineSeries;
273 upperLineSeries->setModel(m_model);
273 upperLineSeries->setModel(m_model);
274 upperLineSeries->setModelMapping(0, 1, Qt::Vertical);
274 upperLineSeries->setModelMapping(0, 1, Qt::Vertical);
275 upperLineSeries->setModelMappingShift(1, 5);
275 upperLineSeries->setModelMappingRange(1, 5);
276 QLineSeries* lowerLineSeries = new QLineSeries;
276 QLineSeries* lowerLineSeries = new QLineSeries;
277 lowerLineSeries->setModel(m_model);
277 lowerLineSeries->setModel(m_model);
278 lowerLineSeries->setModelMapping(2, 3, Qt::Vertical);
278 lowerLineSeries->setModelMapping(2, 3, Qt::Vertical);
@@ -168,9 +168,9 void QSplineSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orie
168 // calculateControlPoints();
168 // calculateControlPoints();
169 }
169 }
170
170
171 void QSplineSeries::setModelMappingShift(int first, int count)
171 void QSplineSeries::setModelMappingRange(int first, int count)
172 {
172 {
173 QLineSeries::setModelMappingShift(first, count);
173 QLineSeries::setModelMappingRange(first, count);
174 calculateControlPoints();
174 calculateControlPoints();
175 }
175 }
176
176
@@ -41,7 +41,7 public:
41 bool setModel(QAbstractItemModel *model);
41 bool setModel(QAbstractItemModel *model);
42
42
43 void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
43 void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
44 void setModelMappingShift(int first, int count);
44 void setModelMappingRange(int first, int count);
45
45
46 private:
46 private:
47 void calculateControlPoints();
47 void calculateControlPoints();
@@ -496,7 +496,7 void QXYSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientat
496 }
496 }
497 }
497 }
498
498
499 void QXYSeries::setModelMappingShift(int first, int count)
499 void QXYSeries::setModelMappingRange(int first, int count)
500 {
500 {
501 m_mapFirst = first;
501 m_mapFirst = first;
502 if (count == 0) {
502 if (count == 0) {
General Comments 0
You need to be logged in to leave comments. Login now