diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /plotter.h | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'plotter.h')
| -rw-r--r-- | plotter.h | 77 |
1 files changed, 51 insertions, 26 deletions
@@ -17,14 +17,17 @@ #include <QImage> #include <QVector> #include <cstring> -#include "commons.h" #define VERT_DIVS 7 //specify grid screen divisions #define HORZ_DIVS 20 +extern bool g_single_decode; + +class QAction; + class CPlotter : public QFrame { - Q_OBJECT; + Q_OBJECT public: explicit CPlotter(QWidget *parent = 0); @@ -32,22 +35,26 @@ public: QSize minimumSizeHint() const; QSize sizeHint() const; - void draw(float sw[]); //Update the waterfall + + void draw(float swide[], bool bScroll, bool bRed); //Update the waterfall void SetRunningState(bool running); void setPlotZero(int plotZero); - int getPlotZero(); + int plotZero(); void setPlotGain(int plotGain); - int getPlotGain(); + int plotGain(); + int plot2dGain(); + void setPlot2dGain(int n); + int plot2dZero(); + void setPlot2dZero(int plot2dZero); void setStartFreq(int f); int startFreq(); int plotWidth(); - void setNSpan(int n); - int nSpan() const {return m_nSpan;} void UpdateOverlay(); void setDataFromDisk(bool b); void setRxRange(int fMin); void setBinsPerPixel(int n); int binsPerPixel(); + void setWaterfallAvg(int n); void setRxFreq(int n); void DrawOverlay(); int rxFreq(); @@ -55,10 +62,10 @@ public: void setNsps(int ntrperiod, int nsps); void setTxFreq(int n); void setMode(QString mode); + void setSubMode(int n); void setModeTx(QString modeTx); - double fGreen(); - void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;} - int getFmax(); + void SetPercent2DScreen(int percent); + int Fmax(); void setDialFreq(double d); void setCurrent(bool b) {m_bCurrent = b;} bool current() const {return m_bCurrent;} @@ -69,62 +76,80 @@ public: void setBreadth(qint32 w) {m_w = w;} qint32 breadth() const {return m_w;} float fSpan() const {return m_fSpan;} - void setLockTxFreq(bool b) {m_lockTxFreq = b;} - void setColours(QVector<QColor> const& cl) {m_ColorTbl = cl;} - void setFlatten(bool b); - + void setColours(QVector<QColor> const& cl); + void setFlatten(bool b1, bool b2); + void setTol(int n); + void setRxBand(QString band); + void setReference(bool b) {m_bReference = b;} + bool Reference() const {return m_bReference;} + void drawRed(int ia, int ib, float swide[]); + void setVHF(bool bVHF); + void setRedFile(QString fRed); + bool scaleOK () const {return m_bScaleOK;} signals: void freezeDecode1(int n); void setFreq1(int rxFreq, int txFreq); protected: //re-implemented widget event handlers - void paintEvent(QPaintEvent *event); - void resizeEvent(QResizeEvent* event); + void paintEvent(QPaintEvent *event) override; + void resizeEvent(QResizeEvent* event) override; + void mouseReleaseEvent (QMouseEvent * event) override; + void mouseDoubleClickEvent (QMouseEvent * event) override; private: void MakeFrequencyStrs(); - void UTCstr(); int XfromFreq(float f); float FreqfromX(int x); - QVector<QColor> m_ColorTbl; + QAction * m_set_freq_action; + bool m_bScaleOK; bool m_bCurrent; bool m_bCumulative; bool m_bLinearAvg; - bool m_lockTxFreq; + bool m_bReference; + bool m_bReference0; + bool m_bVHF; float m_fSpan; qint32 m_plotZero; qint32 m_plotGain; - qint32 m_nSpan; + qint32 m_plot2dGain; + qint32 m_plot2dZero; qint32 m_binsPerPixel; + qint32 m_waterfallAvg; qint32 m_w; qint32 m_Flatten; + qint32 m_nSubMode; + qint32 m_ia; + qint32 m_ib; QPixmap m_WaterfallPixmap; QPixmap m_2DPixmap; QPixmap m_ScalePixmap; QPixmap m_OverlayPixmap; -// QPixmap m_LowerScalePixmap; + QSize m_Size; QString m_Str; QString m_HDivText[483]; QString m_mode; QString m_modeTx; + QString m_rxBand; + QString m_redFile; bool m_Running; bool m_paintEventBusy; bool m_dataFromDisk; - double m_fGreen; double m_fftBinWidth; double m_dialFreq; double m_xOffset; + float m_sum[2048]; + qint32 m_dBStepSize; qint32 m_FreqUnits; qint32 m_hdivs; @@ -134,6 +159,7 @@ private: qint32 m_freqPerDiv; qint32 m_nsps; qint32 m_Percent2DScreen; + qint32 m_Percent2DScreen0; qint32 m_h; qint32 m_h1; qint32 m_h2; @@ -143,14 +169,13 @@ private: qint32 m_fMin; qint32 m_fMax; qint32 m_startFreq; + qint32 m_tol; char m_sutc[6]; - -private slots: - void mousePressEvent(QMouseEvent *event); - void mouseDoubleClickEvent(QMouseEvent *event); }; +extern QVector<QColor> g_ColorTbl; + extern "C" { void flat4_(float swide[], int* iz, int* nflatten); } |
