! \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. */
| 14716 | draws the internal buffer on the widget surface. |
| 14717 | */ |
| 14718 | void QCustomPlot::paintEvent(QPaintEvent *event) |
| 14719 | { |
| 14720 | Q_UNUSED(event); |
| 14721 | QCPPainter painter(this); |
| 14722 | if (painter.isActive()) |
| 14723 | { |
| 14724 | painter.setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem |
| 14725 | if (mBackgroundBrush.style() != Qt::NoBrush) |
| 14726 | painter.fillRect(mViewport, mBackgroundBrush); |
| 14727 | drawBackground(&painter); |
| 14728 | for (int bufferIndex = 0; bufferIndex < mPaintBuffers.size(); ++bufferIndex) |
| 14729 | mPaintBuffers.at(bufferIndex)->draw(&painter); |
| 14730 | } |
| 14731 | } |
| 14732 | |
| 14733 | /*! \internal |
| 14734 |