diff --git a/src/gui/spectrum.cc b/src/gui/spectrum.cc index 8bc8775..03c1361 100644 --- a/src/gui/spectrum.cc +++ b/src/gui/spectrum.cc @@ -47,6 +47,9 @@ Spectrum::config(const Config &src_cfg) { << " # averages: " << _Ntrafo << std::endl << " refresh rate: " << _sample_rate/(_N_samples*_Ntrafo) << "Hz"; Logger::get().log(msg); + + // Signal spectrum reconfiguration + emit spectrumConfigured(); } diff --git a/src/gui/spectrum.hh b/src/gui/spectrum.hh index dd9aca1..2780d77 100644 --- a/src/gui/spectrum.hh +++ b/src/gui/spectrum.hh @@ -48,6 +48,8 @@ public: signals: /** Gets emitted once the spectrum was updated. */ void spectrumUpdated(); + /** Gets emitted once the spectrum was reconfigured. */ + void spectrumConfigured(); protected: /** Updates the FFT in the _compute buffer. */ diff --git a/src/gui/spectrumview.cc b/src/gui/spectrumview.cc index 24ef296..395a660 100644 --- a/src/gui/spectrumview.cc +++ b/src/gui/spectrumview.cc @@ -22,6 +22,7 @@ SpectrumView::SpectrumView(Spectrum *spectrum, QWidget *parent) // Connect to update signal QObject::connect(_spectrum, SIGNAL(spectrumUpdated()), this, SLOT(update())); + QObject::connect(_spectrum, SIGNAL(spectrumConfigured()), this, SLOT(update())); } SpectrumView::~SpectrumView() { diff --git a/src/gui/waterfallview.cc b/src/gui/waterfallview.cc index ba00f71..a2e2ed2 100644 --- a/src/gui/waterfallview.cc +++ b/src/gui/waterfallview.cc @@ -87,6 +87,7 @@ WaterFallView::WaterFallView(Spectrum *spectrum, size_t height, QWidget *parent) // Get notified once a new spectrum is available: QObject::connect(_spectrum, SIGNAL(spectrumUpdated()), this, SLOT(_onSpectrumUpdated())); + QObject::connect(_spectrum, SIGNAL(spectrumConfigured()), this, SLOT(update())); } void