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

Method setCurrentLayer

qcustomplot/qcustomplot.cpp:14014–14024  ·  view source on GitHub ↗

! Sets the layer with the specified \a name to be the current layer. All layerables (\ref QCPLayerable), e.g. plottables and items, are created on the current layer. Returns true on success, i.e. if there is a layer with the specified \a name in the QCustomPlot. Layer names are case-sensitive. \see addLayer, moveLayer, removeLayer, QCPLayerable::setLayer */

Source from the content-addressed store, hash-verified

14012 \see addLayer, moveLayer, removeLayer, QCPLayerable::setLayer
14013*/
14014bool QCustomPlot::setCurrentLayer(const QString &name)
14015{
14016 if (QCPLayer *newCurrentLayer = layer(name))
14017 {
14018 return setCurrentLayer(newCurrentLayer);
14019 } else
14020 {
14021 qDebug() << Q_FUNC_INFO << "layer with name doesn't exist:" << name;
14022 return false;
14023 }
14024}
14025
14026/*! \overload
14027

Callers

nothing calls this directly

Calls 2

layerFunction · 0.85
containsMethod · 0.80

Tested by

no test coverage detected