QwtPlotIntervalCurve.3 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. .TH "QwtPlotIntervalCurve" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtPlotIntervalCurve \- \fBQwtPlotIntervalCurve\fP represents a series of samples, where each value is associated with an interval ( $[y1,y2] = f(x)$ )\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_plot_intervalcurve\&.h>\fP
  11. .PP
  12. Inherits \fBQwtPlotSeriesItem\fP, and \fBQwtSeriesStore< QwtIntervalSample >\fP\&.
  13. .SS "Public Types"
  14. .in +1c
  15. .ti -1c
  16. .RI "enum \fBCurveStyle\fP { \fBNoCurve\fP, \fBTube\fP, \fBUserCurve\fP = 100 }"
  17. .br
  18. .RI "Curve styles\&. The default setting is \fBQwtPlotIntervalCurve::Tube\fP\&. "
  19. .ti -1c
  20. .RI "enum \fBPaintAttribute\fP { \fBClipPolygons\fP = 0x01, \fBClipSymbol\fP = 0x02 }"
  21. .br
  22. .ti -1c
  23. .RI "typedef QFlags< \fBPaintAttribute\fP > \fBPaintAttributes\fP"
  24. .br
  25. .RI "Paint attributes\&. "
  26. .in -1c
  27. .SS "Public Member Functions"
  28. .in +1c
  29. .ti -1c
  30. .RI "\fBQwtPlotIntervalCurve\fP (const QString &\fBtitle\fP=QString())"
  31. .br
  32. .ti -1c
  33. .RI "\fBQwtPlotIntervalCurve\fP (const \fBQwtText\fP &\fBtitle\fP)"
  34. .br
  35. .ti -1c
  36. .RI "virtual \fB~QwtPlotIntervalCurve\fP ()"
  37. .br
  38. .RI "Destructor\&. "
  39. .ti -1c
  40. .RI "virtual int \fBrtti\fP () const"
  41. .br
  42. .ti -1c
  43. .RI "void \fBsetPaintAttribute\fP (\fBPaintAttribute\fP, bool on=true)"
  44. .br
  45. .ti -1c
  46. .RI "bool \fBtestPaintAttribute\fP (\fBPaintAttribute\fP) const"
  47. .br
  48. .ti -1c
  49. .RI "void \fBsetSamples\fP (const QVector< \fBQwtIntervalSample\fP > &)"
  50. .br
  51. .ti -1c
  52. .RI "void \fBsetSamples\fP (\fBQwtSeriesData\fP< \fBQwtIntervalSample\fP > *)"
  53. .br
  54. .ti -1c
  55. .RI "void \fBsetPen\fP (const QColor &, qreal width=0\&.0, Qt::PenStyle=Qt::SolidLine)"
  56. .br
  57. .ti -1c
  58. .RI "void \fBsetPen\fP (const QPen &)"
  59. .br
  60. .RI "Assign a pen\&. "
  61. .ti -1c
  62. .RI "const QPen & \fBpen\fP () const"
  63. .br
  64. .ti -1c
  65. .RI "void \fBsetBrush\fP (const QBrush &)"
  66. .br
  67. .ti -1c
  68. .RI "const QBrush & \fBbrush\fP () const"
  69. .br
  70. .ti -1c
  71. .RI "void \fBsetStyle\fP (\fBCurveStyle\fP \fBstyle\fP)"
  72. .br
  73. .ti -1c
  74. .RI "\fBCurveStyle\fP \fBstyle\fP () const"
  75. .br
  76. .ti -1c
  77. .RI "void \fBsetSymbol\fP (const \fBQwtIntervalSymbol\fP *)"
  78. .br
  79. .ti -1c
  80. .RI "const \fBQwtIntervalSymbol\fP * \fBsymbol\fP () const"
  81. .br
  82. .ti -1c
  83. .RI "virtual void \fBdrawSeries\fP (QPainter *, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, int from, int to) const"
  84. .br
  85. .ti -1c
  86. .RI "virtual QRectF \fBboundingRect\fP () const"
  87. .br
  88. .ti -1c
  89. .RI "virtual \fBQwtGraphic\fP \fBlegendIcon\fP (int index, const QSizeF &) const"
  90. .br
  91. .in -1c
  92. .SS "Protected Member Functions"
  93. .in +1c
  94. .ti -1c
  95. .RI "void \fBinit\fP ()"
  96. .br
  97. .RI "Initialize internal members\&. "
  98. .ti -1c
  99. .RI "virtual void \fBdrawTube\fP (QPainter *, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, int from, int to) const"
  100. .br
  101. .ti -1c
  102. .RI "virtual void \fBdrawSymbols\fP (QPainter *, const \fBQwtIntervalSymbol\fP &, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, int from, int to) const"
  103. .br
  104. .in -1c
  105. .SH "Detailed Description"
  106. .PP
  107. \fBQwtPlotIntervalCurve\fP represents a series of samples, where each value is associated with an interval ( $[y1,y2] = f(x)$ )\&.
  108. The representation depends on the \fBstyle()\fP and an optional \fBsymbol()\fP that is displayed for each interval\&. \fBQwtPlotIntervalCurve\fP might be used to display error bars or the area between 2 curves\&.
  109. .SH "Member Enumeration Documentation"
  110. .PP
  111. .SS "enum \fBQwtPlotIntervalCurve::CurveStyle\fP"
  112. .PP
  113. Curve styles\&. The default setting is \fBQwtPlotIntervalCurve::Tube\fP\&.
  114. .PP
  115. \fBSee also\fP
  116. .RS 4
  117. \fBsetStyle()\fP, \fBstyle()\fP
  118. .RE
  119. .PP
  120. .PP
  121. \fBEnumerator\fP
  122. .in +1c
  123. .TP
  124. \fB\fINoCurve \fP\fP
  125. Don't draw a curve\&. Note: This doesn't affect the symbols\&.
  126. .TP
  127. \fB\fITube \fP\fP
  128. Build 2 curves from the upper and lower limits of the intervals and draw them with the \fBpen()\fP\&. The area between the curves is filled with the \fBbrush()\fP\&.
  129. .TP
  130. \fB\fIUserCurve \fP\fP
  131. Styles >= \fBQwtPlotIntervalCurve::UserCurve\fP are reserved for derived classes that overload \fBdrawSeries()\fP with additional application specific curve types\&.
  132. .SS "enum \fBQwtPlotIntervalCurve::PaintAttribute\fP"
  133. Attributes to modify the drawing algorithm\&.
  134. .PP
  135. \fBSee also\fP
  136. .RS 4
  137. \fBsetPaintAttribute()\fP, \fBtestPaintAttribute()\fP
  138. .RE
  139. .PP
  140. .PP
  141. \fBEnumerator\fP
  142. .in +1c
  143. .TP
  144. \fB\fIClipPolygons \fP\fP
  145. Clip polygons before painting them\&. In situations, where points are far outside the visible area (f\&.e when zooming deep) this might be a substantial improvement for the painting performance\&.
  146. .TP
  147. \fB\fIClipSymbol \fP\fP
  148. Check if a symbol is on the plot canvas before painting it\&.
  149. .SH "Constructor & Destructor Documentation"
  150. .PP
  151. .SS "QwtPlotIntervalCurve::QwtPlotIntervalCurve (const QString & title = \fCQString()\fP)\fC [explicit]\fP"
  152. Constructor
  153. .PP
  154. \fBParameters\fP
  155. .RS 4
  156. \fItitle\fP Title of the curve
  157. .RE
  158. .PP
  159. .SS "QwtPlotIntervalCurve::QwtPlotIntervalCurve (const \fBQwtText\fP & title)\fC [explicit]\fP"
  160. Constructor
  161. .PP
  162. \fBParameters\fP
  163. .RS 4
  164. \fItitle\fP Title of the curve
  165. .RE
  166. .PP
  167. .SH "Member Function Documentation"
  168. .PP
  169. .SS "QRectF QwtPlotIntervalCurve::boundingRect () const\fC [virtual]\fP"
  170. .PP
  171. \fBReturns\fP
  172. .RS 4
  173. Bounding rectangle of all samples\&. For an empty series the rectangle is invalid\&.
  174. .RE
  175. .PP
  176. .PP
  177. Reimplemented from \fBQwtPlotSeriesItem\fP\&.
  178. .SS "const QBrush & QwtPlotIntervalCurve::brush () const"
  179. .PP
  180. \fBReturns\fP
  181. .RS 4
  182. Brush used to fill the area in Tube \fBstyle()\fP
  183. .RE
  184. .PP
  185. \fBSee also\fP
  186. .RS 4
  187. \fBsetBrush()\fP, \fBsetStyle()\fP, \fBCurveStyle\fP
  188. .RE
  189. .PP
  190. .SS "void QwtPlotIntervalCurve::drawSeries (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, int from, int to) const\fC [virtual]\fP"
  191. Draw a subset of the samples
  192. .PP
  193. \fBParameters\fP
  194. .RS 4
  195. \fIpainter\fP Painter
  196. .br
  197. \fIxMap\fP Maps x-values into pixel coordinates\&.
  198. .br
  199. \fIyMap\fP Maps y-values into pixel coordinates\&.
  200. .br
  201. \fIcanvasRect\fP Contents rectangle of the canvas
  202. .br
  203. \fIfrom\fP Index of the first sample to be painted
  204. .br
  205. \fIto\fP Index of the last sample to be painted\&. If to < 0 the series will be painted to its last sample\&.
  206. .RE
  207. .PP
  208. \fBSee also\fP
  209. .RS 4
  210. \fBdrawTube()\fP, \fBdrawSymbols()\fP
  211. .RE
  212. .PP
  213. .PP
  214. Implements \fBQwtPlotSeriesItem\fP\&.
  215. .SS "void QwtPlotIntervalCurve::drawSymbols (QPainter * painter, const \fBQwtIntervalSymbol\fP & symbol, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, int from, int to) const\fC [protected]\fP, \fC [virtual]\fP"
  216. Draw symbols for a subset of the samples
  217. .PP
  218. \fBParameters\fP
  219. .RS 4
  220. \fIpainter\fP Painter
  221. .br
  222. \fIsymbol\fP Interval symbol
  223. .br
  224. \fIxMap\fP x map
  225. .br
  226. \fIyMap\fP y map
  227. .br
  228. \fIcanvasRect\fP Contents rectangle of the canvas
  229. .br
  230. \fIfrom\fP Index of the first sample to be painted
  231. .br
  232. \fIto\fP Index of the last sample to be painted
  233. .RE
  234. .PP
  235. \fBSee also\fP
  236. .RS 4
  237. \fBsetSymbol()\fP, \fBdrawSeries()\fP, \fBdrawTube()\fP
  238. .RE
  239. .PP
  240. .SS "void QwtPlotIntervalCurve::drawTube (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect, int from, int to) const\fC [protected]\fP, \fC [virtual]\fP"
  241. Draw a tube
  242. .PP
  243. Builds 2 curves from the upper and lower limits of the intervals and draws them with the \fBpen()\fP\&. The area between the curves is filled with the \fBbrush()\fP\&.
  244. .PP
  245. \fBParameters\fP
  246. .RS 4
  247. \fIpainter\fP Painter
  248. .br
  249. \fIxMap\fP Maps x-values into pixel coordinates\&.
  250. .br
  251. \fIyMap\fP Maps y-values into pixel coordinates\&.
  252. .br
  253. \fIcanvasRect\fP Contents rectangle of the canvas
  254. .br
  255. \fIfrom\fP Index of the first sample to be painted
  256. .br
  257. \fIto\fP Index of the last sample to be painted\&. If to < 0 the series will be painted to its last sample\&.
  258. .RE
  259. .PP
  260. \fBSee also\fP
  261. .RS 4
  262. \fBdrawSeries()\fP, \fBdrawSymbols()\fP
  263. .RE
  264. .PP
  265. .SS "\fBQwtGraphic\fP QwtPlotIntervalCurve::legendIcon (int index, const QSizeF & size) const\fC [virtual]\fP"
  266. .PP
  267. \fBReturns\fP
  268. .RS 4
  269. Icon for the legend
  270. .RE
  271. .PP
  272. In case of Tube \fBstyle()\fP the icon is a plain rectangle filled with the \fBbrush()\fP\&. If a symbol is assigned it is scaled to size\&.
  273. .PP
  274. \fBParameters\fP
  275. .RS 4
  276. \fIindex\fP Index of the legend entry ( ignored as there is only one )
  277. .br
  278. \fIsize\fP Icon size
  279. .RE
  280. .PP
  281. \fBSee also\fP
  282. .RS 4
  283. \fBQwtPlotItem::setLegendIconSize()\fP, \fBQwtPlotItem::legendData()\fP
  284. .RE
  285. .PP
  286. .PP
  287. Reimplemented from \fBQwtPlotItem\fP\&.
  288. .SS "const QPen & QwtPlotIntervalCurve::pen () const"
  289. .PP
  290. \fBReturns\fP
  291. .RS 4
  292. Pen used to draw the lines
  293. .RE
  294. .PP
  295. \fBSee also\fP
  296. .RS 4
  297. \fBsetPen()\fP, \fBbrush()\fP
  298. .RE
  299. .PP
  300. .SS "int QwtPlotIntervalCurve::rtti () const\fC [virtual]\fP"
  301. .PP
  302. \fBReturns\fP
  303. .RS 4
  304. \fBQwtPlotItem::Rtti_PlotIntervalCurve\fP
  305. .RE
  306. .PP
  307. .PP
  308. Reimplemented from \fBQwtPlotItem\fP\&.
  309. .SS "void QwtPlotIntervalCurve::setBrush (const QBrush & brush)"
  310. Assign a brush\&.
  311. .PP
  312. The brush is used to fill the area in Tube \fBstyle()\fP\&.
  313. .PP
  314. \fBParameters\fP
  315. .RS 4
  316. \fIbrush\fP Brush
  317. .RE
  318. .PP
  319. \fBSee also\fP
  320. .RS 4
  321. \fBbrush()\fP, \fBpen()\fP, \fBsetStyle()\fP, \fBCurveStyle\fP
  322. .RE
  323. .PP
  324. .SS "void QwtPlotIntervalCurve::setPaintAttribute (\fBPaintAttribute\fP attribute, bool on = \fCtrue\fP)"
  325. Specify an attribute how to draw the curve
  326. .PP
  327. \fBParameters\fP
  328. .RS 4
  329. \fIattribute\fP Paint attribute
  330. .br
  331. \fIon\fP On/Off
  332. .RE
  333. .PP
  334. \fBSee also\fP
  335. .RS 4
  336. \fBtestPaintAttribute()\fP
  337. .RE
  338. .PP
  339. .SS "void QwtPlotIntervalCurve::setPen (const QColor & color, qreal width = \fC0\&.0\fP, Qt::PenStyle style = \fCQt::SolidLine\fP)"
  340. Build and assign a pen
  341. .PP
  342. In Qt5 the default pen width is 1\&.0 ( 0\&.0 in Qt4 ) what makes it non cosmetic ( see QPen::isCosmetic() )\&. This method has been introduced to hide this incompatibility\&.
  343. .PP
  344. \fBParameters\fP
  345. .RS 4
  346. \fIcolor\fP Pen color
  347. .br
  348. \fIwidth\fP Pen width
  349. .br
  350. \fIstyle\fP Pen style
  351. .RE
  352. .PP
  353. \fBSee also\fP
  354. .RS 4
  355. \fBpen()\fP, \fBbrush()\fP
  356. .RE
  357. .PP
  358. .SS "void QwtPlotIntervalCurve::setPen (const QPen & pen)"
  359. .PP
  360. Assign a pen\&.
  361. .PP
  362. \fBParameters\fP
  363. .RS 4
  364. \fIpen\fP New pen
  365. .RE
  366. .PP
  367. \fBSee also\fP
  368. .RS 4
  369. \fBpen()\fP, \fBbrush()\fP
  370. .RE
  371. .PP
  372. .SS "void QwtPlotIntervalCurve::setSamples (const QVector< \fBQwtIntervalSample\fP > & samples)"
  373. Initialize data with an array of samples\&.
  374. .PP
  375. \fBParameters\fP
  376. .RS 4
  377. \fIsamples\fP Vector of samples
  378. .RE
  379. .PP
  380. .SS "void QwtPlotIntervalCurve::setSamples (\fBQwtSeriesData\fP< \fBQwtIntervalSample\fP > * data)"
  381. Assign a series of samples
  382. .PP
  383. \fBsetSamples()\fP is just a wrapper for \fBsetData()\fP without any additional value - beside that it is easier to find for the developer\&.
  384. .PP
  385. \fBParameters\fP
  386. .RS 4
  387. \fIdata\fP Data
  388. .RE
  389. .PP
  390. \fBWarning\fP
  391. .RS 4
  392. The item takes ownership of the data object, deleting it when its not used anymore\&.
  393. .RE
  394. .PP
  395. .SS "void QwtPlotIntervalCurve::setStyle (\fBCurveStyle\fP style)"
  396. Set the curve's drawing style
  397. .PP
  398. \fBParameters\fP
  399. .RS 4
  400. \fIstyle\fP Curve style
  401. .RE
  402. .PP
  403. \fBSee also\fP
  404. .RS 4
  405. \fBCurveStyle\fP, \fBstyle()\fP
  406. .RE
  407. .PP
  408. .SS "void QwtPlotIntervalCurve::setSymbol (const \fBQwtIntervalSymbol\fP * symbol)"
  409. Assign a symbol\&.
  410. .PP
  411. \fBParameters\fP
  412. .RS 4
  413. \fIsymbol\fP Symbol
  414. .RE
  415. .PP
  416. \fBSee also\fP
  417. .RS 4
  418. \fBsymbol()\fP
  419. .RE
  420. .PP
  421. .SS "\fBQwtPlotIntervalCurve::CurveStyle\fP QwtPlotIntervalCurve::style () const"
  422. .PP
  423. \fBReturns\fP
  424. .RS 4
  425. Style of the curve
  426. .RE
  427. .PP
  428. \fBSee also\fP
  429. .RS 4
  430. \fBsetStyle()\fP
  431. .RE
  432. .PP
  433. .SS "const \fBQwtIntervalSymbol\fP * QwtPlotIntervalCurve::symbol () const"
  434. .PP
  435. \fBReturns\fP
  436. .RS 4
  437. Current symbol or NULL, when no symbol has been assigned
  438. .RE
  439. .PP
  440. \fBSee also\fP
  441. .RS 4
  442. \fBsetSymbol()\fP
  443. .RE
  444. .PP
  445. .SS "bool QwtPlotIntervalCurve::testPaintAttribute (\fBPaintAttribute\fP attribute) const"
  446. .PP
  447. \fBReturns\fP
  448. .RS 4
  449. True, when attribute is enabled
  450. .RE
  451. .PP
  452. \fBSee also\fP
  453. .RS 4
  454. \fBPaintAttribute\fP, \fBsetPaintAttribute()\fP
  455. .RE
  456. .PP
  457. .SH "Author"
  458. .PP
  459. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.