QwtPlotOpenGLCanvas - Man Page

An alternative canvas for a QwtPlot derived from QOpenGLWidget.

Synopsis

#include <qwt_plot_opengl_canvas.h>

Inherits QOpenGLWidget, and QwtPlotAbstractGLCanvas.

Public Slots

void replot ()

Public Member Functions

QwtPlotOpenGLCanvas (QwtPlot *=NULL)
Constructor.
QwtPlotOpenGLCanvas (const QSurfaceFormat &, QwtPlot *=NULL)
Constructor.
virtual ~QwtPlotOpenGLCanvas ()
Destructor.
virtual Q_INVOKABLE void invalidateBackingStore () override
Invalidate the internal backing store.
Q_INVOKABLE QPainterPath borderPath (const QRect &) const
virtual bool event (QEvent *) override

Protected Member Functions

virtual void paintEvent (QPaintEvent *) override
virtual void initializeGL () override
No operation - reserved for some potential use in the future.
virtual void paintGL () override
Paint the plot.
virtual void resizeGL (int width, int height) override
No operation - reserved for some potential use in the future.

Additional Inherited Members

Detailed Description

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.

Definition at line 34 of file qwt_plot_opengl_canvas.h.

Constructor & Destructor Documentation

QwtPlotOpenGLCanvas::QwtPlotOpenGLCanvas (QwtPlot * plot = NULL) [explicit]

Constructor.

Parameters

plot Parent plot widget

See also

QwtPlot::setCanvas()

Definition at line 48 of file qwt_plot_opengl_canvas.cpp.

QwtPlotOpenGLCanvas::QwtPlotOpenGLCanvas (const QSurfaceFormat & format, QwtPlot * plot = NULL) [explicit]

Constructor.

Parameters

format OpenGL surface format
plot Parent plot widget

See also

QwtPlot::setCanvas()

Definition at line 65 of file qwt_plot_opengl_canvas.cpp.

Member Function Documentation

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

Definition at line 168 of file qwt_plot_opengl_canvas.cpp.

bool QwtPlotOpenGLCanvas::event (QEvent * event) [override], [virtual]

Qt event handler for QEvent::PolishRequest and QEvent::StyleChange

Parameters

event Qt Event

Returns

See QGLWidget::event()

Definition at line 112 of file qwt_plot_opengl_canvas.cpp.

void QwtPlotOpenGLCanvas::paintEvent (QPaintEvent * event) [override], [protected], [virtual]

Paint event

Parameters

event Paint event

See also

QwtPlot::drawCanvas()

Definition at line 101 of file qwt_plot_opengl_canvas.cpp.

void QwtPlotOpenGLCanvas::replot () [slot]

Invalidate the paint cache and repaint the canvas

See also

invalidatePaintCache()

Definition at line 142 of file qwt_plot_opengl_canvas.cpp.

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.

Info

Sun Jul 18 2021 Version 6.2.0 Qwt User's Guide