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

Method registerItem

3rdparty/qcustomplot/qcustomplot.cpp:16271–16288  ·  view source on GitHub ↗

! \internal Registers the specified item with this QCustomPlot. QCustomPlot takes ownership of the item. Returns true on success, i.e. when \a item wasn't already in the plot and the parent plot of \a item is this QCustomPlot. This method is called automatically in the QCPAbstractItem base class constructor. */

Source from the content-addressed store, hash-verified

16269 This method is called automatically in the QCPAbstractItem base class constructor.
16270*/
16271bool QCustomPlot::registerItem(QCPAbstractItem *item)
16272{
16273 if (mItems.contains(item))
16274 {
16275 qDebug() << Q_FUNC_INFO << "item already added to this QCustomPlot:" << reinterpret_cast<quintptr>(item);
16276 return false;
16277 }
16278 if (item->parentPlot() != this)
16279 {
16280 qDebug() << Q_FUNC_INFO << "item not created with this QCustomPlot as parent:" << reinterpret_cast<quintptr>(item);
16281 return false;
16282 }
16283
16284 mItems.append(item);
16285 if (!item->layer()) // usually the layer is already set in the constructor of the item (via QCPLayerable constructor)
16286 item->setLayer(currentLayer());
16287 return true;
16288}
16289
16290/*! \internal
16291

Callers 1

QCPAbstractItemMethod · 0.80

Calls 4

appendMethod · 0.80
layerMethod · 0.80
setLayerMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected