An alternative canvas for a QwtPlot derived from QOpenGLWidget. More...
#include <qwt_plot_opengl_canvas.h>
Classes | |
class | PrivateData |
Public Slots | |
void | replot () |
Public Member Functions | |
Q_INVOKABLE QPainterPath | borderPath (const QRect &) const |
virtual bool | event (QEvent *) QWT_OVERRIDE |
virtual Q_INVOKABLE void | invalidateBackingStore () QWT_OVERRIDE |
Invalidate the internal backing store. More... | |
QwtPlotOpenGLCanvas (int samples, QwtPlot *=NULL) | |
Constructor. More... | |
QwtPlotOpenGLCanvas (QwtPlot *=NULL) | |
Constructor. More... | |
virtual | ~QwtPlotOpenGLCanvas () |
Destructor. More... | |
Public Member Functions inherited from QwtPlotAbstractGLCanvas | |
QRect | frameRect () const |
QFrame::Shadow | frameShadow () const |
QFrame::Shape | frameShape () const |
int | frameStyle () const |
int | frameWidth () const |
int | lineWidth () const |
int | midLineWidth () const |
QwtPlotAbstractGLCanvas (QWidget *canvasWidget) | |
Paint attributes. More... | |
void | setFrameShadow (QFrame::Shadow) |
void | setFrameShape (QFrame::Shape) |
void | setFrameStyle (int style) |
void | setLineWidth (int) |
void | setMidLineWidth (int) |
void | setPaintAttribute (PaintAttribute, bool on=true) |
Changing the paint attributes. More... | |
bool | testPaintAttribute (PaintAttribute) const |
virtual | ~QwtPlotAbstractGLCanvas () |
Destructor. More... | |
Public Member Functions inherited from QwtPlotAbstractCanvas | |
double | borderRadius () const |
FocusIndicator | focusIndicator () const |
QwtPlot * | plot () |
Return parent plot widget. More... | |
const QwtPlot * | plot () const |
QwtPlotAbstractCanvas (QWidget *canvasWidget) | |
Constructor. More... | |
void | setBorderRadius (double) |
void | setFocusIndicator (FocusIndicator) |
virtual | ~QwtPlotAbstractCanvas () |
Destructor. More... | |
Protected Member Functions | |
virtual void | initializeGL () QWT_OVERRIDE |
No operation - reserved for some potential use in the future. More... | |
virtual void | paintEvent (QPaintEvent *) QWT_OVERRIDE |
virtual void | paintGL () QWT_OVERRIDE |
Paint the plot. More... | |
virtual void | resizeGL (int width, int height) QWT_OVERRIDE |
No operation - reserved for some potential use in the future. More... | |
Protected Member Functions inherited from QwtPlotAbstractGLCanvas | |
void | draw (QPainter *) |
Helper function for the derived plot canvas. More... | |
void | replot () |
Protected Member Functions inherited from QwtPlotAbstractCanvas | |
QPainterPath | canvasBorderPath (const QRect &rect) const |
QWidget * | canvasWidget () |
const QWidget * | canvasWidget () const |
virtual void | drawBackground (QPainter *) |
Helper function for the derived plot canvas. More... | |
virtual void | drawBorder (QPainter *) |
void | drawCanvas (QPainter *) |
Draw the plot to the canvas. More... | |
virtual void | drawFocusIndicator (QPainter *) |
void | drawStyled (QPainter *, bool) |
Helper function for the derived plot canvas. More... | |
void | drawUnstyled (QPainter *) |
Helper function for the derived plot canvas. More... | |
void | fillBackground (QPainter *) |
Helper function for the derived plot canvas. More... | |
void | updateStyleSheetInfo () |
Update the cached information about the current style sheet. More... | |
Properties | |
double | borderRadius |
QRect | frameRect |
QFrame::Shadow | frameShadow |
QFrame::Shape | frameShape |
int | frameWidth |
int | lineWidth |
int | midLineWidth |
Private Member Functions | |
virtual void | clearBackingStore () QWT_OVERRIDE |
void | init () |
Private Attributes | |
PrivateData * | m_data |
Additional Inherited Members | |
Public Types inherited from QwtPlotAbstractGLCanvas | |
enum | PaintAttribute { BackingStore = 1, ImmediatePaint = 8 } |
Paint attributes. More... | |
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.
int | 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.
|
privatevirtual |
Implements QwtPlotAbstractGLCanvas.
Definition at line 170 of file qwt_plot_opengl_canvas.cpp.
|
virtual |
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange
event | Qt Event |
Definition at line 116 of file qwt_plot_opengl_canvas.cpp.
|
private |
Definition at line 80 of file qwt_plot_opengl_canvas.cpp.
|
protectedvirtual |
No operation - reserved for some potential use in the future.
Definition at line 191 of file qwt_plot_opengl_canvas.cpp.
|
virtual |
Invalidate the internal backing store.
Implements QwtPlotAbstractGLCanvas.
Definition at line 165 of file qwt_plot_opengl_canvas.cpp.
|
protectedvirtual |
Paint event
event | Paint event |
Definition at line 105 of file qwt_plot_opengl_canvas.cpp.
|
protectedvirtual |
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.
|
protectedvirtual |
No operation - reserved for some potential use in the future.
Definition at line 270 of file qwt_plot_opengl_canvas.cpp.
|
private |
Definition at line 71 of file qwt_plot_opengl_canvas.h.
|
readwrite |
Definition at line 45 of file qwt_plot_opengl_canvas.h.
|
read |
Definition at line 43 of file qwt_plot_opengl_canvas.h.
|
readwrite |
Definition at line 38 of file qwt_plot_opengl_canvas.h.
|
readwrite |
Definition at line 39 of file qwt_plot_opengl_canvas.h.
|
read |
Definition at line 42 of file qwt_plot_opengl_canvas.h.
|
readwrite |
Definition at line 40 of file qwt_plot_opengl_canvas.h.
|
readwrite |
Definition at line 41 of file qwt_plot_opengl_canvas.h.