-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwgt_waterfall.h
executable file
·82 lines (73 loc) · 2.87 KB
/
wgt_waterfall.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef WGT_WATERFALL_H
#define WGT_WATERFALL_H
#include <QWidget>
#include <qcustomplot.h>
#include <wgt_sig_base.h>
#include <fft_hist.h>
#include "ftmarker.h"
#include <sigtuner_gui.h>
#include <ftmarker_gui.h>
namespace Ui {
class wgt_waterfall;
}
class wgt_waterfall : public QWidget , public wgt_Sig_Base
{
Q_OBJECT
public:
explicit wgt_waterfall(QWidget *parent = 0);
~wgt_waterfall();
QCPColorMap *colorMap; // waterfall plot
//QCustomPlot *plotWaterfall; // the lower waterfall plot
mouseinfo miWaterfall; // current and last mouse info
void Update(FFT_Hist *pFFTHelp, double tlow, double thigh);
void Initialize();
bool WaterfallDirection;
bool getWaterfallDirection() const;
void setWaterfallDirection(bool value);
bool autorange; // automatically scale to fit the data on screen in the Y axis
bool ctrlpressed;
double waterhigh,waterlow; // when NOT autoranging, use the set values
void SetControlsVisible(bool val);
bool getAutorange() const;
void setAutorange(bool value);
void setRange_dBm(double low, double high){waterlow = low; waterhigh = high;}
void setXRange(double low, double high);
void AddTuner(ftmarker *tunermarker);
void RemoveTuner(ftmarker *ftm);
void UnselectMarkers();
void SetMarkerSelected(ftmarker *ftm);
void SetMarkersSelected(QVector<ftmarker *> markers);
ftmarker *GetCurSel(){return m_rectselect;}
bool HasSelection(){return m_selector->IsVisible();}
void setMarkers(freq_markers *markers);
private:
Ui::wgt_waterfall *ui;
bool eventFilter(QObject *obj, QEvent *event);
QVector<sigtuner_GUI *> m_tuners_gui;
QVector<ftmarker_GUI *> m_markers_gui;
freq_markers *m_markers; // pointer to the freq markers so we can select from them
ftmarker_GUI *m_selector; // the rectangular selector
ftmarker *m_rectselect;
double lowfreq,highfreq;
private slots:
void OnMouseMove(QMouseEvent *evt);
void OnMouseRelease(QMouseEvent *evt);
void OnMousePressed(QMouseEvent *evt);
void OnMouseDoubleClick(QMouseEvent *evt);
void onitemDoubleClick(QCPAbstractItem *item ,QMouseEvent *ev); // single marker selection on double click
void onitemClick(QCPAbstractItem *item ,QMouseEvent *ev); // single marker selection on double click
void onMarkerChanged(ftmarker *mrk);
void onMarkerAdded(ftmarker *mrk);
void onMarkersAdded(QVector<ftmarker *> markers); // signal that a group of markers were added
void onMarkerRemoved(ftmarker *mrk);
void onMarkersCleared(); // all markers removed
void onMarkerSelected(ftmarker *mrk);
signals:
void OnFreqHighlight(double freq);
void OnTimeHighlight(double timestamp);
void Pan(double val);
// void OnMarkersSelected(QVector<ftmarker *> markers);
//void OnMarkerSelected(ftmarker *marker,bool softsel);
//void OnDeleteCurrentMarker();
};
#endif // WGT_WATERFALL_H