MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / getDataSegments

Method getDataSegments

qcustomplot/qcustomplot.cpp:27988–28005  ·  view source on GitHub ↗

! \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. */

Source from the content-addressed store, hash-verified

27986 documentation there for details.
27987*/
27988void 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

Callers

nothing calls this directly

Calls 5

selectedFunction · 0.85
selectionFunction · 0.85
simplifyMethod · 0.80
inverseMethod · 0.80
clearMethod · 0.60

Tested by

no test coverage detected