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

Method setDisplayData

Components/TimeWindow.cpp:944–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942}
943
944void
945TimeWindow::setDisplayData(
946 std::vector<SUCOMPLEX> const *displayData,
947 bool keepView)
948{
949 QCursor cursor = this->cursor();
950
951 this->displayData = displayData;
952
953 // This is just a workaround. TODO: fix build method in Waveformview
954 this->setCursor(Qt::WaitCursor);
955
956 if (displayData->size() == 0) {
957 this->ui->realWaveform->setData(nullptr, false);
958 this->ui->imagWaveform->setData(nullptr, false);
959 } else {
960 qint64 currStart = this->ui->realWaveform->getSampleStart();
961 qint64 currEnd = this->ui->realWaveform->getSampleEnd();
962
963 this->ui->realWaveform->setData(displayData, keepView, true);
964 this->ui->imagWaveform->setData(displayData, keepView, true);
965
966 if (currStart != currEnd) {
967 this->ui->realWaveform->zoomHorizontal(currStart, currEnd);
968 this->ui->imagWaveform->zoomHorizontal(currStart, currEnd);
969 }
970 }
971
972 this->setCursor(Qt::ArrowCursor);
973
974 this->refreshUi();
975 this->refreshMeasures();
976 this->setCursor(cursor);
977}
978
979void
980TimeWindow::setData(std::vector<SUCOMPLEX> const &data, qreal fs, qreal bw)

Callers 3

setDataMethod · 0.95
onTaskDoneMethod · 0.95
onResetCarrierMethod · 0.95

Calls 4

refreshUiMethod · 0.95
refreshMeasuresMethod · 0.95
setDataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected