@@ -115,10 +115,10 TableWidget::TableWidget(QWidget *parent) | |||
|
115 | 115 | // radio buttons layout |
|
116 | 116 | QVBoxLayout* radioLayout = new QVBoxLayout; |
|
117 | 117 | radioLayout->addWidget(m_lineRadioButton); |
|
118 | radioLayout->addWidget(m_splineRadioButton); | |
|
119 | radioLayout->addWidget(m_scatterRadioButton); | |
|
118 | // radioLayout->addWidget(m_splineRadioButton); | |
|
119 | // radioLayout->addWidget(m_scatterRadioButton); | |
|
120 | 120 | radioLayout->addWidget(m_pieRadioButton); |
|
121 | radioLayout->addWidget(m_areaRadioButton); | |
|
121 | // radioLayout->addWidget(m_areaRadioButton); | |
|
122 | 122 | radioLayout->addWidget(m_barRadioButton); |
|
123 | 123 | radioLayout->addStretch(); |
|
124 | 124 | |
@@ -190,6 +190,8 void TableWidget::updateChartType(bool toggle) | |||
|
190 | 190 | |
|
191 | 191 | if (m_lineRadioButton->isChecked()) |
|
192 | 192 | { |
|
193 | m_chart->setAnimationOptions(QChart::NoAnimation); | |
|
194 | ||
|
193 | 195 | // series 1 |
|
194 | 196 | m_series = new QLineSeries; |
|
195 | 197 | m_series->setModel(m_model); |
@@ -218,6 +220,8 void TableWidget::updateChartType(bool toggle) | |||
|
218 | 220 | } |
|
219 | 221 | else if (m_splineRadioButton->isChecked()) |
|
220 | 222 | { |
|
223 | m_chart->setAnimationOptions(QChart::NoAnimation); | |
|
224 | ||
|
221 | 225 | // series 1 |
|
222 | 226 | m_series = new QSplineSeries; |
|
223 | 227 | m_series->setModel(m_model); |
@@ -250,6 +254,8 void TableWidget::updateChartType(bool toggle) | |||
|
250 | 254 | } |
|
251 | 255 | else if (m_scatterRadioButton->isChecked()) |
|
252 | 256 | { |
|
257 | m_chart->setAnimationOptions(QChart::NoAnimation); | |
|
258 | ||
|
253 | 259 | // series 1 |
|
254 | 260 | m_series = new QScatterSeries; |
|
255 | 261 | m_series->setModel(m_model); |
@@ -283,6 +289,8 void TableWidget::updateChartType(bool toggle) | |||
|
283 | 289 | } |
|
284 | 290 | else if (m_pieRadioButton->isChecked()) |
|
285 | 291 | { |
|
292 | m_chart->setAnimationOptions(QChart::SeriesAnimations); | |
|
293 | ||
|
286 | 294 | // pie 1 |
|
287 | 295 | QPieSeries* pieSeries = new QPieSeries; |
|
288 | 296 | pieSeries->setModel(m_model); |
@@ -338,6 +346,8 void TableWidget::updateChartType(bool toggle) | |||
|
338 | 346 | } |
|
339 | 347 | else if (m_areaRadioButton->isChecked()) |
|
340 | 348 | { |
|
349 | m_chart->setAnimationOptions(QChart::NoAnimation); | |
|
350 | ||
|
341 | 351 | QLineSeries* upperLineSeries = new QLineSeries; |
|
342 | 352 | upperLineSeries->setModel(m_model); |
|
343 | 353 | upperLineSeries->setModelMapping(0, 1, Qt::Vertical); |
@@ -353,6 +363,8 void TableWidget::updateChartType(bool toggle) | |||
|
353 | 363 | } |
|
354 | 364 | else if (m_barRadioButton->isChecked()) |
|
355 | 365 | { |
|
366 | m_chart->setAnimationOptions(QChart::SeriesAnimations); | |
|
367 | ||
|
356 | 368 | QBarSeries* barSeries = new QBarSeries(QStringList()); |
|
357 | 369 | barSeries->setModel(m_model); |
|
358 | 370 | // barSeries->setModelMappingRange(2, 5); |
General Comments 0
You need to be logged in to leave comments.
Login now