mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-30 12:30:23 -04:00 
			
		
		
		
	Removed all "zoom" stuff.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2615 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									a12cf41877
								
							
						
					
					
						commit
						79f1e51da1
					
				
							
								
								
									
										39
									
								
								plotter.cpp
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								plotter.cpp
									
									
									
									
									
								
							| @ -24,16 +24,14 @@ CPlotter::CPlotter(QWidget *parent) :                  //CPlotter Constructor | |||||||
|   m_Running = false; |   m_Running = false; | ||||||
|   m_paintEventBusy=false; |   m_paintEventBusy=false; | ||||||
|   m_WaterfallPixmap = QPixmap(0,0); |   m_WaterfallPixmap = QPixmap(0,0); | ||||||
|   m_ZoomWaterfallPixmap = QPixmap(0,0); |  | ||||||
|   m_2DPixmap = QPixmap(0,0); |   m_2DPixmap = QPixmap(0,0); | ||||||
|   m_ScalePixmap = QPixmap(0,0); |   m_ScalePixmap = QPixmap(0,0); | ||||||
|   m_ZoomScalePixmap = QPixmap(0,0); |   m_LowerScalePixmap = QPixmap(0,0); | ||||||
|   m_Size = QSize(0,0); |   m_Size = QSize(0,0); | ||||||
|   m_fQSO = 125; |   m_fQSO = 125; | ||||||
|   m_line = 0; |   m_line = 0; | ||||||
|   m_fSample = 12000; |   m_fSample = 12000; | ||||||
|   m_nsps=6912; |   m_nsps=6912; | ||||||
|   m_paintAllZoom = false; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CPlotter::~CPlotter() { }                                      // Destructor
 | CPlotter::~CPlotter() { }                                      // Destructor
 | ||||||
| @ -57,16 +55,14 @@ void CPlotter::resizeEvent(QResizeEvent* )                    //resizeEvent() | |||||||
|     int w = m_Size.width(); |     int w = m_Size.width(); | ||||||
|     int h = (m_Size.height()-60)/2; |     int h = (m_Size.height()-60)/2; | ||||||
|     m_WaterfallPixmap = QPixmap(w,h); |     m_WaterfallPixmap = QPixmap(w,h); | ||||||
|     m_ZoomWaterfallPixmap = QPixmap(w,h); |  | ||||||
|     m_2DPixmap = QPixmap(w,h); |     m_2DPixmap = QPixmap(w,h); | ||||||
|     m_WaterfallPixmap.fill(Qt::black); |     m_WaterfallPixmap.fill(Qt::black); | ||||||
|     m_ZoomWaterfallPixmap.fill(Qt::black); |  | ||||||
|     m_2DPixmap.fill(Qt::black); |     m_2DPixmap.fill(Qt::black); | ||||||
|     memset(m_zwf,0,NSMAX*h); |     memset(m_zwf,0,NSMAX*h); | ||||||
|     m_ScalePixmap = QPixmap(w,30); |     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_ScalePixmap.fill(Qt::white); | ||||||
|     m_ZoomScalePixmap.fill(Qt::yellow); |     m_LowerScalePixmap.fill(Qt::yellow); | ||||||
|   } |   } | ||||||
|   SetCenterFreq(-1); |   SetCenterFreq(-1); | ||||||
|   DrawOverlay(); |   DrawOverlay(); | ||||||
| @ -101,7 +97,6 @@ void CPlotter::draw(float swide[], int i0, float splot[])             //draw() | |||||||
|   //move current data down one line
 |   //move current data down one line
 | ||||||
|   //(must do this before attaching a QPainter object)
 |   //(must do this before attaching a QPainter object)
 | ||||||
|   m_WaterfallPixmap.scroll(0,1,0,0,w,h); |   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)); |   memmove(&m_zwf[32768],m_zwf,32768*(h-1)); | ||||||
|   QPainter painter1(&m_WaterfallPixmap); |   QPainter painter1(&m_WaterfallPixmap); | ||||||
|   QPainter painter2D(&m_2DPixmap); |   QPainter painter2D(&m_2DPixmap); | ||||||
| @ -166,7 +161,6 @@ void CPlotter::draw(float swide[], int i0, float splot[])             //draw() | |||||||
|     UTCstr(); |     UTCstr(); | ||||||
|     painter1.setPen(Qt::white); |     painter1.setPen(Qt::white); | ||||||
|     painter1.drawText(5,10,m_sutc); |     painter1.drawText(5,10,m_sutc); | ||||||
|     m_paintAllZoom=true; |  | ||||||
|   } |   } | ||||||
|   update();                              //trigger a new paintEvent
 |   update();                              //trigger a new paintEvent
 | ||||||
| } | } | ||||||
| @ -273,9 +267,9 @@ void CPlotter::DrawOverlay()                                 //DrawOverlay() | |||||||
|   painter0.setPen(pen3); |   painter0.setPen(pen3); | ||||||
|   if(x0>0 and x0<w) painter0.drawLine(x0,15,x0,30); |   if(x0>0 and x0<w) painter0.drawLine(x0,15,x0,30); | ||||||
| 
 | 
 | ||||||
|   // Now make the zoomed scale, using m_ZoomScalePixmap and painter3
 |   // Now make the lower scale, using m_LowerScalePixmap and painter3
 | ||||||
|   QRect rect1; |   QRect rect1; | ||||||
|   QPainter painter3(&m_ZoomScalePixmap); |   QPainter painter3(&m_LowerScalePixmap); | ||||||
|   painter3.initFrom(this); |   painter3.initFrom(this); | ||||||
|   painter3.setFont(Font); |   painter3.setFont(Font); | ||||||
|   painter3.setPen(Qt::black); |   painter3.setPen(Qt::black); | ||||||
| @ -283,7 +277,7 @@ void CPlotter::DrawOverlay()                                 //DrawOverlay() | |||||||
|   df = 12000.0/m_nsps; |   df = 12000.0/m_nsps; | ||||||
|   m_hdivs = 4400*df/m_freqPerDiv + 0.9999; |   m_hdivs = 4400*df/m_freqPerDiv + 0.9999; | ||||||
|   int nlabs=df*w/m_freqPerDiv + 1.0; |   int nlabs=df*w/m_freqPerDiv + 1.0; | ||||||
|   m_ZoomScalePixmap.fill(Qt::white); |   m_LowerScalePixmap.fill(Qt::white); | ||||||
|   painter3.drawRect(0, 0, w, 30); |   painter3.drawRect(0, 0, w, 30); | ||||||
| 
 | 
 | ||||||
|   pixperdiv = m_freqPerDiv/df; |   pixperdiv = m_freqPerDiv/df; | ||||||
| @ -430,13 +424,7 @@ void CPlotter::mousePressEvent(QMouseEvent *event)       //mousePressEvent | |||||||
|   int h = (m_Size.height()-60)/2; |   int h = (m_Size.height()-60)/2; | ||||||
|   int x=event->x(); |   int x=event->x(); | ||||||
|   int y=event->y(); |   int y=event->y(); | ||||||
|   if(y < h+30) { |  | ||||||
|   setFQSO(x,false);                               // Wideband waterfall
 |   setFQSO(x,false);                               // Wideband waterfall
 | ||||||
|   } else { |  | ||||||
|     m_DF=int(m_ZoomStartFreq + x*m_fSample/32768.0);  // Zoomed waterfall
 |  | ||||||
|     DrawOverlay(); |  | ||||||
|     update(); |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void CPlotter::mouseDoubleClickEvent(QMouseEvent *event)  //mouse2click
 | void CPlotter::mouseDoubleClickEvent(QMouseEvent *event)  //mouse2click
 | ||||||
| @ -444,16 +432,9 @@ void CPlotter::mouseDoubleClickEvent(QMouseEvent *event)  //mouse2click | |||||||
|   int h = (m_Size.height()-60)/2; |   int h = (m_Size.height()-60)/2; | ||||||
|   int x=event->x(); |   int x=event->x(); | ||||||
|   int y=event->y(); |   int y=event->y(); | ||||||
|   if(y < h+30) { |  | ||||||
|   m_DF=0; |   m_DF=0; | ||||||
|   setFQSO(x,false); |   setFQSO(x,false); | ||||||
|   emit freezeDecode1(2);                  //### ???
 |   emit freezeDecode1(2);                  //### ???
 | ||||||
|   } else { |  | ||||||
|     float f = m_ZoomStartFreq + x*m_fSample/32768.0; |  | ||||||
|     m_DF=int(f); |  | ||||||
|     emit freezeDecode1(1); |  | ||||||
|     DrawOverlay(); |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int CPlotter::autoZero()                                        //autoZero()
 | 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() | double CPlotter::fGreen() | ||||||
| { | { | ||||||
|   return m_fGreen; |   return m_fGreen; | ||||||
|  | |||||||
| @ -84,22 +84,19 @@ private: | |||||||
|   qint64 RoundFreq(qint64 freq, int resolution); |   qint64 RoundFreq(qint64 freq, int resolution); | ||||||
| 
 | 
 | ||||||
|   QPixmap m_WaterfallPixmap; |   QPixmap m_WaterfallPixmap; | ||||||
|   QPixmap m_ZoomWaterfallPixmap; |  | ||||||
|   QPixmap m_2DPixmap; |   QPixmap m_2DPixmap; | ||||||
|   unsigned char m_zwf[32768*400]; |   unsigned char m_zwf[32768*400]; | ||||||
|   QPixmap m_ScalePixmap; |   QPixmap m_ScalePixmap; | ||||||
|   QPixmap m_ZoomScalePixmap; |   QPixmap m_LowerScalePixmap; | ||||||
|   QSize   m_Size; |   QSize   m_Size; | ||||||
|   QString m_Str; |   QString m_Str; | ||||||
|   QString m_HDivText[483]; |   QString m_HDivText[483]; | ||||||
|   bool    m_Running; |   bool    m_Running; | ||||||
|   bool    m_paintEventBusy; |   bool    m_paintEventBusy; | ||||||
|   bool    m_2Dspec; |   bool    m_2Dspec; | ||||||
|   bool    m_paintAllZoom; |  | ||||||
|   double  m_CenterFreq; |   double  m_CenterFreq; | ||||||
|   double  m_fGreen; |   double  m_fGreen; | ||||||
|   qint64  m_StartFreq; |   qint64  m_StartFreq; | ||||||
|   qint64  m_ZoomStartFreq; |  | ||||||
|   qint32  m_dBStepSize; |   qint32  m_dBStepSize; | ||||||
|   qint32  m_FreqUnits; |   qint32  m_FreqUnits; | ||||||
|   qint32  m_hdivs; |   qint32  m_hdivs; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user