QwtPlotDirectPainter.3 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. .TH "QwtPlotDirectPainter" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtPlotDirectPainter \- Painter object trying to paint incrementally\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_plot_directpainter\&.h>\fP
  11. .PP
  12. Inherits QObject\&.
  13. .SS "Public Types"
  14. .in +1c
  15. .ti -1c
  16. .RI "enum \fBAttribute\fP { \fBAtomicPainter\fP = 0x01, \fBFullRepaint\fP = 0x02, \fBCopyBackingStore\fP = 0x04 }"
  17. .br
  18. .RI "Paint attributes\&. "
  19. .ti -1c
  20. .RI "typedef QFlags< \fBAttribute\fP > \fBAttributes\fP"
  21. .br
  22. .RI "Paint attributes\&. "
  23. .in -1c
  24. .SS "Public Member Functions"
  25. .in +1c
  26. .ti -1c
  27. .RI "\fBQwtPlotDirectPainter\fP (QObject *parent=NULL)"
  28. .br
  29. .RI "Constructor\&. "
  30. .ti -1c
  31. .RI "virtual \fB~QwtPlotDirectPainter\fP ()"
  32. .br
  33. .RI "Destructor\&. "
  34. .ti -1c
  35. .RI "void \fBsetAttribute\fP (\fBAttribute\fP, bool on)"
  36. .br
  37. .ti -1c
  38. .RI "bool \fBtestAttribute\fP (\fBAttribute\fP) const"
  39. .br
  40. .ti -1c
  41. .RI "void \fBsetClipping\fP (bool)"
  42. .br
  43. .ti -1c
  44. .RI "bool \fBhasClipping\fP () const"
  45. .br
  46. .ti -1c
  47. .RI "void \fBsetClipRegion\fP (const QRegion &)"
  48. .br
  49. .RI "Assign a clip region and enable clipping\&. "
  50. .ti -1c
  51. .RI "QRegion \fBclipRegion\fP () const"
  52. .br
  53. .ti -1c
  54. .RI "void \fBdrawSeries\fP (\fBQwtPlotSeriesItem\fP *, int from, int to)"
  55. .br
  56. .RI "Draw a set of points of a seriesItem\&. "
  57. .ti -1c
  58. .RI "void \fBreset\fP ()"
  59. .br
  60. .RI "Close the internal QPainter\&. "
  61. .ti -1c
  62. .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
  63. .br
  64. .RI "Event filter\&. "
  65. .in -1c
  66. .SH "Detailed Description"
  67. .PP
  68. Painter object trying to paint incrementally\&.
  69. 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\&.
  70. .PP
  71. \fBQwtPlotDirectPainter\fP offers an API to paint subsets ( f\&.e all additions points ) without erasing/repainting the plot canvas\&.
  72. .PP
  73. 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\&.
  74. .PP
  75. \fBWarning\fP
  76. .RS 4
  77. Incremental painting will only help when no replot is triggered by another operation ( like changing scales ) and nothing needs to be erased\&.
  78. .RE
  79. .PP
  80. .SH "Member Enumeration Documentation"
  81. .PP
  82. .SS "enum \fBQwtPlotDirectPainter::Attribute\fP"
  83. .PP
  84. Paint attributes\&.
  85. .PP
  86. \fBSee also\fP
  87. .RS 4
  88. \fBsetAttribute()\fP, \fBtestAttribute()\fP, \fBdrawSeries()\fP
  89. .RE
  90. .PP
  91. .PP
  92. \fBEnumerator\fP
  93. .in +1c
  94. .TP
  95. \fB\fIAtomicPainter \fP\fP
  96. 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\&.
  97. .TP
  98. \fB\fIFullRepaint \fP\fP
  99. When FullRepaint is set the plot canvas is explicitly repainted after the samples have been rendered\&.
  100. .TP
  101. \fB\fICopyBackingStore \fP\fP
  102. 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\&.
  103. .SH "Member Function Documentation"
  104. .PP
  105. .SS "QRegion QwtPlotDirectPainter::clipRegion () const"
  106. .PP
  107. \fBReturns\fP
  108. .RS 4
  109. Currently set clip region\&.
  110. .RE
  111. .PP
  112. \fBSee also\fP
  113. .RS 4
  114. \fBsetClipRegion()\fP, \fBsetClipping()\fP, \fBhasClipping()\fP
  115. .RE
  116. .PP
  117. .SS "void QwtPlotDirectPainter::drawSeries (\fBQwtPlotSeriesItem\fP * seriesItem, int from, int to)"
  118. .PP
  119. 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\&.
  120. .PP
  121. Setting plot()->canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true); will result in faster painting, if the paint engine of the canvas widget supports this feature\&.
  122. .PP
  123. \fBParameters\fP
  124. .RS 4
  125. \fIseriesItem\fP Item to be painted
  126. .br
  127. \fIfrom\fP Index of the first point to be painted
  128. .br
  129. \fIto\fP Index of the last point to be painted\&. If to < 0 the series will be painted to its last point\&.
  130. .RE
  131. .PP
  132. .SS "bool QwtPlotDirectPainter::hasClipping () const"
  133. .PP
  134. \fBReturns\fP
  135. .RS 4
  136. true, when clipping is enabled
  137. .RE
  138. .PP
  139. \fBSee also\fP
  140. .RS 4
  141. \fBsetClipping()\fP, \fBclipRegion()\fP, \fBsetClipRegion()\fP
  142. .RE
  143. .PP
  144. .SS "void QwtPlotDirectPainter::setAttribute (\fBAttribute\fP attribute, bool on)"
  145. Change an attribute
  146. .PP
  147. \fBParameters\fP
  148. .RS 4
  149. \fIattribute\fP Attribute to change
  150. .br
  151. \fIon\fP On/Off
  152. .RE
  153. .PP
  154. \fBSee also\fP
  155. .RS 4
  156. \fBAttribute\fP, \fBtestAttribute()\fP
  157. .RE
  158. .PP
  159. .SS "void QwtPlotDirectPainter::setClipping (bool enable)"
  160. En/Disables clipping
  161. .PP
  162. \fBParameters\fP
  163. .RS 4
  164. \fIenable\fP Enables clipping is true, disable it otherwise
  165. .RE
  166. .PP
  167. \fBSee also\fP
  168. .RS 4
  169. \fBhasClipping()\fP, \fBclipRegion()\fP, \fBsetClipRegion()\fP
  170. .RE
  171. .PP
  172. .SS "void QwtPlotDirectPainter::setClipRegion (const QRegion & region)"
  173. .PP
  174. 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\&.
  175. .PP
  176. \fBParameters\fP
  177. .RS 4
  178. \fIregion\fP Clip region
  179. .RE
  180. .PP
  181. \fBSee also\fP
  182. .RS 4
  183. \fBclipRegion()\fP, \fBhasClipping()\fP, \fBsetClipping()\fP
  184. .RE
  185. .PP
  186. .SS "bool QwtPlotDirectPainter::testAttribute (\fBAttribute\fP attribute) const"
  187. .PP
  188. \fBReturns\fP
  189. .RS 4
  190. True, when attribute is enabled
  191. .RE
  192. .PP
  193. \fBParameters\fP
  194. .RS 4
  195. \fIattribute\fP Attribute to be tested
  196. .RE
  197. .PP
  198. \fBSee also\fP
  199. .RS 4
  200. \fBAttribute\fP, \fBsetAttribute()\fP
  201. .RE
  202. .PP
  203. .SH "Author"
  204. .PP
  205. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.