.TH "QwtPlotDirectPainter" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPlotDirectPainter \- Painter object trying to paint incrementally\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits QObject\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBAttribute\fP { \fBAtomicPainter\fP = 0x01, \fBFullRepaint\fP = 0x02, \fBCopyBackingStore\fP = 0x04 }" .br .RI "Paint attributes\&. " .ti -1c .RI "typedef QFlags< \fBAttribute\fP > \fBAttributes\fP" .br .RI "Paint attributes\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtPlotDirectPainter\fP (QObject *parent=NULL)" .br .RI "Constructor\&. " .ti -1c .RI "virtual \fB~QwtPlotDirectPainter\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "void \fBsetAttribute\fP (\fBAttribute\fP, bool on)" .br .ti -1c .RI "bool \fBtestAttribute\fP (\fBAttribute\fP) const" .br .ti -1c .RI "void \fBsetClipping\fP (bool)" .br .ti -1c .RI "bool \fBhasClipping\fP () const" .br .ti -1c .RI "void \fBsetClipRegion\fP (const QRegion &)" .br .RI "Assign a clip region and enable clipping\&. " .ti -1c .RI "QRegion \fBclipRegion\fP () const" .br .ti -1c .RI "void \fBdrawSeries\fP (\fBQwtPlotSeriesItem\fP *, int from, int to)" .br .RI "Draw a set of points of a seriesItem\&. " .ti -1c .RI "void \fBreset\fP ()" .br .RI "Close the internal QPainter\&. " .ti -1c .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)" .br .RI "Event filter\&. " .in -1c .SH "Detailed Description" .PP 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\&. .PP \fBQwtPlotDirectPainter\fP offers an API to paint subsets ( f\&.e all additions points ) without erasing/repainting the plot canvas\&. .PP 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\&. .PP \fBWarning\fP .RS 4 Incremental painting will only help when no replot is triggered by another operation ( like changing scales ) and nothing needs to be erased\&. .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtPlotDirectPainter::Attribute\fP" .PP Paint attributes\&. .PP \fBSee also\fP .RS 4 \fBsetAttribute()\fP, \fBtestAttribute()\fP, \fBdrawSeries()\fP .RE .PP .PP \fBEnumerator\fP .in +1c .TP \fB\fIAtomicPainter \fP\fP Initializing a QPainter is an expensive operation\&. When AtomicPainter is set each call of \fBdrawSeries()\fP opens/closes a temporary QPainter\&. Otherwise \fBQwtPlotDirectPainter\fP tries to use the same QPainter as long as possible\&. .TP \fB\fIFullRepaint \fP\fP When FullRepaint is set the plot canvas is explicitly repainted after the samples have been rendered\&. .TP \fB\fICopyBackingStore \fP\fP When \fBQwtPlotCanvas::BackingStore\fP is 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\&. .SH "Member Function Documentation" .PP .SS "QRegion QwtPlotDirectPainter::clipRegion () const" .PP \fBReturns\fP .RS 4 Currently set clip region\&. .RE .PP \fBSee also\fP .RS 4 \fBsetClipRegion()\fP, \fBsetClipping()\fP, \fBhasClipping()\fP .RE .PP .SS "void QwtPlotDirectPainter::drawSeries (\fBQwtPlotSeriesItem\fP * seriesItem, int from, int to)" .PP 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\&. \fBdrawSeries()\fP can be used to display them avoiding a complete redraw of the canvas\&. .PP Setting plot()->canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true); will result in faster painting, if the paint engine of the canvas widget supports this feature\&. .PP \fBParameters\fP .RS 4 \fIseriesItem\fP Item to be painted .br \fIfrom\fP Index of the first point to be painted .br \fIto\fP Index of the last point to be painted\&. If to < 0 the series will be painted to its last point\&. .RE .PP .SS "bool QwtPlotDirectPainter::hasClipping () const" .PP \fBReturns\fP .RS 4 true, when clipping is enabled .RE .PP \fBSee also\fP .RS 4 \fBsetClipping()\fP, \fBclipRegion()\fP, \fBsetClipRegion()\fP .RE .PP .SS "void QwtPlotDirectPainter::setAttribute (\fBAttribute\fP attribute, bool on)" Change an attribute .PP \fBParameters\fP .RS 4 \fIattribute\fP Attribute to change .br \fIon\fP On/Off .RE .PP \fBSee also\fP .RS 4 \fBAttribute\fP, \fBtestAttribute()\fP .RE .PP .SS "void QwtPlotDirectPainter::setClipping (bool enable)" En/Disables clipping .PP \fBParameters\fP .RS 4 \fIenable\fP Enables clipping is true, disable it otherwise .RE .PP \fBSee also\fP .RS 4 \fBhasClipping()\fP, \fBclipRegion()\fP, \fBsetClipRegion()\fP .RE .PP .SS "void QwtPlotDirectPainter::setClipRegion (const QRegion & region)" .PP 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\&. .PP \fBParameters\fP .RS 4 \fIregion\fP Clip region .RE .PP \fBSee also\fP .RS 4 \fBclipRegion()\fP, \fBhasClipping()\fP, \fBsetClipping()\fP .RE .PP .SS "bool QwtPlotDirectPainter::testAttribute (\fBAttribute\fP attribute) const" .PP \fBReturns\fP .RS 4 True, when attribute is enabled .RE .PP \fBParameters\fP .RS 4 \fIattribute\fP Attribute to be tested .RE .PP \fBSee also\fP .RS 4 \fBAttribute\fP, \fBsetAttribute()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.