27#ifndef QWT_PLOT_OPENGL_CANVAS_H
28#define QWT_PLOT_OPENGL_CANVAS_H
30#include "qwt_global.h"
31#include "qwt_plot_abstract_canvas.h"
32#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
33#include <QtOpenGLWidgets/QOpenGLWidget>
35#include <QOpenGLWidget>
37#include <QSurfaceFormat>
58 Q_PROPERTY(QFrame::Shadow frameShadow READ frameShadow WRITE setFrameShadow)
59 Q_PROPERTY(QFrame::Shape frameShape READ frameShape WRITE setFrameShape)
60 Q_PROPERTY(
int lineWidth READ lineWidth WRITE setLineWidth)
61 Q_PROPERTY(
int midLineWidth READ midLineWidth WRITE setMidLineWidth)
62 Q_PROPERTY(
int frameWidth READ frameWidth)
63 Q_PROPERTY(QRect frameRect READ frameRect DESIGNABLE
false)
65 Q_PROPERTY(
double borderRadius READ borderRadius WRITE setBorderRadius)
88 Q_INVOKABLE QPainterPath borderPath(
const QRect&)
const;
93 virtual bool event(QEvent*)
override;
105 virtual void paintEvent(QPaintEvent*)
override;
110 virtual void initializeGL()
override;
114 virtual void paintGL()
override;
118 virtual void resizeGL(
int width,
int height)
override;
124 void init(
const QSurfaceFormat&);
128 virtual void clearBackingStore()
override;
Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas
Definition qwt_plot_abstract_canvas.h:115
virtual void invalidateBackingStore()=0
Invalidate the internal backing store
void replot()
Invalidate the paint cache and repaint the canvas
Definition qwt_plot_abstract_canvas.cpp:755
An alternative canvas for a QwtPlot derived from QOpenGLWidget
Definition qwt_plot_opengl_canvas.h:55
QwtPlotOpenGLCanvas(const QSurfaceFormat &, QwtPlot *=nullptr)
Constructor with surface format
A 2-D plotting widget
Definition qwt_plot.h:99