MCPcopy Create free account
hub / github.com/LUX-Core/lux / getDataSegments

Method getDataSegments

src/qt/qcustomplot.cpp:27898–27915  ·  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

27896 documentation there for details.
27897*/
27898void 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

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected