summaryrefslogtreecommitdiff
path: root/fastplot.h
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
committerhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
commit37f727ac0746fd85504aa46c1f023c09b3eff33a (patch)
treec8a7ce04545040a8f161ba279528730bd9a3e6ab /fastplot.h
parentd63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff)
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'fastplot.h')
-rw-r--r--fastplot.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/fastplot.h b/fastplot.h
new file mode 100644
index 00000000..57a4ea90
--- /dev/null
+++ b/fastplot.h
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////
+// 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
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef FPLOTTER_H
+#define FPLOTTER_H
+
+#include <QtWidgets>
+#include <QFrame>
+#include <QImage>
+#include <cstring>
+
+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;
+ qint32 m_UTCdisk;
+ bool m_diskData;
+
+ void draw(); //Update the Fast plot
+ void setPlotZero(int plotZero);
+ void setPlotGain(int plotGain);
+ void setGreenZero(int n);
+ void setTRperiod(int n);
+ void drawScale();
+ void setMode(QString mode);
+
+signals:
+ void fastPick (int x0, int x1, int y);
+
+protected:
+ //re-implemented widget event handlers
+ void paintEvent(QPaintEvent *event);
+// void resizeEvent(QResizeEvent* event);
+
+private slots:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+
+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;
+ QString m_t1;
+ QString m_mode;
+
+ double m_pixPerSecond;
+
+ qint32 m_hdivs;
+ qint32 m_h;
+ qint32 m_h1;
+ qint32 m_h2;
+ QPixmap m_HorizPixmap;
+ qint32 m_jh0;
+ qint32 m_TRperiod;
+
+ 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