From 1fc98e56b857f5ded9f0f087662ad139214c63e9 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 20 Oct 2012 17:25:46 +0000 Subject: [PATCH] Correct the mouse-click actions on wide graph. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2673 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/decoder.f90 | 25 +++++++++++++++---------- mainwindow.cpp | 2 +- plotter.cpp | 15 ++++++--------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 167a8d00a..c4f3422bb 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -18,20 +18,25 @@ subroutine decoder(ntrSeconds,c0) ntrMinutes=ntrSeconds/60 newdat=1 - nb=0 - nbslider=100 nsps=0 - if(ntrMinutes.eq.1) nsps=6912 - if(ntrMinutes.eq.2) then + if(ntrMinutes.eq.1) then + nsps=6912 + df3=1500.0/2048.0 + else if(ntrMinutes.eq.2) then nsps=15360 - df3=0.7324219 + df3=1500.0/2048.0 + else if(ntrMinutes.eq.5) then + nsps=40960 + df3=1500.0/6144.0 + else if(ntrMinutes.eq.10) then + nsps=82944 + df3=1500.0/12288.0 + else if(ntrMinutes.eq.30) then + nsps=252000 + df3=1500.0/32768.0 endif - if(ntrMinutes.eq.5) nsps=40960 - if(ntrMinutes.eq.10) nsps=82944 - if(ntrMinutes.eq.30) nsps=252000 - if(nsps.eq.0) stop 'Error: bad TRperiod' - + if(nsps.eq.0) stop 'Error: bad TRperiod' !Better: return an error code### ! Now do the decoding nutc=0 diff --git a/mainwindow.cpp b/mainwindow.cpp index c3c410093..94c1bb421 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//---------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" diff --git a/plotter.cpp b/plotter.cpp index 298f1103e..01b445965 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -179,7 +179,6 @@ void CPlotter::DrawOverlay() //DrawOverlay() int nHzDiv[11]={0,50,100,200,200,200,500,500,500,500,500}; float pixperdiv; -//### QRect rect; QPainter painter(&m_OverlayPixmap); painter.initFrom(this); @@ -190,11 +189,10 @@ void CPlotter::DrawOverlay() //DrawOverlay() painter.drawRect(0, 0, m_w, m_h2); painter.setBrush(Qt::SolidPattern); - //draw vertical grids double df = m_binsPerPixel*m_fftBinWidth; pixperdiv = m_freqPerDiv/df; y = m_h2 - m_h2/VERT_DIVS; - for( int i=1; ix(); - int y=event->y(); setFQSO(x,false); // Wideband waterfall }