! \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. */
| 14743 | draws the internal buffer on the widget surface. |
| 14744 | */ |
| 14745 | void 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 |