From dfed81d618992a02bf2d1769ec651cd1de6a1980 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 18 Jan 2018 15:17:45 +0000 Subject: [PATCH] Minor tweaks to widegraph and plotter, for ease of use. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8421 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- plotter.cpp | 9 +++++---- widegraph.cpp | 16 ++++++++-------- widegraph.ui | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/plotter.cpp b/plotter.cpp index bcd1dd572..3d19e7647 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -170,7 +170,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) if (swide[i]<1.e29) painter1.setPen(g_ColorTbl[y1]); painter1.drawPoint(i,m_j); } - if(m_bReplot) return; +// if(m_bReplot) return; m_line++; @@ -222,6 +222,7 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed) if(y2>y2max) y2max=y2; j++; } + if(m_bReplot) return; if(swide[0]>1.0e29) m_line=0; if(m_line == painter1.fontMetrics ().height ()) { @@ -295,14 +296,14 @@ void CPlotter::drawRed(int ia, int ib, float swide[]) void CPlotter::replot() { float swide[m_w]; + m_bReplot=true; for(int irow=0; irowsetupUi(this); @@ -329,7 +329,7 @@ void WideGraph::on_spec2dComboBox_currentIndexChanged(const QString &arg1) if(arg1=="Reference") { ui->widePlot->setReference(true); } - if(ui->widePlot->scaleOK ()) ui->widePlot->draw(swide,false,false); +// if(ui->widePlot->scaleOK ()) ui->widePlot->draw(swide,false,false); } void WideGraph::on_fSplitSpinBox_valueChanged(int n) //fSplit @@ -449,17 +449,17 @@ bool WideGraph::useRef() //Flatten return m_bRef; } +void WideGraph::replot() +{ + if(ui->widePlot->scaleOK()) ui->widePlot->replot(); +} + void WideGraph::on_gainSlider_valueChanged(int value) //Gain { ui->widePlot->setPlotGain(value); replot(); } -void WideGraph::replot() -{ - if(ui->widePlot->scaleOK()) ui->widePlot->replot(); -} - void WideGraph::on_zeroSlider_valueChanged(int value) //Zero { ui->widePlot->setPlotZero(value); diff --git a/widegraph.ui b/widegraph.ui index 62bbbf0a9..3b5f84cea 100644 --- a/widegraph.ui +++ b/widegraph.ui @@ -114,6 +114,12 @@ 0 + + + 200 + 16777215 + + Spectrum gain @@ -169,6 +175,12 @@ 0 + + + 200 + 16777215 + + Waterfall gain @@ -396,6 +408,12 @@ 0 + + + 200 + 16777215 + + Waterfall zero @@ -427,6 +445,12 @@ 0 + + + 200 + 16777215 + + Spectrum zero