diff options
Diffstat (limited to 'gr-qtgui/lib/freq_sink_c_impl.h')
-rw-r--r-- | gr-qtgui/lib/freq_sink_c_impl.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/gr-qtgui/lib/freq_sink_c_impl.h b/gr-qtgui/lib/freq_sink_c_impl.h index 66fce9d946..2ac5ba47d6 100644 --- a/gr-qtgui/lib/freq_sink_c_impl.h +++ b/gr-qtgui/lib/freq_sink_c_impl.h @@ -41,19 +41,26 @@ private: const pmt::pmt_t d_port; const pmt::pmt_t d_port_bw; - bool d_shift; - fft::fft_complex_fwd* d_fft; - - int d_index; - std::vector<gr_complex*> d_residbufs; - std::vector<double*> d_magbufs; + // Perform fftshift operation; + // this is usually desired when plotting + bool d_shift = true; + std::unique_ptr<fft::fft_complex_fwd> d_fft; + + int d_index = 0; + std::vector<volk::vector<gr_complex>> d_residbufs; + std::vector<volk::vector<double>> d_magbufs; double* d_pdu_magbuf; - float* d_fbuf; - - int d_argc; - char* d_argv; + volk::vector<float> d_fbuf; + + // Required now for Qt; argc must be greater than 0 and argv + // must have at least one valid character. Must be valid through + // life of the qApplication: + // http://harmattan-dev.nokia.com/docs/library/html/qt4/qapplication.html + char d_zero = 0; + int d_argc = 1; + char* d_argv = &d_zero; QWidget* d_parent; - FreqDisplayForm* d_main_gui; + FreqDisplayForm* d_main_gui = nullptr; gr::high_res_timer_type d_update_time; gr::high_res_timer_type d_last_time; @@ -86,7 +93,7 @@ private: void _reset(); void _gui_update_trigger(); void _test_trigger_tags(int start, int nitems); - void _test_trigger_norm(int nitems, std::vector<double*> inputs); + void _test_trigger_norm(int nitems, std::vector<volk::vector<double>> inputs); public: freq_sink_c_impl(int size, @@ -98,6 +105,12 @@ public: QWidget* parent = NULL); ~freq_sink_c_impl() override; + // Disallow copy/move because of the raw pointers. + freq_sink_c_impl(const freq_sink_c_impl&) = delete; + freq_sink_c_impl& operator=(const freq_sink_c_impl&) = delete; + freq_sink_c_impl(freq_sink_c_impl&&) = delete; + freq_sink_c_impl& operator=(freq_sink_c_impl&&) = delete; + bool check_topology(int ninputs, int noutputs) override; void exec_() override; |