| 942 | } |
| 943 | |
| 944 | void |
| 945 | TimeWindow::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 | |
| 979 | void |
| 980 | TimeWindow::setData(std::vector<SUCOMPLEX> const &data, qreal fs, qreal bw) |
no test coverage detected