1 #ifndef SPECTRUM_GUI_CLASS_HPP
2 #define SPECTRUM_GUI_CLASS_HPP
4 //#include <mutexClass.hpp>
6 #include <qapplication.h>
9 #include <spectrumUpdateEvents.h>
11 //#include <Windowing.hpp>
13 class SpectrumDisplayForm;
14 #include <spectrumdisplayform.h>
22 class SpectrumGUIClass
25 SpectrumGUIClass(const uint64_t maxDataSize, const uint64_t fftSize,
26 const double newCenterFrequency,
27 const double newStartFrequency,
28 const double newStopFrequency);
32 void OpenSpectrumWindow(QWidget*,
33 const bool frequency=true, const bool waterfall=true,
34 const bool time=true, const bool constellation=true,
35 const bool use_openGL=true);
36 void SetDisplayTitle(const std::string);
38 bool GetWindowOpenFlag();
39 void SetWindowOpenFlag(const bool);
41 void SetFrequencyRange(const double, const double, const double);
42 double GetStartFrequency()const;
43 double GetStopFrequency()const;
44 double GetCenterFrequency()const;
46 void UpdateWindow(const bool, const std::complex<float>*,
47 const uint64_t, const float*,
48 const uint64_t, const float*,
50 const timespec, const bool);
52 float GetPowerValue()const;
53 void SetPowerValue(const float);
55 int GetWindowType()const;
56 void SetWindowType(const int);
58 int GetFFTSize()const;
59 int GetFFTSizeIndex()const;
60 void SetFFTSize(const int);
62 timespec GetLastGUIUpdateTime()const;
63 void SetLastGUIUpdateTime(const timespec);
65 unsigned int GetPendingGUIUpdateEvents()const;
66 void IncrementPendingGUIUpdateEvents();
67 void DecrementPendingGUIUpdateEvents();
68 void ResetPendingGUIUpdateEvents();
70 static const long MAX_FFT_SIZE = /*1048576*/32768;
71 static const long MIN_FFT_SIZE = 1024;
75 void SetTimeDomainAxis(double min, double max);
76 void SetConstellationAxis(double xmin, double xmax,
77 double ymin, double ymax);
78 void SetConstellationPenSize(int size);
79 void SetFrequencyAxis(double min, double max);
81 void SetUpdateTime(double t);
87 //MutexClass* _windowStateLock;
90 double _centerFrequency;
91 double _startFrequency;
92 double _stopFrequency;
94 bool _windowOpennedFlag;
96 int64_t _lastDataPointCount;
98 timespec _lastGUIUpdateTime;
99 unsigned int _pendingGUIUpdateEventsCount;
100 int _droppedEntriesCount;
101 bool _fftBuffersCreatedFlag;
104 SpectrumDisplayForm* _spectrumDisplayForm;
106 std::complex<float>* _fftPoints;
107 double* _realTimeDomainPoints;
108 double* _imagTimeDomainPoints;
111 #endif /* SPECTRUM_GUI_CLASS_HPP */