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