An alternative canvas for a QwtPlot derived from QOpenGLWidget
更多...
#include <qwt_plot_opengl_canvas.h>
|
| void | replot () |
| | Replot the canvas
|
| |
|
| virtual void | paintEvent (QPaintEvent *) override |
| | Handle paint events
|
| |
| virtual void | initializeGL () override |
| | Initialize OpenGL
|
| |
| virtual void | paintGL () override |
| | Paint OpenGL
|
| |
| virtual void | resizeGL (int width, int height) override |
| | Resize OpenGL
|
| |
| void | replot () |
| | Invalidate the paint cache and repaint the canvas
|
| |
|
void | draw (QPainter *) |
| | Helper function for the derived plot canvas
|
| |
| QWidget * | canvasWidget () |
| |
| const QWidget * | canvasWidget () const |
| |
| virtual void | drawFocusIndicator (QPainter *) |
| | Draw the focus indication
|
| |
| virtual void | drawBorder (QPainter *) |
| | Draw the border of the canvas
|
| |
|
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
|
| |
|
|
QFrame::Shadow | frameShadow |
| |
|
QFrame::Shape | frameShape |
| |
|
int | lineWidth |
| |
|
int | midLineWidth |
| |
|
int | frameWidth |
| |
|
QRect | frameRect |
| |
|
double | borderRadius |
| |
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.
- 参见
- QwtPlot::setCanvas(), QwtPlotCanvas, QwtPlotCanvas::OpenGLBuffer
- 注解
- 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.
◆ QwtPlotOpenGLCanvas()
| QwtPlotOpenGLCanvas::QwtPlotOpenGLCanvas |
( |
QwtPlot * |
plot = nullptr | ) |
|
|
explicit |
◆ borderPath()
| QPainterPath QwtPlotOpenGLCanvas::borderPath |
( |
const QRect & |
rect | ) |
const |
Get the border path
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.
- 参数
-
| [in] | rect | Bounding rectangle of the canvas |
- 返回
- Painter path, that can be used for clipping
◆ event()
| bool QwtPlotOpenGLCanvas::event |
( |
QEvent * |
event | ) |
|
|
overridevirtual |
Handle events
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange
- 参数
-
- 返回
- See QOpenGLWidget::event()
◆ initializeGL()
| void QwtPlotOpenGLCanvas::initializeGL |
( |
| ) |
|
|
overrideprotectedvirtual |
Initialize OpenGL
No operation - reserved for some potential use in the future
◆ invalidateBackingStore()
| void QwtPlotOpenGLCanvas::invalidateBackingStore |
( |
| ) |
|
|
overridevirtual |
◆ paintEvent()
| void QwtPlotOpenGLCanvas::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotectedvirtual |
◆ paintGL()
| void QwtPlotOpenGLCanvas::paintGL |
( |
| ) |
|
|
overrideprotectedvirtual |
Paint OpenGL
Paint the plot
◆ replot
| void QwtPlotOpenGLCanvas::replot |
( |
| ) |
|
|
slot |
Replot the canvas
Invalidate the paint cache and repaint the canvas
- 参见
- invalidatePaintCache()
◆ resizeGL()
| void QwtPlotOpenGLCanvas::resizeGL |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
overrideprotectedvirtual |
Resize OpenGL
No operation - reserved for some potential use in the future
该类的文档由以下文件生成:
- /home/runner/work/QWT/QWT/src/plot/qwt_plot_opengl_canvas.h
- /home/runner/work/QWT/QWT/src/plot/qwt_plot_opengl_canvas.cpp