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

Method refreshUi

Components/TimeWindow.cpp:732–787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732void
733TimeWindow::refreshUi(void)
734{
735 bool haveSelection = this->ui->realWaveform->getHorizontalSelectionPresent();
736 bool baudEditable;
737
738 this->ui->periodicDivisionsSpin->setEnabled(
739 this->ui->periodicSelectionCheck->isChecked());
740 this->ui->selStartLabel->setEnabled(haveSelection);
741 this->ui->selEndLabel->setEnabled(haveSelection);
742 this->ui->selLengthLabel->setEnabled(haveSelection);
743 this->ui->periodLabel->setEnabled(haveSelection);
744 this->ui->baudLabel->setEnabled(haveSelection);
745 this->ui->actionSave_selection->setEnabled(haveSelection);
746 this->ui->dopplerButton->setEnabled(haveSelection);
747
748 if (haveSelection != this->hadSelectionBefore) {
749 this->carrierSyncNotifySelection(haveSelection);
750 this->fineTuneSelNotifySelection(haveSelection);
751 this->samplingNotifySelection(
752 haveSelection,
753 this->ui->periodicSelectionCheck->isChecked());
754 }
755
756 this->ui->sampleRateLabel->setText(
757 QString::number(static_cast<int>(
758 this->ui->realWaveform->getSampleRate())) +
759 QStringLiteral(" sp/s"));
760
761 baudEditable = this->ui->clkManualButton->isChecked()
762 || this->ui->clkGardnerButton->isChecked()
763 || this->ui->clkZcButton->isChecked();
764
765 this->ui->clkRateFrame->setEnabled(baudEditable);
766 this->ui->clkPartitionFrame->setEnabled(
767 this->ui->clkPartitionButton->isChecked());
768 this->ui->clkGardnerFrame->setEnabled(
769 this->ui->clkGardnerButton->isChecked());
770 this->ui->clkZcFrame->setEnabled(
771 this->ui->clkZcButton->isChecked());
772 this->ui->clkComponentCombo->setEnabled(
773 this->ui->decAmplitudeButton->isChecked());
774
775 SamplingProperties sp;
776 this->populateSamplingProperties(sp);
777 qreal baud = (sp.symbolCount * this->fs) / sp.length;
778
779 if (this->ui->clkSelectionButton->isChecked()
780 || this->ui->clkPartitionButton->isChecked())
781 this->ui->baudSpin->setValue(baud);
782
783 this->onZeroPointChanged();
784 this->onZeroCrossingComponentChanged();
785
786 this->hadSelectionBefore = haveSelection;
787}
788
789void

Callers 5

setDisplayDataMethod · 0.95
TimeWindowMethod · 0.95
onHSelectionMethod · 0.95

Calls 9

onZeroPointChangedMethod · 0.95
setValueMethod · 0.80
setEnabledMethod · 0.45
getSampleRateMethod · 0.45

Tested by

no test coverage detected