! \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. */
| 27986 | documentation there for details. |
| 27987 | */ |
| 27988 | void QCPErrorBars::getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const |
| 27989 | { |
| 27990 | selectedSegments.clear(); |
| 27991 | unselectedSegments.clear(); |
| 27992 | if (mSelectable == QCP::stWhole) // stWhole selection type draws the entire plottable with selected style if mSelection isn't empty |
| 27993 | { |
| 27994 | if (selected()) |
| 27995 | selectedSegments << QCPDataRange(0, dataCount()); |
| 27996 | else |
| 27997 | unselectedSegments << QCPDataRange(0, dataCount()); |
| 27998 | } else |
| 27999 | { |
| 28000 | QCPDataSelection sel(selection()); |
| 28001 | sel.simplify(); |
| 28002 | selectedSegments = sel.dataRanges(); |
| 28003 | unselectedSegments = sel.inverse(QCPDataRange(0, dataCount())).dataRanges(); |
| 28004 | } |
| 28005 | } |
| 28006 | |
| 28007 | /*! \internal |
| 28008 |