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

Method replot

3rdparty/qcustomplot/qcustomplot.cpp:1198–1212  ·  view source on GitHub ↗

! If the layer mode (\ref setMode) is set to \ref lmBuffered, this method allows replotting only the layerables on this specific layer, without the need to replot all other layers (as a call to \ref QCustomPlot::replot would do). QCustomPlot also makes sure to replot all layers instead of only this one, if the layer ordering or any layerable-layer-association has changed since the last

Source from the content-addressed store, hash-verified

1196 \see draw
1197*/
1198void QCPLayer::replot()
1199{
1200 if (mMode == lmBuffered && !mParentPlot->hasInvalidatedPaintBuffers())
1201 {
1202 if (QSharedPointer<QCPAbstractPaintBuffer> pb = mPaintBuffer.toStrongRef())
1203 {
1204 pb->clear(Qt::transparent);
1205 drawToPaintBuffer();
1206 pb->setInvalidated(false); // since layer is lmBuffered, we know only this layer is on buffer and we can reset invalidated flag
1207 mParentPlot->update();
1208 } else
1209 qDebug() << Q_FUNC_INFO << "no valid paint buffer associated with this layer";
1210 } else
1211 mParentPlot->replot();
1212}
1213
1214/*! \internal
1215

Callers 4

moveSelectionMethod · 0.80
mouseMoveEventMethod · 0.80
wheelEventMethod · 0.80
processRectSelectionMethod · 0.80

Calls 7

updateFunction · 0.85
setInvalidatedMethod · 0.80
startMethod · 0.80
drawToPaintBufferMethod · 0.80
clearMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected