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>
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_textChanged( const QString & 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 PowerLineEdit_textChanged( const QString& valueString );
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 SetFrequencyAxis(double min, double max);
75 void newFrequencyData( const SpectrumUpdateEvent* );
80 void _AverageHistory( const double * newBuffer );
83 int _historyEntryCount;
85 std::vector<double*>* _historyVector;
86 double* _averagedValues;
87 uint64_t _numRealDataPoints;
88 double* _realFFTDataPoints;
89 QIntValidator* _intValidator;
90 FrequencyDisplayPlot* _frequencyDisplayPlot;
91 WaterfallDisplayPlot* _waterfallDisplayPlot;
92 Waterfall3DDisplayPlot* _waterfall3DDisplayPlot;
93 TimeDomainDisplayPlot* _timeDomainDisplayPlot;
94 ConstellationDisplayPlot* _constellationDisplayPlot;
95 SpectrumGUIClass* _system;
96 bool _systemSpecifiedFlag;
97 double _centerFrequency;
98 double _startFrequency;
99 double _noiseFloorAmplitude;
100 double _peakFrequency;
101 double _peakAmplitude;
102 static int _openGLWaterfall3DFlag;
103 double _stopFrequency;
105 //SpectrumUpdateEvent _lastSpectrumEvent;
107 // whether or not to use a particular display
109 int d_plot_waterfall;
110 int d_plot_waterfall3d;
112 int d_plot_constellation;
115 #endif /* SPECTRUM_DISPLAY_FORM_H */