An alternative canvas for a QwtPlot derived from QOpenGLWidget.
More...
#include <qwt_plot_opengl_canvas.h>
|
| void | replot () |
| | Invalidate the paint cache and repaint the canvas.
|
| |
|
| virtual void | paintEvent (QPaintEvent *) QWT_OVERRIDE |
| | Paint event.
|
| |
|
virtual void | initializeGL () QWT_OVERRIDE |
| | No operation - reserved for some potential use in the future.
|
| |
|
virtual void | paintGL () QWT_OVERRIDE |
| | Paint the plot.
|
| |
|
virtual void | resizeGL (int width, int height) QWT_OVERRIDE |
| | No operation - reserved for some potential use in the future.
|
| |
| void | replot () |
| | Invalidate the paint cache and repaint the canvas.
|
| |
|
void | draw (QPainter *) |
| | Helper function for the derived plot canvas.
|
| |
| QWidget * | canvasWidget () |
| |
| const QWidget * | canvasWidget () const |
| |
| virtual void | drawFocusIndicator (QPainter *) |
| | Draw the focus indication.
|
| |
| virtual void | drawBorder (QPainter *) |
| | Draw the border of the canvas.
|
| |
|
virtual void | drawBackground (QPainter *) |
| | Helper function for the derived plot canvas.
|
| |
|
void | fillBackground (QPainter *) |
| | Helper function for the derived plot canvas.
|
| |
|
void | drawCanvas (QPainter *) |
| | Draw the plot to the canvas.
|
| |
|
void | drawStyled (QPainter *, bool) |
| | Helper function for the derived plot canvas.
|
| |
|
void | drawUnstyled (QPainter *) |
| | Helper function for the derived plot canvas.
|
| |
| QPainterPath | canvasBorderPath (const QRect &rect) const |
| |
|
void | updateStyleSheetInfo () |
| | Update the cached information about the current style sheet.
|
| |
|
|
QFrame::Shadow | frameShadow |
| |
|
QFrame::Shape | frameShape |
| |
|
int | lineWidth |
| |
|
int | midLineWidth |
| |
|
int | frameWidth |
| |
|
QRect | frameRect |
| |
|
double | borderRadius |
| |
An alternative canvas for a QwtPlot derived from QOpenGLWidget.
Even if QwtPlotOpenGLCanvas is not derived from QFrame it imitates its API. When using style sheets it supports the box model - beside backgrounds with rounded borders.
- See also
- QwtPlot::setCanvas(), QwtPlotCanvas, QwtPlotCanvas::OpenGLBuffer
- Note
- Another way for getting hardware accelerated graphics is using an OpenGL offscreen buffer ( QwtPlotCanvas::OpenGLBuffer ) with QwtPlotCanvas. Performance is worse, than rendering straight to a QOpenGLWidget, but is usually better integrated into a desktop application.
◆ QwtPlotOpenGLCanvas() [1/2]
| QwtPlotOpenGLCanvas::QwtPlotOpenGLCanvas |
( |
QwtPlot * |
plot = NULL | ) |
|
|
explicit |
◆ QwtPlotOpenGLCanvas() [2/2]
| QwtPlotOpenGLCanvas::QwtPlotOpenGLCanvas |
( |
const QSurfaceFormat & |
format, |
|
|
QwtPlot * |
plot = NULL |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
| format | OpenGL surface format |
| plot | Parent plot widget |
- See also
- QwtPlot::setCanvas()
◆ borderPath()
| QPainterPath QwtPlotOpenGLCanvas::borderPath |
( |
const QRect & |
rect | ) |
const |
Calculate the painter path for a styled or rounded border.
When the canvas has no styled background or rounded borders the painter path is empty.
- Parameters
-
| rect | Bounding rectangle of the canvas |
- Returns
- Painter path, that can be used for clipping
◆ event()
| bool QwtPlotOpenGLCanvas::event |
( |
QEvent * |
event | ) |
|
|
virtual |
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange.
- Parameters
-
- Returns
- See QGLWidget::event()
◆ invalidateBackingStore()
| void QwtPlotOpenGLCanvas::invalidateBackingStore |
( |
| ) |
|
|
virtual |
◆ paintEvent()
| void QwtPlotOpenGLCanvas::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protectedvirtual |
◆ replot
| void QwtPlotOpenGLCanvas::replot |
( |
| ) |
|
|
slot |
Invalidate the paint cache and repaint the canvas.
- See also
- invalidatePaintCache()
The documentation for this class was generated from the following files: