| 96 | } |
| 97 | |
| 98 | void |
| 99 | FFTWidget::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 | |
| 137 | bool |
| 138 | FFTWidget::event(QEvent *event) |
nothing calls this directly
no test coverage detected