| 565 | } |
| 566 | |
| 567 | void |
| 568 | SourceWidget::setSampleRate(unsigned int rate) |
| 569 | { |
| 570 | if (this->rate != rate) { |
| 571 | float step; |
| 572 | this->rate = rate; |
| 573 | if (rate == 0) { |
| 574 | this->setProcessRate(0); |
| 575 | this->ui->sampleRateLabel->setText("N/A"); |
| 576 | } else { |
| 577 | this->ui->sampleRateLabel->setText( |
| 578 | SuWidgetsHelpers::formatQuantity(rate, 4, "sp/s")); |
| 579 | } |
| 580 | |
| 581 | this->ui->bwSpin->setMaximum(this->rate); |
| 582 | |
| 583 | step = SU_POW(10., SU_FLOOR(SU_LOG(this->rate))); |
| 584 | |
| 585 | if (step >= 10.f) |
| 586 | step /= 10.f; |
| 587 | } |
| 588 | } |
| 589 | |
| 590 | void |
| 591 | SourceWidget::populateAntennaCombo(Suscan::AnalyzerSourceInfo const &info) |
no test coverage detected