QwtPlotCanvas(3)
π QwtPlotCanvas(3) β Library Functions Manual π
okay so bestie, this is the manual page for QwtPlotCanvas from the Qwt User's Guide. buckle up, it's giving Qt widget realness π
πΈ NAME πΈ
QwtPlotCanvas β Canvas of a QwtPlot.
β¨ SYNOPSIS β¨
#include <qwt_plot_canvas.h>
Inherits QFrame, and QwtPlotAbstractCanvas.
π Public Types π
enum PaintAttribute { BackingStore = 1, Opaque = 2, HackStyledBackground = 4, ImmediatePaint = 8 }β Paint attributes.typedef QFlags< PaintAttribute > PaintAttributes
π¦ Public Types inherited from QwtPlotAbstractCanvas
enum FocusIndicator { NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator }β Focus indicator. The default setting isNoFocusIndicator.
π Public Slots π
void replot ()
π Public Member Functions π
QwtPlotCanvas (QwtPlot *=NULL)β Constructor.virtual ~QwtPlotCanvas ()β Destructor.void setPaintAttribute (PaintAttribute, bool on=true)β Changing the paint attributes.bool testPaintAttribute (PaintAttribute) constconst QPixmap * backingStore () constQ_INVOKABLE void invalidateBackingStore ()β Invalidate the internal backing store.virtual bool event (QEvent *) overrideQ_INVOKABLE QPainterPath borderPath (const QRect &) 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 () constvoid setBorderRadius (double)double borderRadius () const
π§ Protected Member Functions π§
virtual void paintEvent (QPaintEvent *) overridevirtual void resizeEvent (QResizeEvent *) overridevirtual void drawBorder (QPainter *) override
π Protected Member Functions inherited from QwtPlotAbstractCanvas
QWidget * canvasWidget ()const QWidget * canvasWidget () constvirtual void drawFocusIndicator (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) constvoid updateStyleSheetInfo ()β Update the cached information about the current style sheet.
π Detailed Description π
Canvas of a QwtPlot.
Canvas is the widget where all plot items are displayed.
See also QwtPlot::setCanvas(), QwtPlotGLCanvas, QwtPlotOpenGLCanvas
Definition at line 29 of file qwt_plot_canvas.h.
π Member Typedef Documentation π
typedef QFlags<PaintAttribute > QwtPlotCanvas::PaintAttributes
An ORed combination of PaintAttribute values.
Definition at line 102 of file qwt_plot_canvas.h.
πΈ Member Enumeration Documentation πΈ
enum QwtPlotCanvas::PaintAttribute
Paint attributes. The default setting enables BackingStore and Opaque.
See also setPaintAttribute(), testPaintAttribute()
Enumerator
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 (usingQwtPlotDirectPainter).
See also backingStore(), invalidateBackingStore()
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 ( f.e 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β Try to improve painting of styled backgrounds.QwtPlotCanvassupports 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β WhenImmediatePaintis setreplot()callsrepaint()instead ofupdate().
See also replot(), QWidget::repaint(), QWidget::update()
Definition at line 44 of file qwt_plot_canvas.h.
π¦ Constructor & Destructor Documentation π¦
QwtPlotCanvas::QwtPlotCanvas (QwtPlot * plot = NULL) [explicit]
Constructor.
Parameters
plotβ Parent plot widget
See also QwtPlot::setCanvas()
Definition at line 41 of file qwt_plot_canvas.cpp.
QwtPlotCanvas::~QwtPlotCanvas () [virtual]
Destructor.
Definition at line 57 of file qwt_plot_canvas.cpp.
π Member Function Documentation π
const QPixmap * QwtPlotCanvas::backingStore () const
Returns
- Backing store, might be null
Definition at line 133 of file qwt_plot_canvas.cpp.
QPainterPath QwtPlotCanvas::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.
Parameters
rectβ Bounding rectangle of the canvas
Returns
- Painter path, that can be used for clipping
Definition at line 320 of file qwt_plot_canvas.cpp.
void QwtPlotCanvas::drawBorder (QPainter * painter) [override], [protected], [virtual]
Draw the border of the plot canvas.
Parameters
painterβ Painter
See also setBorderRadius()
Reimplemented from QwtPlotAbstractCanvas.
Definition at line 276 of file qwt_plot_canvas.cpp.
bool QwtPlotCanvas::event (QEvent * event) [override], [virtual]
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange.
Parameters
eventβ Qt Event
Returns
- See
QFrame::event()
Definition at line 151 of file qwt_plot_canvas.cpp.
void QwtPlotCanvas::invalidateBackingStore ()
Invalidate the internal backing store.
Definition at line 139 of file qwt_plot_canvas.cpp.
void QwtPlotCanvas::paintEvent (QPaintEvent * event) [override], [protected], [virtual]
Paint event.
Parameters
eventβ Paint event
Definition at line 178 of file qwt_plot_canvas.cpp.
void QwtPlotCanvas::replot () [slot]
Invalidate the paint cache and repaint the canvas.
See also invalidatePaintCache()
Definition at line 301 of file qwt_plot_canvas.cpp.
void QwtPlotCanvas::resizeEvent (QResizeEvent * event) [override], [protected], [virtual]
Resize event.
Parameters
eventβ Resize event
Definition at line 291 of file qwt_plot_canvas.cpp.
void QwtPlotCanvas::setPaintAttribute (PaintAttribute attribute, bool on = true)
Changing the paint attributes.
Parameters
attributeβ Paint attributeonβ On/Off
See also testPaintAttribute(), backingStore()
Definition at line 70 of file qwt_plot_canvas.cpp.
bool QwtPlotCanvas::testPaintAttribute (PaintAttribute attribute) const
Test whether a paint attribute is enabled.
Parameters
attributeβ Paint attribute
Returns
true, when attribute is enabled
See also setPaintAttribute()
Definition at line 127 of file qwt_plot_canvas.cpp.
β¨ Author β¨
Generated automatically by Doxygen for Qwt User's Guide from the source code.
and that's the whole page bestie! source/version: Qwt User's Guide; date: none given on this one, so no fake calendar vibes π β QwtPlotCanvas(3) out π
β¨π«Ά
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms