| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | // Some code in this file and accompanying files is based on work by
 | 
					
						
							|  |  |  | // Moe Wheatley, AE4Y, released under the "Simplified BSD License".
 | 
					
						
							|  |  |  | // For more details see the accompanying file LICENSE_WHEATLEY.TXT
 | 
					
						
							|  |  |  | ///////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-06 05:41:16 +00:00
										 |  |  | #ifndef FPLOTTER_H_
 | 
					
						
							|  |  |  | #define FPLOTTER_H_
 | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <QFrame>
 | 
					
						
							| 
									
										
										
										
											2018-12-06 05:41:16 +00:00
										 |  |  | #include <QString>
 | 
					
						
							|  |  |  | #include <QPixmap>
 | 
					
						
							|  |  |  | #include <QVector>
 | 
					
						
							|  |  |  | #include <QColor>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class QMouseEvent; | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class FPlotter : public QFrame | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   Q_OBJECT | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |   explicit FPlotter(QWidget *parent = 0); | 
					
						
							|  |  |  |   ~FPlotter(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   qint32  m_w; | 
					
						
							|  |  |  |   qint32  m_plotZero; | 
					
						
							|  |  |  |   qint32  m_plotGain; | 
					
						
							|  |  |  |   qint32  m_greenGain; | 
					
						
							|  |  |  |   qint32  m_greenZero; | 
					
						
							|  |  |  |   qint32  m_x0; | 
					
						
							|  |  |  |   qint32  m_x1; | 
					
						
							|  |  |  |   qint32  m_y0; | 
					
						
							| 
									
										
										
										
											2016-09-17 13:34:40 +00:00
										 |  |  |   qint32  m_UTCdisk; | 
					
						
							|  |  |  |   bool    m_diskData; | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   void draw();		                                    //Update the Fast plot
 | 
					
						
							|  |  |  |   void setPlotZero(int plotZero); | 
					
						
							|  |  |  |   void setPlotGain(int plotGain); | 
					
						
							|  |  |  |   void setGreenZero(int n); | 
					
						
							| 
									
										
										
										
											2019-05-22 12:44:28 -04:00
										 |  |  |   void setTRperiod(double p); | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  |   void drawScale(); | 
					
						
							| 
									
										
										
										
											2016-10-21 18:07:12 +00:00
										 |  |  |   void setMode(QString mode); | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | signals: | 
					
						
							| 
									
										
										
										
											2016-06-24 17:01:51 +00:00
										 |  |  |   void fastPick (int x0, int x1, int y); | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | protected: | 
					
						
							|  |  |  |   //re-implemented widget event handlers
 | 
					
						
							|  |  |  |   void paintEvent(QPaintEvent *event); | 
					
						
							|  |  |  | //  void resizeEvent(QResizeEvent* event);
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private slots: | 
					
						
							| 
									
										
										
										
											2016-10-21 18:07:12 +00:00
										 |  |  |   void mousePressEvent(QMouseEvent *event); | 
					
						
							| 
									
										
										
										
											2016-09-15 18:37:44 +00:00
										 |  |  |   void mouseMoveEvent(QMouseEvent *event); | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   void MakeTimeStrs(); | 
					
						
							|  |  |  |   int XfromTime(float t); | 
					
						
							|  |  |  |   float TimefromX(int x); | 
					
						
							|  |  |  |   qint64 RoundFreq(qint64 freq, int resolution); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   QPixmap m_ScalePixmap; | 
					
						
							|  |  |  |   QString m_HDivText[483]; | 
					
						
							|  |  |  |   QString m_t; | 
					
						
							|  |  |  |   QString m_t0; | 
					
						
							| 
									
										
										
										
											2016-09-15 18:37:44 +00:00
										 |  |  |   QString m_t1; | 
					
						
							| 
									
										
										
										
											2016-10-21 18:07:12 +00:00
										 |  |  |   QString m_mode; | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   double  m_pixPerSecond; | 
					
						
							| 
									
										
										
										
											2019-05-22 12:44:28 -04:00
										 |  |  |   double  m_TRperiod; | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   qint32  m_hdivs; | 
					
						
							|  |  |  |   qint32  m_h; | 
					
						
							|  |  |  |   qint32  m_h1; | 
					
						
							|  |  |  |   qint32  m_h2; | 
					
						
							| 
									
										
										
										
											2016-06-10 15:54:16 +00:00
										 |  |  |   QPixmap m_HorizPixmap; | 
					
						
							| 
									
										
										
										
											2015-11-18 01:28:12 +00:00
										 |  |  |   qint32  m_jh0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   bool    m_bPaint2; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern float fast_green[703]; | 
					
						
							|  |  |  | extern float fast_green2[703]; | 
					
						
							|  |  |  | extern float fast_s[44992];                                    //44992=64*703
 | 
					
						
							|  |  |  | extern float fast_s2[44992]; | 
					
						
							|  |  |  | extern int   fast_jh; | 
					
						
							|  |  |  | extern int   fast_jh2; | 
					
						
							|  |  |  | extern QVector<QColor> g_ColorTbl; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // FPLOTTER_H
 |