QwtPlotDirectPainter(3)
π QwtPlotDirectPainter(3) π
okay bestie, this page is from the Library Functions Manual, and it's all about QwtPlotDirectPainter β the painter object that tries to paint incrementally. π¨β¨
πΈ NAME πΈ
QwtPlotDirectPainter β painter object trying to paint incrementally. no cap, that's the whole vibe. π«Ά
β¨ SYNOPSIS β¨
#include <qwt_plot_directpainter.h>
Inherits QObject. π
π Public Types π
enum Attribute { AtomicPainter = 0x01, FullRepaint = 0x02,
CopyBackingStore = 0x04 }
Paint attributes. ποΈ
typedef QFlags< Attribute > Attributes
π§ Public Member Functions π§
QwtPlotDirectPainter (QObject *parent=NULL)β Constructor. πvirtual ~QwtPlotDirectPainter ()β Destructor. πvoid setAttribute (Attribute, bool on)β change an attribute on/off; full tea below. π«Άbool testAttribute (Attribute) constβ test whether an attribute is enabled. πvoid setClipping (bool)β en/disables clipping. βοΈbool hasClipping () constβ tells you if clipping is enabled. πvoid setClipRegion (const QRegion &)β Assign a clip region and enable clipping. π―QRegion clipRegion () constβ returns the currently set clip region. πΊοΈvoid drawSeries (QwtPlotSeriesItem *, int from, int to)β Draw a set of points of a seriesItem. π¨void reset ()β Close the internalQPainter. πͺvirtual bool eventFilter (QObject *, QEvent *) overrideβ Event filter. π΅οΈ
π¦ DETAILED DESCRIPTION π¦
Painter object trying to paint incrementally.
Often applications want to display samples while they are collected. When there are too many samples complete replots will be expensive to be processed in a collection cycle. π
QwtPlotDirectPainter offers an API to paint subsets ( f.e all additions points ) without erasing/repainting the plot canvas. iconic behavior, honestly. π
On certain environments it might be important to calculate a proper clip region before painting. F.e. for Qt Embedded only the clipped part of the backing store will be copied to a ( maybe unaccelerated ) frame buffer. π
β οΈ Warning: Incremental painting will only help when no replot is triggered by another operation ( like changing scales ) and nothing needs to be erased. π
Definition at line 39 of file qwt_plot_directpainter.h.
π§΅ Member Typedef Documentation
typedef QFlags<Attribute > QwtPlotDirectPainter::Attributes
An ORed combination of Attribute values.
Definition at line 73 of file qwt_plot_directpainter.h.
π₯ Member Enumeration Documentation
enum QwtPlotDirectPainter::Attribute
Paint attributes.
See also: setAttribute(), testAttribute(), drawSeries()
Enumerator
AtomicPainterβ Initializing aQPainteris an expensive operation. WhenAtomicPainteris set each call ofdrawSeries()opens/closes a temporaryQPainter. OtherwiseQwtPlotDirectPaintertries to use the sameQPainteras long as possible. πΈFullRepaintβ WhenFullRepaintis set the plot canvas is explicitly repainted after the samples have been rendered. πΌοΈCopyBackingStoreβ WhenQwtPlotCanvas::BackingStoreis enabled the painter has to paint to the backing store and the widget. In certain situations/environments it might be faster to paint to the backing store only and then copy the backing store to the canvas. This flag can also be useful for settings, where Qt fills the the clip region with the widget background. π«Ά
Definition at line 46 of file qwt_plot_directpainter.h.
π Constructor & Destructor Documentation
QwtPlotDirectPainter::QwtPlotDirectPainter (QObject * parent = NULL)
[explicit] Constructor.
Definition at line 66 of file qwt_plot_directpainter.cpp.
QwtPlotDirectPainter::~QwtPlotDirectPainter ()
[virtual] Destructor.
Definition at line 73 of file qwt_plot_directpainter.cpp.
π Member Function Documentation
QRegion QwtPlotDirectPainter::clipRegion () const
Returns: Currently set clip region.
See also: setClipRegion(), setClipping(), hasClipping()
Definition at line 151 of file qwt_plot_directpainter.cpp.
void QwtPlotDirectPainter::drawSeries (QwtPlotSeriesItem * seriesItem, int from, int to)
Draw a set of points of a seriesItem. When observing an measurement while it is running, new points have to be added to an existing seriesItem. drawSeries() can be used to display them avoiding a complete redraw of the canvas. π―
Setting plot()->canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true); will result in faster painting, if the paint engine of the canvas widget supports this feature. β‘
Parameters:
seriesItemβ Item to be painted.fromβ Index of the first point to be painted.toβ Index of the last point to be painted. Ifto < 0the series will be painted to its last point.
Definition at line 172 of file qwt_plot_directpainter.cpp.
bool QwtPlotDirectPainter::eventFilter (QObject * , QEvent * event)
[override], [virtual] Event filter.
Definition at line 277 of file qwt_plot_directpainter.cpp.
bool QwtPlotDirectPainter::hasClipping () const
Returns: true, when clipping is enabled.
See also: setClipping(), clipRegion(), setClipRegion()
Definition at line 125 of file qwt_plot_directpainter.cpp.
void QwtPlotDirectPainter::reset ()
Close the internal QPainter.
Definition at line 264 of file qwt_plot_directpainter.cpp.
void QwtPlotDirectPainter::setAttribute (Attribute attribute, bool on)
Change an attribute.
Parameters:
attributeβ Attribute to change.onβ On/Off.
See also: Attribute, testAttribute()
Definition at line 86 of file qwt_plot_directpainter.cpp.
void QwtPlotDirectPainter::setClipping (bool enable)
En/Disables clipping.
Parameters:
enableβ Enables clipping istrue, disable it otherwise.
See also: hasClipping(), clipRegion(), setClipRegion()
Definition at line 116 of file qwt_plot_directpainter.cpp.
void QwtPlotDirectPainter::setClipRegion (const QRegion & region)
Assign a clip region and enable clipping. Depending on the environment setting a proper clip region might improve the performance heavily. F.e. on Qt embedded only the clipped part of the backing store will be copied to a ( maybe unaccelerated ) frame buffer device. π―
Parameters:
regionβ Clip region.
See also: clipRegion(), hasClipping(), setClipping()
Definition at line 141 of file qwt_plot_directpainter.cpp.
bool QwtPlotDirectPainter::testAttribute (Attribute attribute) const
Returns: True, when attribute is enabled.
Parameters:
attributeβ Attribute to be tested.
See also: Attribute, setAttribute()
Definition at line 105 of file qwt_plot_directpainter.cpp.
π«Ά Author
Generated automatically by Doxygen for Qwt User's Guide from the source code. π€π
okay bestie, that's the whole page β Qwt User's Guide is the source/version, and the footer date isn't listed on this one, so no cap: date not given. QwtPlotDirectPainter(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