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

Method QCPLayerable

qcustomplot/qcustomplot.cpp:1339–1354  ·  view source on GitHub ↗

! Creates a new QCPLayerable instance. Since QCPLayerable is an abstract base class, it can't be instantiated directly. Use one of the derived classes. If \a plot is provided, it automatically places itself on the layer named \a targetLayer. If \a targetLayer is an empty string, it places itself on the current layer of the plot (see \ref QCustomPlot::setCurrentLayer). It is

Source from the content-addressed store, hash-verified

1337 QCPLayerable subclasses, to guarantee a working destruction hierarchy.
1338*/
1339QCPLayerable::QCPLayerable(QCustomPlot *plot, QString targetLayer, QCPLayerable *parentLayerable) :
1340 QObject(plot),
1341 mVisible(true),
1342 mParentPlot(plot),
1343 mParentLayerable(parentLayerable),
1344 mLayer(0),
1345 mAntialiased(true)
1346{
1347 if (mParentPlot)
1348 {
1349 if (targetLayer.isEmpty())
1350 setLayer(mParentPlot->currentLayer());
1351 else if (!setLayer(targetLayer))
1352 qDebug() << Q_FUNC_INFO << "setting QCPlayerable initial layer to" << targetLayer << "failed.";
1353 }
1354}
1355
1356QCPLayerable::~QCPLayerable()
1357{

Callers

nothing calls this directly

Calls 2

currentLayerMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected