|
Qwt User's Guide 6.3.0
|
An alternative canvas for a QwtPlot derived from QOpenGLWidget. More...
#include <qwt_plot_opengl_canvas.h>
Public Slots | |
| void | replot () |
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 |
| virtual bool | event (QEvent *) override |
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) const |
| void | setFrameStyle (int style) |
| int | frameStyle () const |
| void | setFrameShadow (QFrame::Shadow) |
| QFrame::Shadow | frameShadow () const |
| void | setFrameShape (QFrame::Shape) |
| QFrame::Shape | frameShape () const |
| void | setLineWidth (int) |
| int | lineWidth () const |
| void | setMidLineWidth (int) |
| int | midLineWidth () const |
| int | frameWidth () const |
| QRect | 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 () const |
| void | setBorderRadius (double) |
| double | borderRadius () const |
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. | |
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 () const |
| virtual 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) const |
| void | 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. More... | |
| typedef QFlags< PaintAttribute > | PaintAttributes |
| Paint attributes. | |
Public Types inherited from QwtPlotAbstractCanvas | |
| enum | FocusIndicator { NoFocusIndicator , CanvasFocusIndicator , ItemFocusIndicator } |
| Focus indicator The default setting is NoFocusIndicator. More... | |
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.
Definition at line 34 of file qwt_plot_opengl_canvas.h.
|
explicit |
Constructor.
| plot | Parent plot widget |
Definition at line 49 of file qwt_plot_opengl_canvas.cpp.
|
explicit |
Constructor.
| numSamples | Number of samples, see QSurfaceFormat::samples() |
| plot | Parent plot widget |
Definition at line 63 of file qwt_plot_opengl_canvas.cpp.
|
virtual |
Destructor.
Definition at line 94 of file qwt_plot_opengl_canvas.cpp.
| 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.
| rect | Bounding rectangle of the canvas |
Definition at line 185 of file qwt_plot_opengl_canvas.cpp.
|
overrideprivatevirtual |
Implements QwtPlotAbstractGLCanvas.
Definition at line 170 of file qwt_plot_opengl_canvas.cpp.
|
overridevirtual |
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange
| event | Qt Event |
Definition at line 116 of file qwt_plot_opengl_canvas.cpp.
|
overrideprotectedvirtual |
No operation - reserved for some potential use in the future.
Definition at line 191 of file qwt_plot_opengl_canvas.cpp.
|
overridevirtual |
Invalidate the internal backing store.
Implements QwtPlotAbstractGLCanvas.
Definition at line 165 of file qwt_plot_opengl_canvas.cpp.
|
overrideprotectedvirtual |
Paint event
| event | Paint event |
Definition at line 105 of file qwt_plot_opengl_canvas.cpp.
|
overrideprotectedvirtual |
Paint the plot.
Definition at line 196 of file qwt_plot_opengl_canvas.cpp.
|
slot |
Invalidate the paint cache and repaint the canvas
Definition at line 159 of file qwt_plot_opengl_canvas.cpp.
|
overrideprotectedvirtual |
No operation - reserved for some potential use in the future.
Definition at line 270 of file qwt_plot_opengl_canvas.cpp.