summaryrefslogtreecommitdiff
path: root/plotter.h
diff options
context:
space:
mode:
authorIain R. Learmonth <irl@debian.org>2015-10-18 18:51:00 +0100
committerIain R. Learmonth <irl@debian.org>2015-10-18 18:51:00 +0100
commitd63dd8d081a6fcd0715cd13f26df59fb831769d2 (patch)
treeb9c1f6245147a310aac3762630bad389bbb57335 /plotter.h
parentc720a3d55c5ec832c29cb7ce50b6fb4b70c55b11 (diff)
Imported Upstream version 1.5.0upstream/1.5.0
Diffstat (limited to 'plotter.h')
-rw-r--r--plotter.h67
1 files changed, 43 insertions, 24 deletions
diff --git a/plotter.h b/plotter.h
index b491cf9e..cda3cc53 100644
--- a/plotter.h
+++ b/plotter.h
@@ -1,3 +1,4 @@
+// -*- Mode: C++ -*-
///////////////////////////////////////////////////////////////////////////
// Some code in this file and accompanying files is based on work by
// Moe Wheatley, AE4Y, released under the "Simplified BSD License".
@@ -14,6 +15,7 @@
#endif
#include <QFrame>
#include <QImage>
+#include <QVector>
#include <cstring>
#include "commons.h"
@@ -22,46 +24,33 @@
class CPlotter : public QFrame
{
- Q_OBJECT
+ Q_OBJECT;
+
public:
explicit CPlotter(QWidget *parent = 0);
~CPlotter();
QSize minimumSizeHint() const;
QSize sizeHint() const;
- QColor m_ColorTbl[256];
-
- bool m_bCurrent;
- bool m_bCumulative;
- bool m_lockTxFreq;
-
- float m_fSpan;
-
- qint32 m_plotZero;
- qint32 m_plotGain;
- qint32 m_nSpan;
- qint32 m_binsPerPixel;
- qint32 m_w;
-
- void draw(float sw[], int i0); //Update the waterfall
+ void draw(float sw[]); //Update the waterfall
void SetRunningState(bool running);
void setPlotZero(int plotZero);
int getPlotZero();
void setPlotGain(int plotGain);
int getPlotGain();
- void SetStartFreq(quint64 f);
- qint64 startFreq();
+ 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 setRxFreq(int n, bool bf);
+ void setRxFreq(int n);
void DrawOverlay();
int rxFreq();
- void setPalette(QString palette);
void setFsample(int n);
void setNsps(int ntrperiod, int nsps);
void setTxFreq(int n);
@@ -71,6 +60,18 @@ public:
void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
int getFmax();
void setDialFreq(double d);
+ void setCurrent(bool b) {m_bCurrent = b;}
+ bool current() const {return m_bCurrent;}
+ void setCumulative(bool b) {m_bCumulative = b;}
+ bool cumulative() const {return m_bCumulative;}
+ void setLinearAvg(bool b) {m_bLinearAvg = b;}
+ bool linearAvg() const {return m_bLinearAvg;}
+ 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);
signals:
void freezeDecode1(int n);
@@ -87,7 +88,22 @@ private:
void UTCstr();
int XfromFreq(float f);
float FreqfromX(int x);
- qint64 RoundFreq(qint64 freq, int resolution);
+
+ QVector<QColor> m_ColorTbl;
+
+ bool m_bCurrent;
+ bool m_bCumulative;
+ bool m_bLinearAvg;
+ bool m_lockTxFreq;
+
+ float m_fSpan;
+
+ qint32 m_plotZero;
+ qint32 m_plotGain;
+ qint32 m_nSpan;
+ qint32 m_binsPerPixel;
+ qint32 m_w;
+ qint32 m_Flatten;
QPixmap m_WaterfallPixmap;
QPixmap m_2DPixmap;
@@ -107,15 +123,13 @@ private:
double m_fGreen;
double m_fftBinWidth;
double m_dialFreq;
-
- qint64 m_StartFreq;
+ double m_xOffset;
qint32 m_dBStepSize;
qint32 m_FreqUnits;
qint32 m_hdivs;
qint32 m_line;
qint32 m_fSample;
- qint32 m_i0;
qint32 m_xClick;
qint32 m_freqPerDiv;
qint32 m_nsps;
@@ -128,6 +142,7 @@ private:
qint32 m_txFreq;
qint32 m_fMin;
qint32 m_fMax;
+ qint32 m_startFreq;
char m_sutc[6];
@@ -136,4 +151,8 @@ private slots:
void mouseDoubleClickEvent(QMouseEvent *event);
};
+extern "C" {
+ void flat4_(float swide[], int* iz, int* nflatten);
+}
+
#endif // PLOTTER_H