! Returns a \ref QCPDataRange which spans the entire data selection, including possible intermediate segments which are not part of the original data selection. */
| 2558 | intermediate segments which are not part of the original data selection. |
| 2559 | */ |
| 2560 | QCPDataRange QCPDataSelection::span() const |
| 2561 | { |
| 2562 | if (isEmpty()) |
| 2563 | return {}; |
| 2564 | else |
| 2565 | return {mDataRanges.first().begin(), mDataRanges.last().end()}; |
| 2566 | } |
| 2567 | |
| 2568 | /*! |
| 2569 | Adds the given \a dataRange to this data selection. This is equivalent to the += operator but |