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

Method refreshUiState

Settings/ProfileConfigTab.cpp:158–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void
159ProfileConfigTab::refreshUiState(void)
160{
161 int analyzerTypeIndex = this->ui->analyzerTypeCombo->currentIndex();
162 bool netProfile = this->ui->useNetworkProfileRadio->isChecked();
163 bool adjustStartTime = false;
164
165 this->ui->analyzerParamsStackedWidget->setCurrentIndex(analyzerTypeIndex);
166
167 if (!this->remoteSelected()) {
168 /* Local analyzer */
169 if (this->ui->sdrRadio->isChecked()) {
170 this->ui->sdrFrame->setEnabled(true);
171 this->ui->fileFrame->setEnabled(false);
172 this->sampRateCtlHint(0);
173 this->ui->ppmSpinBox->setEnabled(true);
174 } else {
175 this->ui->sdrFrame->setEnabled(false);
176 this->ui->fileFrame->setEnabled(true);
177 this->ui->ppmSpinBox->setEnabled(false);
178 this->sampRateCtlHint(1);
179 adjustStartTime = true;
180 }
181 } else {
182 /* Remote analyzer */
183 this->sampRateCtlHint(1);
184
185 if (this->ui->remoteDeviceCombo->count() == 0) {
186 if (netProfile)
187 netProfile = false;
188 this->ui->useNetworkProfileRadio->setChecked(false);
189 this->ui->useHostPortRadio->setChecked(true);
190 this->ui->useNetworkProfileRadio->setEnabled(false);
191 } else {
192 this->ui->useNetworkProfileRadio->setEnabled(true);
193 }
194
195 this->ui->hostEdit->setEnabled(!netProfile);
196 this->ui->portEdit->setEnabled(!netProfile);
197 this->ui->remoteDeviceCombo->setEnabled(netProfile);
198 this->ui->ppmSpinBox->setEnabled(true);
199 }
200
201 this->ui->sourceTimeEdit->setEnabled(adjustStartTime);
202 this->ui->sourceTimeIsUTCCheck->setEnabled(adjustStartTime);
203 this->setSelectedSampleRate(this->profile.getSampleRate());
204 this->refreshTrueSampleRate();
205}
206
207void
208ProfileConfigTab::refreshAntennas(void)

Callers 5

refreshProfileUiMethod · 0.95
onToggleSourceTypeMethod · 0.95
onAnalyzerTypeChangedMethod · 0.95

Calls 6

remoteSelectedMethod · 0.95
sampRateCtlHintMethod · 0.95
setSelectedSampleRateMethod · 0.95
refreshTrueSampleRateMethod · 0.95
setEnabledMethod · 0.45
getSampleRateMethod · 0.45

Tested by

no test coverage detected