Removing PowerLine since we weren't using it and don't have plans to.
[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(bool useOpenGL = true, 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_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);
45
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 waterfall3DMaximumIntensityChangedCB(double);
57   void waterfall3DMinimumIntensityChangedCB(double);
58   void Waterfall3DIntensityColorTypeChanged(int);
59   void Waterfall3DAutoScaleBtnCB();
60   void FFTComboBoxSelectedCB(const QString&);
61
62   void ToggleTabFrequency(const bool state);
63   void ToggleTabWaterfall(const bool state);
64   void ToggleTabWaterfall3D(const bool state);
65   void ToggleTabTime(const bool state);
66   void ToggleTabConstellation(const bool state);
67
68   void SetTimeDomainAxis(double min, double max);
69   void SetConstellationAxis(double xmin, double xmax,
70                             double ymin, double ymax);
71   void SetConstellationPenSize(int size);
72   void SetFrequencyAxis(double min, double max);
73
74 private slots:
75   void newFrequencyData( const SpectrumUpdateEvent* );
76
77 protected:
78
79 private:
80   void _AverageHistory( const double * newBuffer );
81
82   bool _useOpenGL;
83   int _historyEntryCount;
84   int _historyEntry;
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;
104   
105   //SpectrumUpdateEvent _lastSpectrumEvent;
106   
107   // whether or not to use a particular display
108   int d_plot_fft;
109   int d_plot_waterfall;
110   int d_plot_waterfall3d;
111   int d_plot_time;
112   int d_plot_constellation;
113 };
114
115 #endif /* SPECTRUM_DISPLAY_FORM_H */