| 156 | } |
| 157 | |
| 158 | void |
| 159 | ProfileConfigTab::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 | |
| 207 | void |
| 208 | ProfileConfigTab::refreshAntennas(void) |
no test coverage detected