]> git.gag.com Git - debian/gnuradio/blob - gr-qtgui/src/lib/spectrumdisplayform.h
Merging qtgui branch-r9068:9837: this ads a qtgui_sink_c and qtgui_sink_f that displa...
[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 <QValidator>
15 #include <vector>
16
17 class SpectrumDisplayForm : public QDialog, public Ui::SpectrumDisplayForm
18 {
19   Q_OBJECT
20
21   public:
22   SpectrumDisplayForm(QWidget* parent = 0);
23   ~SpectrumDisplayForm();
24   
25   void setSystem( SpectrumGUIClass * newSystem, const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints );
26
27   int GetAverageCount();
28   void SetAverageCount( const int newCount );
29   void Reset();
30   void AverageDataReset();
31   void ResizeBuffers( const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints );
32   
33 public slots:
34   void resizeEvent( QResizeEvent * e );
35   void customEvent( QEvent * e );
36   void AvgLineEdit_textChanged( const QString & valueString );
37   void MaxHoldCheckBox_toggled( bool newState );
38   void MinHoldCheckBox_toggled( bool newState );
39   void MinHoldResetBtn_clicked();
40   void MaxHoldResetBtn_clicked();
41   void PowerLineEdit_textChanged( const QString& valueString );
42   void SetFrequencyRange( const double newStartFrequency, const double newStopFrequency, const double newCenterFrequency );
43   void closeEvent( QCloseEvent * e );
44   void WindowTypeChanged( int newItem );
45   void UseRFFrequenciesCB( bool useRFFlag );
46   void waterfallMaximumIntensityChangedCB(double);
47   void waterfallMinimumIntensityChangedCB(double);
48   void WaterfallIntensityColorTypeChanged(int);
49   void WaterfallAutoScaleBtnCB();
50   void waterfall3DMaximumIntensityChangedCB(double);
51   void waterfall3DMinimumIntensityChangedCB(double);
52   void Waterfall3DIntensityColorTypeChanged(int);
53   void Waterfall3DAutoScaleBtnCB();
54   void FFTComboBoxSelectedCB(const QString&);
55
56
57 private slots:
58   void newFrequencyData( const SpectrumUpdateEvent* );
59
60 protected:
61
62 private:
63     void _AverageHistory( const double * newBuffer );
64
65   int _historyEntryCount;
66   int _historyEntry;
67   std::vector<double*>* _historyVector;
68   double* _averagedValues;
69   uint64_t _numRealDataPoints;
70   double* _realFFTDataPoints;
71   QIntValidator* _intValidator;
72   FrequencyDisplayPlot* _frequencyDisplayPlot;
73   WaterfallDisplayPlot* _waterfallDisplayPlot;
74   Waterfall3DDisplayPlot* _waterfall3DDisplayPlot;
75   TimeDomainDisplayPlot* _timeDomainDisplayPlot;
76   SpectrumGUIClass* _system;
77   bool _systemSpecifiedFlag;
78   double _centerFrequency;
79   double _startFrequency;
80   double _noiseFloorAmplitude;
81   double _peakFrequency;
82   double _peakAmplitude;
83   static int _openGLWaterfall3DFlag;
84   double _stopFrequency;
85 };
86
87 #endif /* SPECTRUM_DISPLAY_FORM_H */