! \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. */
| 27896 | documentation there for details. |
| 27897 | */ |
| 27898 | void QCPErrorBars::getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const |
| 27899 | { |
| 27900 | selectedSegments.clear(); |
| 27901 | unselectedSegments.clear(); |
| 27902 | if (mSelectable == QCP::stWhole) // stWhole selection type draws the entire plottable with selected style if mSelection isn't empty |
| 27903 | { |
| 27904 | if (selected()) |
| 27905 | selectedSegments << QCPDataRange(0, dataCount()); |
| 27906 | else |
| 27907 | unselectedSegments << QCPDataRange(0, dataCount()); |
| 27908 | } else |
| 27909 | { |
| 27910 | QCPDataSelection sel(selection()); |
| 27911 | sel.simplify(); |
| 27912 | selectedSegments = sel.dataRanges(); |
| 27913 | unselectedSegments = sel.inverse(QCPDataRange(0, dataCount())).dataRanges(); |
| 27914 | } |
| 27915 | } |
| 27916 | |
| 27917 | /*! \internal |
| 27918 |