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 waterfall3d=true, const bool time=true,
35 const bool constellation=true,
36 const bool use_openGL=true);
37 void SetDisplayTitle(const std::string);
39 bool GetWindowOpenFlag();
40 void SetWindowOpenFlag(const bool);
42 void SetFrequencyRange(const double, const double, const double);
43 double GetStartFrequency()const;
44 double GetStopFrequency()const;
45 double GetCenterFrequency()const;
47 void UpdateWindow(const bool, const std::complex<float>*,
48 const uint64_t, const float*,
49 const uint64_t, const float*,
51 const timespec, const bool);
53 float GetPowerValue()const;
54 void SetPowerValue(const float);
56 int GetWindowType()const;
57 void SetWindowType(const int);
59 int GetFFTSize()const;
60 int GetFFTSizeIndex()const;
61 void SetFFTSize(const int);
63 timespec GetLastGUIUpdateTime()const;
64 void SetLastGUIUpdateTime(const timespec);
66 unsigned int GetPendingGUIUpdateEvents()const;
67 void IncrementPendingGUIUpdateEvents();
68 void DecrementPendingGUIUpdateEvents();
69 void ResetPendingGUIUpdateEvents();
71 static const long MAX_FFT_SIZE = /*1048576*/32768;
72 static const long MIN_FFT_SIZE = 1024;
76 void SetTimeDomainAxis(double min, double max);
77 void SetConstellationAxis(double xmin, double xmax,
78 double ymin, double ymax);
79 void SetConstellationPenSize(int size);
80 void SetFrequencyAxis(double min, double max);
82 void SetUpdateTime(double t);
88 //MutexClass* _windowStateLock;
91 double _centerFrequency;
92 double _startFrequency;
93 double _stopFrequency;
95 bool _windowOpennedFlag;
97 int64_t _lastDataPointCount;
99 timespec _lastGUIUpdateTime;
100 unsigned int _pendingGUIUpdateEventsCount;
101 int _droppedEntriesCount;
102 bool _fftBuffersCreatedFlag;
105 SpectrumDisplayForm* _spectrumDisplayForm;
107 std::complex<float>* _fftPoints;
108 double* _realTimeDomainPoints;
109 double* _imagTimeDomainPoints;
112 #endif /* SPECTRUM_GUI_CLASS_HPP */