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

Method onThrottleChanged

Default/Source/SourceWidget.cpp:1158–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156}
1157
1158void
1159SourceWidget::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
1183void
1184SourceWidget::onBandwidthChanged(void)

Callers 2

applyConfigMethod · 0.95

Calls 3

valueMethod · 0.80
setThrottleMethod · 0.80
setEnabledMethod · 0.45

Tested by

no test coverage detected