Merging qtdevel2 branch -r10565:10849. This adds a lot of fixes and capabilities...
[debian/gnuradio] / gr-qtgui / src / lib / spectrumdisplayform.h
1 #ifndef SPECTRUM_DISPLAY_FORM_H
2 #define SPECTRUM_DISPLAY_FORM_H
3
4 #include "spectrumdisplayform_ui.h"
5
6 class SpectrumGUIClass;
7 #include <SpectrumGUIClass.h>
8
9 #include <SpectrumGUIClass.h>
10 #include <FrequencyDisplayPlot.h>
11 #include <WaterfallDisplayPlot.h>
12 #include <Waterfall3DDisplayPlot.h>
13 #include <TimeDomainDisplayPlot.h>
14 #include <ConstellationDisplayPlot.h>
15 #include <QValidator>
16 #include <vector>
17
18 class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
19 {
20   Q_OBJECT
21
22   public:
23   SpectrumDisplayForm(QWidget* parent = 0);
24   ~SpectrumDisplayForm();
25   
26   void setSystem( SpectrumGUIClass * newSystem, const uint64_t numFFTDataPoints,
27                   const uint64_t numTimeDomainDataPoints );
28
29   int GetAverageCount();
30   void SetAverageCount( const int newCount );
31   void Reset();
32   void AverageDataReset();
33   void ResizeBuffers( const uint64_t numFFTDataPoints,
34                       const uint64_t numTimeDomainDataPoints );
35   
36 public slots:
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&);
60
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);
66
67
68 private slots:
69   void newFrequencyData( const SpectrumUpdateEvent* );
70
71 protected:
72
73 private:
74     void _AverageHistory( const double * newBuffer );
75
76   int _historyEntryCount;
77   int _historyEntry;
78   std::vector<double*>* _historyVector;
79   double* _averagedValues;
80   uint64_t _numRealDataPoints;
81   double* _realFFTDataPoints;
82   QIntValidator* _intValidator;
83   FrequencyDisplayPlot* _frequencyDisplayPlot;
84   WaterfallDisplayPlot* _waterfallDisplayPlot;
85   Waterfall3DDisplayPlot* _waterfall3DDisplayPlot;
86   TimeDomainDisplayPlot* _timeDomainDisplayPlot;
87   ConstellationDisplayPlot* _constellationDisplayPlot;
88   SpectrumGUIClass* _system;
89   bool _systemSpecifiedFlag;
90   double _centerFrequency;
91   double _startFrequency;
92   double _noiseFloorAmplitude;
93   double _peakFrequency;
94   double _peakAmplitude;
95   static int _openGLWaterfall3DFlag;
96   double _stopFrequency;
97
98   // whether or not to use a particular display
99   int d_plot_fft;
100   int d_plot_waterfall;
101   int d_plot_waterfall3d;
102   int d_plot_time;
103   int d_plot_constellation;
104 };
105
106 #endif /* SPECTRUM_DISPLAY_FORM_H */