QwtPlotOpenGLCanvas(3)
π¦ QwtPlotOpenGLCanvas(3) π¦
okay bestie, welcome to the Library Functions Manual entry for QwtPlotOpenGLCanvas β the alternative canvas for a QwtPlot that's derived from QOpenGLWidget. slay β¨
πΈ NAME πΈ
QwtPlotOpenGLCanvas β An alternative canvas for a QwtPlot derived from QOpenGLWidget.
β¨ SYNOPSIS β¨
#include <qwt_plot_opengl_canvas.h>
Inherits QOpenGLWidget, and QwtPlotAbstractGLCanvas.
π Public Slots
void replot ()β repaint vibes, deets below.
π Public Member Functions
QwtPlotOpenGLCanvas (QwtPlot *=NULL)β Constructor.QwtPlotOpenGLCanvas (int samples, QwtPlot *=NULL)β Constructor.virtual ~QwtPlotOpenGLCanvas ()β Destructor.virtual Q_INVOKABLE void invalidateBackingStore () overrideβ Invalidate the internal backing store.Q_INVOKABLE QPainterPath borderPath (const QRect &) constβ the synopsis just drops the signature; full border-path deets are below.virtual bool event (QEvent *) overrideβ event handler; full deets below.
π Public Member Functions inherited from QwtPlotAbstractGLCanvas
QwtPlotAbstractGLCanvas (QWidget *canvasWidget)β Constructor.virtual ~QwtPlotAbstractGLCanvas ()β Destructor.void setPaintAttribute (PaintAttribute, bool on=true)β Changing the paint attributes.bool testPaintAttribute (PaintAttribute) constvoid setFrameStyle (int style)int frameStyle () constvoid setFrameShadow (QFrame::Shadow)QFrame::Shadow frameShadow () constvoid setFrameShape (QFrame::Shape)QFrame::Shape frameShape () constvoid setLineWidth (int)int lineWidth () constvoid setMidLineWidth (int)int midLineWidth () constint frameWidth () constQRect frameRect () const
π«Ά Public Member Functions inherited from QwtPlotAbstractCanvas
QwtPlotAbstractCanvas (QWidget *canvasWidget)β Constructor.virtual ~QwtPlotAbstractCanvas ()β Destructor.QwtPlot * plot ()β Return parent plot widget.const QwtPlot * plot () constβ Return parent plot widget.void setFocusIndicator (FocusIndicator)FocusIndicator focusIndicator () constvoid setBorderRadius (double)double borderRadius () const
π§ Protected Member Functions
virtual void paintEvent (QPaintEvent *) overridevirtual 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.
π Protected Member Functions inherited from QwtPlotAbstractGLCanvas
void replot ()void draw (QPainter *)β Helper function for the derived plot canvas.
π Protected Member Functions inherited from QwtPlotAbstractCanvas
QWidget * canvasWidget ()const QWidget * canvasWidget () constvirtual void drawFocusIndicator (QPainter *)virtual void drawBorder (QPainter *)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) constvoid updateStyleSheetInfo ()β Update the cached information about the current style sheet.
π Additional Inherited Members π
β Public Types inherited from QwtPlotAbstractGLCanvas
enum PaintAttribute { BackingStore = 1, ImmediatePaint = 8 }β Paint attributes.typedef QFlags< PaintAttribute > PaintAttributesβ Paint attributes.
π Public Types inherited from QwtPlotAbstractCanvas
enum FocusIndicator { NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator }β Focus indicator. The default setting isNoFocusIndicator.
π 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) withQwtPlotCanvas. Performance is worse, than rendering straight to aQOpenGLWidget, 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 49 of file qwt_plot_opengl_canvas.cpp.
QwtPlotOpenGLCanvas::QwtPlotOpenGLCanvas (int numSamples, QwtPlot * plot = NULL) [explicit]
Constructor.
Parameters
numSamplesβ Number of samples, seeQSurfaceFormat::samples()plotβ Parent plot widget
See also: QwtPlot::setCanvas()
Definition at line 63 of file qwt_plot_opengl_canvas.cpp.
QwtPlotOpenGLCanvas::~QwtPlotOpenGLCanvas () [virtual]
Destructor.
Definition at line 94 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 185 of file qwt_plot_opengl_canvas.cpp.
void QwtPlotOpenGLCanvas::clearBackingStore () [override], [private], [virtual]
Implements QwtPlotAbstractGLCanvas.
Definition at line 170 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 116 of file qwt_plot_opengl_canvas.cpp.
void QwtPlotOpenGLCanvas::initializeGL () [override], [protected], [virtual]
No operation - reserved for some potential use in the future.
Definition at line 191 of file qwt_plot_opengl_canvas.cpp.
void QwtPlotOpenGLCanvas::invalidateBackingStore () [override], [virtual]
Invalidate the internal backing store.
Implements QwtPlotAbstractGLCanvas.
Definition at line 165 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 105 of file qwt_plot_opengl_canvas.cpp.
void QwtPlotOpenGLCanvas::paintGL () [override], [protected], [virtual]
Paint the plot.
Definition at line 196 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 159 of file qwt_plot_opengl_canvas.cpp.
void QwtPlotOpenGLCanvas::resizeGL (int width, int height) [override], [protected], [virtual]
No operation - reserved for some potential use in the future.
Definition at line 270 of file qwt_plot_opengl_canvas.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Okay that's the whole glow-up, bestie π
Footer sign-off: source/version is the Qwt User's Guide, and the page is QwtPlotOpenGLCanvas(3). There's no date printed in the original footer, so we are not inventing one β no cap ππ«Ά
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms