1 #ifndef SPECTRUM_DISPLAY_FORM_H
2 #define SPECTRUM_DISPLAY_FORM_H
4 #include "spectrumdisplayform_ui.h"
6 class SpectrumGUIClass;
7 #include <SpectrumGUIClass.h>
9 #include <SpectrumGUIClass.h>
10 #include <FrequencyDisplayPlot.h>
11 #include <WaterfallDisplayPlot.h>
12 #include <Waterfall3DDisplayPlot.h>
13 #include <TimeDomainDisplayPlot.h>
14 #include <ConstellationDisplayPlot.h>
19 class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
24 SpectrumDisplayForm(bool useOpenGL = true, QWidget* parent = 0);
25 ~SpectrumDisplayForm();
27 void setSystem( SpectrumGUIClass * newSystem, const uint64_t numFFTDataPoints,
28 const uint64_t numTimeDomainDataPoints );
30 int GetAverageCount();
31 void SetAverageCount( const int newCount );
33 void AverageDataReset();
34 void ResizeBuffers( const uint64_t numFFTDataPoints,
35 const uint64_t numTimeDomainDataPoints );
38 void resizeEvent( QResizeEvent * e );
39 void customEvent( QEvent * e );
40 void AvgLineEdit_valueChanged( int valueString );
41 void MaxHoldCheckBox_toggled( bool newState );
42 void MinHoldCheckBox_toggled( bool newState );
43 void MinHoldResetBtn_clicked();
44 void MaxHoldResetBtn_clicked();
45 void TabChanged(int index);
47 void SetFrequencyRange( const double newCenterFrequency,
48 const double newStartFrequency,
49 const double newStopFrequency );
50 void closeEvent( QCloseEvent * e );
51 void WindowTypeChanged( int newItem );
52 void UseRFFrequenciesCB( bool useRFFlag );
53 void waterfallMaximumIntensityChangedCB(double);
54 void waterfallMinimumIntensityChangedCB(double);
55 void WaterfallIntensityColorTypeChanged(int);
56 void WaterfallAutoScaleBtnCB();
57 void waterfall3DMaximumIntensityChangedCB(double);
58 void waterfall3DMinimumIntensityChangedCB(double);
59 void Waterfall3DIntensityColorTypeChanged(int);
60 void Waterfall3DAutoScaleBtnCB();
61 void FFTComboBoxSelectedCB(const QString&);
63 void ToggleTabFrequency(const bool state);
64 void ToggleTabWaterfall(const bool state);
65 void ToggleTabWaterfall3D(const bool state);
66 void ToggleTabTime(const bool state);
67 void ToggleTabConstellation(const bool state);
69 void SetTimeDomainAxis(double min, double max);
70 void SetConstellationAxis(double xmin, double xmax,
71 double ymin, double ymax);
72 void SetConstellationPenSize(int size);
73 void SetFrequencyAxis(double min, double max);
74 void SetUpdateTime(double t);
77 void newFrequencyData( const SpectrumUpdateEvent* );
78 void UpdateGuiTimer();
83 void _AverageHistory( const double * newBuffer );
86 int _historyEntryCount;
88 std::vector<double*>* _historyVector;
89 double* _averagedValues;
90 uint64_t _numRealDataPoints;
91 double* _realFFTDataPoints;
92 QIntValidator* _intValidator;
93 FrequencyDisplayPlot* _frequencyDisplayPlot;
94 WaterfallDisplayPlot* _waterfallDisplayPlot;
95 Waterfall3DDisplayPlot* _waterfall3DDisplayPlot;
96 TimeDomainDisplayPlot* _timeDomainDisplayPlot;
97 ConstellationDisplayPlot* _constellationDisplayPlot;
98 SpectrumGUIClass* _system;
99 bool _systemSpecifiedFlag;
100 double _centerFrequency;
101 double _startFrequency;
102 double _noiseFloorAmplitude;
103 double _peakFrequency;
104 double _peakAmplitude;
105 static int _openGLWaterfall3DFlag;
106 double _stopFrequency;
108 //SpectrumUpdateEvent _lastSpectrumEvent;
110 // whether or not to use a particular display
112 int d_plot_waterfall;
113 int d_plot_waterfall3d;
115 int d_plot_constellation;
117 QTimer *displayTimer;
118 double d_update_time;
121 #endif /* SPECTRUM_DISPLAY_FORM_H */