From 57ba22e00d9e85372848d8f82543c21c22f06229 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 29 Sep 2012 17:31:43 +0000 Subject: [PATCH] Removed all "zoom" stuff. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2615 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- plotter.cpp | 47 ++++++++++------------------------------------- plotter.h | 5 +---- 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/plotter.cpp b/plotter.cpp index 76e69de28..be5316925 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -24,16 +24,14 @@ CPlotter::CPlotter(QWidget *parent) : //CPlotter Constructor m_Running = false; m_paintEventBusy=false; m_WaterfallPixmap = QPixmap(0,0); - m_ZoomWaterfallPixmap = QPixmap(0,0); m_2DPixmap = QPixmap(0,0); m_ScalePixmap = QPixmap(0,0); - m_ZoomScalePixmap = QPixmap(0,0); + m_LowerScalePixmap = QPixmap(0,0); m_Size = QSize(0,0); m_fQSO = 125; m_line = 0; m_fSample = 12000; m_nsps=6912; - m_paintAllZoom = false; } CPlotter::~CPlotter() { } // Destructor @@ -57,16 +55,14 @@ void CPlotter::resizeEvent(QResizeEvent* ) //resizeEvent() int w = m_Size.width(); int h = (m_Size.height()-60)/2; m_WaterfallPixmap = QPixmap(w,h); - m_ZoomWaterfallPixmap = QPixmap(w,h); m_2DPixmap = QPixmap(w,h); m_WaterfallPixmap.fill(Qt::black); - m_ZoomWaterfallPixmap.fill(Qt::black); m_2DPixmap.fill(Qt::black); memset(m_zwf,0,NSMAX*h); m_ScalePixmap = QPixmap(w,30); - m_ZoomScalePixmap = QPixmap(w,30); //(no change on resize...) + m_LowerScalePixmap = QPixmap(w,30); //(no change on resize...) m_ScalePixmap.fill(Qt::white); - m_ZoomScalePixmap.fill(Qt::yellow); + m_LowerScalePixmap.fill(Qt::yellow); } SetCenterFreq(-1); DrawOverlay(); @@ -101,7 +97,6 @@ void CPlotter::draw(float swide[], int i0, float splot[]) //draw() //move current data down one line //(must do this before attaching a QPainter object) m_WaterfallPixmap.scroll(0,1,0,0,w,h); - m_ZoomWaterfallPixmap.scroll(0,1,0,0, w, h); memmove(&m_zwf[32768],m_zwf,32768*(h-1)); QPainter painter1(&m_WaterfallPixmap); QPainter painter2D(&m_2DPixmap); @@ -166,7 +161,6 @@ void CPlotter::draw(float swide[], int i0, float splot[]) //draw() UTCstr(); painter1.setPen(Qt::white); painter1.drawText(5,10,m_sutc); - m_paintAllZoom=true; } update(); //trigger a new paintEvent } @@ -273,9 +267,9 @@ void CPlotter::DrawOverlay() //DrawOverlay() painter0.setPen(pen3); if(x0>0 and x0x(); int y=event->y(); - if(y < h+30) { - setFQSO(x,false); // Wideband waterfall - } else { - m_DF=int(m_ZoomStartFreq + x*m_fSample/32768.0); // Zoomed waterfall - DrawOverlay(); - update(); - } + setFQSO(x,false); // Wideband waterfall } void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click @@ -444,16 +432,9 @@ void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click int h = (m_Size.height()-60)/2; int x=event->x(); int y=event->y(); - if(y < h+30) { - m_DF=0; - setFQSO(x,false); - emit freezeDecode1(2); //### ??? - } else { - float f = m_ZoomStartFreq + x*m_fSample/32768.0; - m_DF=int(f); - emit freezeDecode1(1); - DrawOverlay(); - } + m_DF=0; + setFQSO(x,false); + emit freezeDecode1(2); //### ??? } int CPlotter::autoZero() //autoZero() @@ -573,14 +554,6 @@ void CPlotter::setPalette(QString palette) //setPalette() } -void CPlotter::set2Dspec(bool b) -{ -// m_2Dspec=b; - m_paintAllZoom=!b; - DrawOverlay(); //Redraw scales and ticks - update(); //trigger a new paintEvent} -} - double CPlotter::fGreen() { return m_fGreen; diff --git a/plotter.h b/plotter.h index 4218e706b..5cd85d085 100644 --- a/plotter.h +++ b/plotter.h @@ -84,22 +84,19 @@ private: qint64 RoundFreq(qint64 freq, int resolution); QPixmap m_WaterfallPixmap; - QPixmap m_ZoomWaterfallPixmap; QPixmap m_2DPixmap; unsigned char m_zwf[32768*400]; QPixmap m_ScalePixmap; - QPixmap m_ZoomScalePixmap; + QPixmap m_LowerScalePixmap; QSize m_Size; QString m_Str; QString m_HDivText[483]; bool m_Running; bool m_paintEventBusy; bool m_2Dspec; - bool m_paintAllZoom; double m_CenterFreq; double m_fGreen; qint64 m_StartFreq; - qint64 m_ZoomStartFreq; qint32 m_dBStepSize; qint32 m_FreqUnits; qint32 m_hdivs;