MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / feed

Method feed

Components/HistogramDialog.cpp:226–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void
227HistogramDialog::feed(const SUFLOAT *data, unsigned int len)
228{
229 bool adjustDecider = false;
230
231 // FIXME: Decision adjustments should be better
232 if (this->properties.space == SamplingSpace::AMPLITUDE) {
233 for (unsigned int i = 0; i < len; ++i) {
234 if (data[i] < min) {
235 min = data[i];
236 adjustDecider = true;
237 }
238
239 if (data[i] > max) {
240 max = data[i];
241 adjustDecider = true;
242 }
243 }
244 }
245
246 if (adjustDecider) {
247 this->dummyDecider.setMinimum(this->min);
248 this->dummyDecider.setMaximum(this->max);
249 this->ui->histogram->reset();
250 this->refreshUi();
251 }
252
253 this->ui->histogram->feed(data, len);
254}
255
256void
257HistogramDialog::closeEvent(QCloseEvent *)

Callers

nothing calls this directly

Calls 2

refreshUiMethod · 0.95
resetMethod · 0.45

Tested by

no test coverage detected