diff options
| author | Christoph Berg <myon@debian.org> | 2022-09-17 12:51:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2022-09-17 12:51:35 +0200 |
| commit | ae3ec401d5558b23a18f19dca17d2b193c328574 (patch) | |
| tree | e19e5978cb233b15711462848ea455e767fb169d /widgets/echoplot.cpp | |
| parent | f211efa3653230799ef3458eaa7e9dd437db7a8a (diff) | |
| parent | 4d2fac0dafe835b1ed479bebe136c3afe748ecf3 (diff) | |
Update upstream source from tag 'upstream/2.6.0_rc4+repack'
Update to upstream version '2.6.0~rc4+repack'
with Debian dir beb58bcc4aa42df3ffcfdd1ef0613fd612bb3100
Diffstat (limited to 'widgets/echoplot.cpp')
| -rwxr-xr-x | widgets/echoplot.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/widgets/echoplot.cpp b/widgets/echoplot.cpp index 15c2d8e5..80202c35 100755 --- a/widgets/echoplot.cpp +++ b/widgets/echoplot.cpp @@ -127,7 +127,7 @@ void EPlotter::draw() //draw() painter2D.setPen(penBlue);
j=0;
for(i=0; i<m_w; i++) {
- y = 0.9*m_h2 - gain*(m_h/10.0)*(blue[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
+ y = 0.9*m_h2 - gain*(m_h/10.0)*blue[i0+i] - 0.01*m_h2*m_plotZero;
LineBuf[j].setX(i);
LineBuf[j].setY(y);
j++;
@@ -145,12 +145,19 @@ void EPlotter::draw() //draw() j=0;
for(int i=0; i<m_w; i++) {
- y = 0.9*m_h2 - gain*(m_h/10.0)*(red[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
+ y = 0.9*m_h2 - gain*(m_h/10.0)*red[i0+i] - 0.01*m_h2*m_plotZero;
LineBuf[j].setX(i);
LineBuf[j].setY(y);
j++;
}
painter2D.drawPolyline(LineBuf,j);
+
+ if(m_bBaseline) {
+ // Draw the baseline
+ y = 0.9*m_h2 - 0.01*m_h2*m_plotZero;
+ painter2D.drawLine(0,y,m_w,y);
+ }
+
update(); //trigger a new paintEvent
}
@@ -323,3 +330,9 @@ void EPlotter::setColors(qint32 n) //setSmooth() int EPlotter::plotWidth(){return m_2DPixmap.width();}
void EPlotter::UpdateOverlay() {DrawOverlay();}
+
+void EPlotter::setBaseline(bool b)
+{
+ m_bBaseline=b;
+ draw();
+}
|
