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 <TimeDomainDisplayPlot.h>
13 #include <ConstellationDisplayPlot.h>
18 class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
23 SpectrumDisplayForm(bool useOpenGL = true, QWidget* parent = 0);
24 ~SpectrumDisplayForm();
26 void setSystem( SpectrumGUIClass * newSystem, const uint64_t numFFTDataPoints,
27 const uint64_t numTimeDomainDataPoints );
29 int GetAverageCount();
30 void SetAverageCount( const int newCount );
32 void AverageDataReset();
33 void ResizeBuffers( const uint64_t numFFTDataPoints,
34 const uint64_t numTimeDomainDataPoints );
37 void resizeEvent( QResizeEvent * e );
38 void customEvent( QEvent * e );
39 void AvgLineEdit_valueChanged( int valueString );
40 void MaxHoldCheckBox_toggled( bool newState );
41 void MinHoldCheckBox_toggled( bool newState );
42 void MinHoldResetBtn_clicked();
43 void MaxHoldResetBtn_clicked();
44 void TabChanged(int index);
46 void SetFrequencyRange( const double newCenterFrequency,
47 const double newStartFrequency,
48 const double newStopFrequency );
49 void closeEvent( QCloseEvent * e );
50 void WindowTypeChanged( int newItem );
51 void UseRFFrequenciesCB( bool useRFFlag );
52 void waterfallMaximumIntensityChangedCB(double);
53 void waterfallMinimumIntensityChangedCB(double);
54 void WaterfallIntensityColorTypeChanged(int);
55 void WaterfallAutoScaleBtnCB();
56 void FFTComboBoxSelectedCB(const QString&);
58 void ToggleTabFrequency(const bool state);
59 void ToggleTabWaterfall(const bool state);
60 void ToggleTabTime(const bool state);
61 void ToggleTabConstellation(const bool state);
63 void SetTimeDomainAxis(double min, double max);
64 void SetConstellationAxis(double xmin, double xmax,
65 double ymin, double ymax);
66 void SetConstellationPenSize(int size);
67 void SetFrequencyAxis(double min, double max);
68 void SetUpdateTime(double t);
71 void newFrequencyData( const SpectrumUpdateEvent* );
72 void UpdateGuiTimer();
77 void _AverageHistory( const double * newBuffer );
80 int _historyEntryCount;
82 std::vector<double*>* _historyVector;
83 double* _averagedValues;
84 uint64_t _numRealDataPoints;
85 double* _realFFTDataPoints;
86 QIntValidator* _intValidator;
87 FrequencyDisplayPlot* _frequencyDisplayPlot;
88 WaterfallDisplayPlot* _waterfallDisplayPlot;
89 TimeDomainDisplayPlot* _timeDomainDisplayPlot;
90 ConstellationDisplayPlot* _constellationDisplayPlot;
91 SpectrumGUIClass* _system;
92 bool _systemSpecifiedFlag;
93 double _centerFrequency;
94 double _startFrequency;
95 double _noiseFloorAmplitude;
96 double _peakFrequency;
97 double _peakAmplitude;
98 static int _openGLWaterfall3DFlag;
99 double _stopFrequency;
101 //SpectrumUpdateEvent _lastSpectrumEvent;
103 // whether or not to use a particular display
105 int d_plot_waterfall;
106 int d_plot_waterfall3d;
108 int d_plot_constellation;
110 QTimer *displayTimer;
111 double d_update_time;
114 #endif /* SPECTRUM_DISPLAY_FORM_H */