! 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
| 1337 | QCPLayerable subclasses, to guarantee a working destruction hierarchy. |
| 1338 | */ |
| 1339 | QCPLayerable::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 | |
| 1356 | QCPLayerable::~QCPLayerable() |
| 1357 | { |
nothing calls this directly
no test coverage detected