diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2020-06-10 12:34:51 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2020-06-10 12:34:51 +0200 |
| commit | 400776e1b7e1992e26c95e2ca79eada65b53aca6 (patch) | |
| tree | 899589883a2c9be2264af0505039e93594a11bda /widgets/widegraph.cpp | |
| parent | bb8622557f9a325e9a925834a5487a32584d0675 (diff) | |
| parent | ee0e1a654b7e64accea78a5aa66ec1e62bd352c8 (diff) | |
Update upstream source from tag 'upstream/2.2.1+repack'
Update to upstream version '2.2.1+repack'
with Debian dir c0f0555345d2c71b60736c230e3b91e85d74b675
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(); } |
