Added signal to notify about reconfiguration of Spectrum node.

master
Hannes Matuschek 12 years ago
parent 2133a81bcc
commit fb67ada158

@ -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();
}

@ -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. */

@ -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() {

@ -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

Loading…
Cancel
Save