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

Method applyConfig

Default/FFT/FFTWidget.cpp:98–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void
99FFTWidget::applyConfig(void)
100{
101 FFTWidgetConfig savedConfig = *this->panelConfig;
102
103 // Analyzer params are kept by the UIMediator, which provides information on
104 // how to start up the analyzer.
105 auto params = m_mediator->getAnalyzerParams();
106 this->refreshParamControls(*params);
107
108 // Refreshing the current palette config involves having the palette
109 // list up to date.
110 this->refreshPalettes();
111
112 this->setAveraging(savedConfig.averaging);
113 this->setPanWfRatio(savedConfig.panWfRatio);
114 this->setPandRangeMax(savedConfig.panRangeMax);
115 this->setPandRangeMin(savedConfig.panRangeMin);
116 this->setWfRangeMax(savedConfig.wfRangeMax);
117 this->setWfRangeMin(savedConfig.wfRangeMin);
118 this->setPalette(savedConfig.palette);
119 this->setFreqZoom(savedConfig.zoom);
120 this->setPeakHold(savedConfig.peakHold);
121 this->setPeakDetect(savedConfig.peakDetect);
122 this->setFilled(savedConfig.filled);
123 this->setRangeLock(savedConfig.rangeLock);
124 this->setTimeSpan(savedConfig.timeSpan);
125 this->setTimeStamps(savedConfig.timeStamps);
126 this->setBookmarks(savedConfig.bookmarks);
127 this->setUnitName(QString::fromStdString(savedConfig.unitName));
128 this->setZeroPoint(savedConfig.zeroPoint);
129 this->setGain(savedConfig.gain);
130
131 this->setProperty("collapsed", savedConfig.collapsed);
132
133 // Apply all spectrum settings, all at once
134 this->refreshSpectrumSettings();
135}
136
137bool
138FFTWidget::event(QEvent *event)

Callers

nothing calls this directly

Calls 15

refreshParamControlsMethod · 0.95
refreshPalettesMethod · 0.95
setAveragingMethod · 0.95
setPanWfRatioMethod · 0.95
setPandRangeMaxMethod · 0.95
setPandRangeMinMethod · 0.95
setWfRangeMaxMethod · 0.95
setWfRangeMinMethod · 0.95
setPaletteMethod · 0.95
setFreqZoomMethod · 0.95
setPeakHoldMethod · 0.95
setPeakDetectMethod · 0.95

Tested by

no test coverage detected