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