! \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. */
| 15464 | draws the internal buffer on the widget surface. |
| 15465 | */ |
| 15466 | void QCustomPlot::paintEvent(QPaintEvent *event) |
| 15467 | { |
| 15468 | Q_UNUSED(event) |
| 15469 | QCPPainter painter(this); |
| 15470 | if (painter.isActive()) |
| 15471 | { |
| 15472 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
| 15473 | painter.setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem |
| 15474 | #endif |
| 15475 | if (mBackgroundBrush.style() != Qt::NoBrush) |
| 15476 | painter.fillRect(mViewport, mBackgroundBrush); |
| 15477 | drawBackground(&painter); |
| 15478 | foreach (QSharedPointer<QCPAbstractPaintBuffer> buffer, mPaintBuffers) |
| 15479 | buffer->draw(&painter); |
| 15480 | } |
| 15481 | } |
| 15482 | |
| 15483 | /*! \internal |
| 15484 |