diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2020-06-10 12:34:36 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2020-06-10 12:34:36 +0200 |
| commit | ee0e1a654b7e64accea78a5aa66ec1e62bd352c8 (patch) | |
| tree | a1677b79b800f3a7c3f9b637e6d7ccb27fe2bd2f /widgets/widegraph.cpp | |
| parent | 5c05cfa3903d8a71d77f4b3dc1d2d0c7a043c6d6 (diff) | |
New upstream version 2.2.1+repackupstream/2.2.1+repack
Diffstat (limited to 'widgets/widegraph.cpp')
| -rw-r--r-- | widgets/widegraph.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/widgets/widegraph.cpp b/widgets/widegraph.cpp index 6234f731..a78874c7 100644 --- a/widgets/widegraph.cpp +++ b/widgets/widegraph.cpp @@ -315,23 +315,29 @@ void WideGraph::setModeTx(QString modeTx) //setModeTx ui->widePlot->update(); } - //Current-Cumulative-Yellow -void WideGraph::on_spec2dComboBox_currentIndexChanged(const QString &arg1) +void WideGraph::on_spec2dComboBox_currentIndexChanged(int index) { ui->widePlot->setCurrent(false); ui->widePlot->setCumulative(false); ui->widePlot->setLinearAvg(false); ui->widePlot->setReference(false); ui->smoSpinBox->setEnabled(false); - if(arg1=="Current") ui->widePlot->setCurrent(true); - if(arg1=="Cumulative") ui->widePlot->setCumulative(true); - if(arg1=="Linear Avg") { - ui->widePlot->setLinearAvg(true); - ui->smoSpinBox->setEnabled(true); - } - if(arg1=="Reference") { - ui->widePlot->setReference(true); - } + switch (index) + { + case 0: // Current + ui->widePlot->setCurrent(true); + break; + case 1: // Cumulative + ui->widePlot->setCumulative(true); + break; + case 2: // Linear Avg + ui->widePlot->setLinearAvg(true); + ui->smoSpinBox->setEnabled(true); + break; + case 3: // Reference + ui->widePlot->setReference(true); + break; + } replot(); } |
