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 PowerLineEdit_textChanged( const QString& valueString );
45 void SetFrequencyRange( const double newStartFrequency,
46 const double newStopFrequency,
47 const double newCenterFrequency );
48 void closeEvent( QCloseEvent * e );
49 void WindowTypeChanged( int newItem );
50 void UseRFFrequenciesCB( bool useRFFlag );
51 void waterfallMaximumIntensityChangedCB(double);
52 void waterfallMinimumIntensityChangedCB(double);
53 void WaterfallIntensityColorTypeChanged(int);
54 void WaterfallAutoScaleBtnCB();
55 void waterfall3DMaximumIntensityChangedCB(double);
56 void waterfall3DMinimumIntensityChangedCB(double);
57 void Waterfall3DIntensityColorTypeChanged(int);
58 void Waterfall3DAutoScaleBtnCB();
59 void FFTComboBoxSelectedCB(const QString&);
61 void ToggleTabFrequency(const bool state);
62 void ToggleTabWaterfall(const bool state);
63 void ToggleTabWaterfall3D(const bool state);
64 void ToggleTabTime(const bool state);
65 void ToggleTabConstellation(const bool state);
67 void SetTimeDomainAxis(double min, double max);
68 void SetConstellationAxis(double xmin, double xmax,
69 double ymin, double ymax);
70 void SetFrequencyAxis(double min, double max);
73 void newFrequencyData( const SpectrumUpdateEvent* );
78 void _AverageHistory( const double * newBuffer );
81 int _historyEntryCount;
83 std::vector<double*>* _historyVector;
84 double* _averagedValues;
85 uint64_t _numRealDataPoints;
86 double* _realFFTDataPoints;
87 QIntValidator* _intValidator;
88 FrequencyDisplayPlot* _frequencyDisplayPlot;
89 WaterfallDisplayPlot* _waterfallDisplayPlot;
90 Waterfall3DDisplayPlot* _waterfall3DDisplayPlot;
91 TimeDomainDisplayPlot* _timeDomainDisplayPlot;
92 ConstellationDisplayPlot* _constellationDisplayPlot;
93 SpectrumGUIClass* _system;
94 bool _systemSpecifiedFlag;
95 double _centerFrequency;
96 double _startFrequency;
97 double _noiseFloorAmplitude;
98 double _peakFrequency;
99 double _peakAmplitude;
100 static int _openGLWaterfall3DFlag;
101 double _stopFrequency;
103 // whether or not to use a particular display
105 int d_plot_waterfall;
106 int d_plot_waterfall3d;
108 int d_plot_constellation;
111 #endif /* SPECTRUM_DISPLAY_FORM_H */