| 555 | } |
| 556 | |
| 557 | void |
| 558 | PanoramicDialog::adjustRanges(void) |
| 559 | { |
| 560 | SUFREQ minFreq, maxFreq; |
| 561 | |
| 562 | minFreq = this->ui->rangeStartSpin->value(); |
| 563 | maxFreq = this->ui->rangeEndSpin->value(); |
| 564 | |
| 565 | if (this->ui->rangeStartSpin->value() > |
| 566 | this->ui->rangeEndSpin->value()) { |
| 567 | auto val = this->ui->rangeStartSpin->value(); |
| 568 | this->ui->rangeStartSpin->setValue( |
| 569 | this->ui->rangeEndSpin->value()); |
| 570 | this->ui->rangeEndSpin->setValue(val); |
| 571 | } |
| 572 | |
| 573 | this->ui->waterfall->setFreqUnits( |
| 574 | getFrequencyUnits( |
| 575 | static_cast<qint64>(maxFreq))); |
| 576 | |
| 577 | this->ui->waterfall->setSpanFreq(static_cast<qint64>(maxFreq - minFreq)); |
| 578 | this->ui->waterfall->setCenterFreq(static_cast<qint64>(maxFreq + minFreq) / 2); |
| 579 | } |
| 580 | |
| 581 | bool |
| 582 | PanoramicDialog::invalidRange(void) const |
no test coverage detected