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

Method paintEvent

qcustomplot/qcustomplot.cpp:14745–14758  ·  view source on GitHub ↗

! \internal Event handler for when the QCustomPlot widget needs repainting. This does not cause a \ref replot, but draws the internal buffer on the widget surface. */

Source from the content-addressed store, hash-verified

14743 draws the internal buffer on the widget surface.
14744*/
14745void QCustomPlot::paintEvent(QPaintEvent *event)
14746{
14747 Q_UNUSED(event);
14748 QCPPainter painter(this);
14749 if (painter.isActive())
14750 {
14751 painter.setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
14752 if (mBackgroundBrush.style() != Qt::NoBrush)
14753 painter.fillRect(mViewport, mBackgroundBrush);
14754 drawBackground(&painter);
14755 for (int bufferIndex = 0; bufferIndex < mPaintBuffers.size(); ++bufferIndex)
14756 mPaintBuffers.at(bufferIndex)->draw(&painter);
14757 }
14758}
14759
14760/*! \internal
14761

Callers

nothing calls this directly

Calls 3

drawMethod · 0.80
atMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected