| 1156 | } |
| 1157 | |
| 1158 | void |
| 1159 | SourceWidget::onThrottleChanged(void) |
| 1160 | { |
| 1161 | bool throttling = this->ui->throttleCheck->isChecked(); |
| 1162 | |
| 1163 | this->panelConfig->throttle = throttling; |
| 1164 | this->panelConfig->throttleRate = static_cast<unsigned>( |
| 1165 | this->ui->throttleSpin->value()); |
| 1166 | |
| 1167 | this->ui->throttleSpin->setEnabled( |
| 1168 | throttling && this->ui->throttleCheck->isChecked()); |
| 1169 | |
| 1170 | if (m_analyzer != nullptr) { |
| 1171 | try { |
| 1172 | m_analyzer->setThrottle(throttling ? this->panelConfig->throttleRate : 0); |
| 1173 | } catch (Suscan::Exception &) { |
| 1174 | (void) QMessageBox::critical( |
| 1175 | this, |
| 1176 | "SigDigger error", |
| 1177 | "Source does not allow changing the throttle config", |
| 1178 | QMessageBox::Ok); |
| 1179 | } |
| 1180 | } |
| 1181 | } |
| 1182 | |
| 1183 | void |
| 1184 | SourceWidget::onBandwidthChanged(void) |
no test coverage detected