! \internal \note This method is identical to \ref QCPAbstractPlottable1D::getDataSegments but needs to be reproduced here since the \ref QCPErrorBars plottable, as a special case that doesn't have its own key/value data coordinates, doesn't derive from \ref QCPAbstractPlottable1D. See the documentation there for details. */
| 28776 | documentation there for details. |
| 28777 | */ |
| 28778 | void QCPErrorBars::getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const |
| 28779 | { |
| 28780 | selectedSegments.clear(); |
| 28781 | unselectedSegments.clear(); |
| 28782 | if (mSelectable == QCP::stWhole) // stWhole selection type draws the entire plottable with selected style if mSelection isn't empty |
| 28783 | { |
| 28784 | if (selected()) |
| 28785 | selectedSegments << QCPDataRange(0, dataCount()); |
| 28786 | else |
| 28787 | unselectedSegments << QCPDataRange(0, dataCount()); |
| 28788 | } else |
| 28789 | { |
| 28790 | QCPDataSelection sel(selection()); |
| 28791 | sel.simplify(); |
| 28792 | selectedSegments = sel.dataRanges(); |
| 28793 | unselectedSegments = sel.inverse(QCPDataRange(0, dataCount())).dataRanges(); |
| 28794 | } |
| 28795 | } |
| 28796 | |
| 28797 | /*! \internal |
| 28798 |