diff options
| author | Christoph Berg <myon@debian.org> | 2022-09-17 12:51:21 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2022-09-17 12:51:21 +0200 |
| commit | 4d2fac0dafe835b1ed479bebe136c3afe748ecf3 (patch) | |
| tree | efddc4f95ba73f57dcd6518ce31f8e6ea5b0cd15 /widgets/echograph.cpp | |
| parent | 2d1068e60bce7ae1fff11623454900e8cee956b1 (diff) | |
New upstream version 2.6.0~rc4+repackupstream/2.6.0_rc4+repack
Diffstat (limited to 'widgets/echograph.cpp')
| -rwxr-xr-x | widgets/echograph.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/widgets/echograph.cpp b/widgets/echograph.cpp index 0f6e9232..4f51fa10 100755 --- a/widgets/echograph.cpp +++ b/widgets/echograph.cpp @@ -2,6 +2,7 @@ #include "commons.h"
#include <QSettings>
#include <QApplication>
+#include <QDebug>
#include "echoplot.h"
#include "ui_echograph.h"
#include "moc_echograph.cpp"
@@ -36,6 +37,7 @@ EchoGraph::EchoGraph(QSettings * settings, QWidget *parent) : ui->binsPerPixelSpinBox->setValue(n);
ui->echoPlot->m_blue=m_settings->value("BlueCurve",false).toBool();
m_nColor=m_settings->value("EchoColors",0).toInt();
+ ui->cbBaseline->setChecked(m_settings->value("Baseline",false).toBool());
m_settings->endGroup();
ui->echoPlot->setColors(m_nColor);
}
@@ -62,6 +64,7 @@ void EchoGraph::saveSettings() m_settings->setValue("EchoBPP",ui->echoPlot->m_binsPerPixel);
m_settings->setValue("BlueCurve",ui->echoPlot->m_blue);
m_settings->setValue("EchoColors",m_nColor);
+ m_settings->setValue("Baseline",ui->cbBaseline->isChecked());
m_settings->endGroup();
}
@@ -101,3 +104,23 @@ void EchoGraph::on_pbColors_clicked() m_nColor = (m_nColor+1) % 6;
ui->echoPlot->setColors(m_nColor);
}
+
+void EchoGraph::on_cbBaseline_toggled(bool b)
+{
+ ui->echoPlot->setBaseline(b);
+}
+
+bool EchoGraph::baseline()
+{
+ return ui->cbBaseline->isChecked();
+}
+
+void EchoGraph::clearAvg()
+{
+ for(int i=0; i<4096; i++) {
+ echocom_.blue[i]=0;
+ echocom_.red[i]=0;
+ }
+ echocom_.nsum=0;
+ plotSpec();
+}
|
