Adding a constellation plot and an example for viewing constellations of digital...
[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 QDialog, 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, const uint64_t numTimeDomainDataPoints );
27
28   int GetAverageCount();
29   void SetAverageCount( const int newCount );
30   void Reset();
31   void AverageDataReset();
32   void ResizeBuffers( const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints );
33   
34 public slots:
35   void resizeEvent( QResizeEvent * e );
36   void customEvent( QEvent * e );
37   void AvgLineEdit_textChanged( const QString & valueString );
38   void MaxHoldCheckBox_toggled( bool newState );
39   void MinHoldCheckBox_toggled( bool newState );
40   void MinHoldResetBtn_clicked();
41   void MaxHoldResetBtn_clicked();
42   void PowerLineEdit_textChanged( const QString& valueString );
43   void SetFrequencyRange( const double newStartFrequency, const double newStopFrequency, const double newCenterFrequency );
44   void closeEvent( QCloseEvent * e );
45   void WindowTypeChanged( int newItem );
46   void UseRFFrequenciesCB( bool useRFFlag );
47   void waterfallMaximumIntensityChangedCB(double);
48   void waterfallMinimumIntensityChangedCB(double);
49   void WaterfallIntensityColorTypeChanged(int);
50   void WaterfallAutoScaleBtnCB();
51   void waterfall3DMaximumIntensityChangedCB(double);
52   void waterfall3DMinimumIntensityChangedCB(double);
53   void Waterfall3DIntensityColorTypeChanged(int);
54   void Waterfall3DAutoScaleBtnCB();
55   void FFTComboBoxSelectedCB(const QString&);
56
57
58 private slots:
59   void newFrequencyData( const SpectrumUpdateEvent* );
60
61 protected:
62
63 private:
64     void _AverageHistory( const double * newBuffer );
65
66   int _historyEntryCount;
67   int _historyEntry;
68   std::vector<double*>* _historyVector;
69   double* _averagedValues;
70   uint64_t _numRealDataPoints;
71   double* _realFFTDataPoints;
72   QIntValidator* _intValidator;
73   FrequencyDisplayPlot* _frequencyDisplayPlot;
74   WaterfallDisplayPlot* _waterfallDisplayPlot;
75   Waterfall3DDisplayPlot* _waterfall3DDisplayPlot;
76   TimeDomainDisplayPlot* _timeDomainDisplayPlot;
77   ConstellationDisplayPlot* _constellationDisplayPlot;
78   SpectrumGUIClass* _system;
79   bool _systemSpecifiedFlag;
80   double _centerFrequency;
81   double _startFrequency;
82   double _noiseFloorAmplitude;
83   double _peakFrequency;
84   double _peakAmplitude;
85   static int _openGLWaterfall3DFlag;
86   double _stopFrequency;
87 };
88
89 #endif /* SPECTRUM_DISPLAY_FORM_H */