| 578 | } |
| 579 | |
| 580 | void |
| 581 | TimeWindow::getTransformRegion( |
| 582 | const SUCOMPLEX * &origin, |
| 583 | SUCOMPLEX *&destination, |
| 584 | SUSCOUNT &length, |
| 585 | bool selection) |
| 586 | { |
| 587 | const SUCOMPLEX *data = this->getDisplayData(); |
| 588 | SUCOMPLEX *dest; |
| 589 | length = 0; |
| 590 | |
| 591 | this->processedData.resize(this->getDisplayDataLength()); |
| 592 | dest = this->processedData.data(); |
| 593 | |
| 594 | if (data == this->data->data()) |
| 595 | memcpy(dest, data, this->getDisplayDataLength() * sizeof(SUCOMPLEX)); |
| 596 | |
| 597 | if (selection && this->ui->realWaveform->getHorizontalSelectionPresent()) { |
| 598 | qint64 selStart = static_cast<qint64>( |
| 599 | this->ui->realWaveform->getHorizontalSelectionStart()); |
| 600 | qint64 selEnd = static_cast<qint64>( |
| 601 | this->ui->realWaveform->getHorizontalSelectionEnd()); |
| 602 | |
| 603 | origin = data + selStart; |
| 604 | destination = dest + selStart; |
| 605 | length = selEnd - selStart; |
| 606 | } |
| 607 | |
| 608 | if (length == 0) { |
| 609 | origin = data; |
| 610 | destination = dest; |
| 611 | length = this->getDisplayDataLength(); |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | void |
| 616 | TimeWindow::populateSamplingProperties(SamplingProperties &prop) |
no test coverage detected