-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwgt_fft.h
executable file
·76 lines (61 loc) · 2.23 KB
/
wgt_fft.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
#ifndef WGT_FFT_H
#define WGT_FFT_H
#include <QWidget>
#include <wgt_sig_base.h>
#include <ftmarker.h>
#include <fft_hist.h>
#include <sigtuner_gui.h>
#define FFT_GRAPH_NAME "FFT"
#define FFT_MAX_GRAPH_NAME "MaxFFT"
#define FFT_AVG_GRAPH_NAME "AvgFFT"
namespace Ui {
class wgt_FFT;
}
// Now, we want some sort of on-control editable ways to choose the CF and BW
// previously, we showed a single selector, this was used to change the window filter
// in the future, this could be the position of multiple tuners
// we should probably allow sigtuners to be added to the control, and the control will create
// and manage the appropriate
class wgt_FFT : public QWidget, public wgt_Sig_Base
{
Q_OBJECT
public:
explicit wgt_FFT(QWidget *parent = 0);
~wgt_FFT();
void Initialize();
mouseinfo miFFT; // current and last mouse info
bool autorange; // automatically scale to fit the data on screen in the Y axis
double rangelowY,rangehighY; // when NOT autoranging, use the set values
QCPItemTracer *_FFTTracer; // the tracer on the FFT graph
void UpdateCursorDotPosition(double xCenterIn);
void SetXRange(float lower,float upper);
void SetControlsVisible(bool val);
void UpdateFFT(FFT_Hist *pFFTHelp);
bool getAutorange() const;
void setAutorange(bool value);
void setRangeY(double low, double high);
void AddTuner(ftmarker *tunermarker);
void AddMainTuner(ftmarker *maintuner);
void RemoveTuner(ftmarker *ftm);
void setMarkers(freq_markers *markers);
private:
Ui::wgt_FFT *ui;
QVector<sigtuner_GUI *> m_tuners_gui;
freq_markers *m_markers;
ftmarker *m_maintuner{0};
double lowfreq,highfreq;
public slots:
void OnMouseDoubleClickFFT(QMouseEvent *evt);
void OnMousePressedFFT(QMouseEvent *evt);
void OnMouseMoveFFT(QMouseEvent *evt);
void OnMouseReleaseFFT(QMouseEvent *evt);
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);
};
#endif // WGT_FFT_H