MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / selectedLegends

Method selectedLegends

3rdparty/qcustomplot/qcustomplot.cpp:15046–15071  ·  view source on GitHub ↗

! Returns the legends that currently have selected parts, i.e. whose selection state is not \ref QCPLegend::spNone. \see selectedPlottables, selectedAxes, setInteractions, QCPLegend::setSelectedParts, QCPLegend::setSelectableParts, QCPLegend::selectedItems */

Source from the content-addressed store, hash-verified

15044 QCPLegend::setSelectableParts, QCPLegend::selectedItems
15045*/
15046QList<QCPLegend*> QCustomPlot::selectedLegends() const
15047{
15048 QList<QCPLegend*> result;
15049
15050 QStack<QCPLayoutElement*> elementStack;
15051 if (mPlotLayout)
15052 elementStack.push(mPlotLayout);
15053
15054 while (!elementStack.isEmpty())
15055 {
15056 foreach (QCPLayoutElement *subElement, elementStack.pop()->elements(false))
15057 {
15058 if (subElement)
15059 {
15060 elementStack.push(subElement);
15061 if (QCPLegend *leg = qobject_cast<QCPLegend*>(subElement))
15062 {
15063 if (leg->selectedParts() != QCPLegend::spNone)
15064 result.append(leg);
15065 }
15066 }
15067 }
15068 }
15069
15070 return result;
15071}
15072
15073/*!
15074 Deselects all layerables (plottables, items, axes, legends,...) of the QCustomPlot.

Callers

nothing calls this directly

Calls 7

elementsMethod · 0.80
selectedPartsMethod · 0.80
appendMethod · 0.80
foreachFunction · 0.70
pushMethod · 0.45
isEmptyMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected