Canvas of a QwtPlot.
More...
#include <qwt_plot_canvas.h>
|
| void | replot () |
| | Invalidate the paint cache and repaint the canvas.
|
| |
|
| virtual void | paintEvent (QPaintEvent *) override |
| | Paint event handler.
|
| |
| virtual void | resizeEvent (QResizeEvent *) override |
| | Resize event handler.
|
| |
| virtual void | drawBorder (QPainter *) override |
| | Draw border.
|
| |
| QWidget * | canvasWidget () |
| |
| const QWidget * | canvasWidget () const |
| |
| virtual void | drawFocusIndicator (QPainter *) |
| | Draw the focus indication.
|
| |
|
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.
|
| |
Canvas of a QwtPlot.
Canvas is the widget where all plot items are displayed
- See also
- QwtPlot::setCanvas(), QwtPlotGLCanvas, QwtPlotOpenGLCanvas
◆ PaintAttribute
Paint attributes.
The default setting enables BackingStore and Opaque.
- See also
- setPaintAttribute(), testPaintAttribute()
| Enumerator |
|---|
| BackingStore | BackingStore.
Paint double buffered reusing the content of the pixmap buffer when possible. Using a backing store might improve the performance significantly, when working with widget overlays (like rubber bands). Disabling the cache might improve the performance for incremental paints (using QwtPlotDirectPainter). - See also
- backingStore(), invalidateBackingStore()
|
| Opaque | Opaque.
Try to fill the complete contents rectangle of the plot canvas. When using styled backgrounds Qt assumes that the canvas doesn't fill its area completely (e.g. because of rounded borders) and fills the area below the canvas. When this is done with gradients it might result in a serious performance bottleneck — depending on the size. When the Opaque attribute is enabled the canvas tries to identify the gaps with some heuristics and to fill those only. - Warning
- Will not work for semitransparent backgrounds.
|
| HackStyledBackground | HackStyledBackground.
Try to improve painting of styled backgrounds. QwtPlotCanvas supports the box model attributes for customizing the layout with style sheets. Unfortunately the design of Qt style sheets has no concept how to handle backgrounds with rounded corners — beside of padding. When HackStyledBackground is enabled the plot canvas tries to separate the background from the background border by reverse engineering to paint the background before and the border after the plot items. In this order the border gets perfectly antialiased and you can avoid some pixel artifacts in the corners.
|
| ImmediatePaint | ImmediatePaint.
When ImmediatePaint is set replot() calls repaint() instead of update(). - See also
- replot(), QWidget::repaint(), QWidget::update()
|
◆ QwtPlotCanvas()
| QwtPlotCanvas::QwtPlotCanvas |
( |
QwtPlot * |
plot = nullptr | ) |
|
|
explicit |
◆ backingStore()
| const QPixmap * QwtPlotCanvas::backingStore |
( |
| ) |
const |
Get the backing store.
- Returns
- Backing store pixmap, might be null
◆ borderPath()
| QPainterPath QwtPlotCanvas::borderPath |
( |
const QRect & |
rect | ) |
const |
Calculate the painter path for a styled or rounded border.
- Parameters
-
| [in] | rect | Bounding rectangle of the canvas |
- Returns
- Painter path that can be used for clipping
When the canvas has no styled background or rounded borders, the painter path is empty.
◆ drawBorder()
| void QwtPlotCanvas::drawBorder |
( |
QPainter * |
painter | ) |
|
|
overrideprotectedvirtual |
◆ event()
| bool QwtPlotCanvas::event |
( |
QEvent * |
event | ) |
|
|
overridevirtual |
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange.
- Parameters
-
- Returns
- See QFrame::event()
◆ paintEvent()
| void QwtPlotCanvas::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Paint event handler.
Paint event.
- Parameters
-
◆ replot
| void QwtPlotCanvas::replot |
( |
| ) |
|
|
slot |
Invalidate the paint cache and repaint the canvas.
- See also
- invalidatePaintCache()
◆ resizeEvent()
| void QwtPlotCanvas::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Resize event handler.
Resize event.
- Parameters
-
◆ setPaintAttribute()
| void QwtPlotCanvas::setPaintAttribute |
( |
PaintAttribute |
attribute, |
|
|
bool |
on = true |
|
) |
| |
◆ testPaintAttribute()
| bool QwtPlotCanvas::testPaintAttribute |
( |
PaintAttribute |
attribute | ) |
const |
Test whether a paint attribute is enabled.
- Parameters
-
| [in] | attribute | Paint attribute |
- Returns
- true when attribute is enabled
- See also
- setPaintAttribute()
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot/qwt_plot_canvas.h
- /home/runner/work/QWT/QWT/src/plot/qwt_plot_canvas.cpp