class_qwt_series_data.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.20"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Qwt User&#39;s Guide: QwtSeriesData&lt; T &gt; Class Template Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="search/searchdata.js"></script>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  20. </head>
  21. <body>
  22. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  23. <div id="titlearea">
  24. <table cellspacing="0" cellpadding="0">
  25. <tbody>
  26. <tr style="height: 56px;">
  27. <td id="projectalign" style="padding-left: 0.5em;">
  28. <div id="projectname">Qwt User&#39;s Guide
  29. &#160;<span id="projectnumber">6.1.6</span>
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. <!-- end header part -->
  37. <!-- Generated by Doxygen 1.8.20 -->
  38. <script type="text/javascript">
  39. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  40. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  41. /* @license-end */
  42. </script>
  43. <script type="text/javascript" src="menudata.js"></script>
  44. <script type="text/javascript" src="menu.js"></script>
  45. <script type="text/javascript">
  46. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  47. $(function() {
  48. initMenu('',true,false,'search.php','Search');
  49. $(document).ready(function() { init_search(); });
  50. });
  51. /* @license-end */</script>
  52. <div id="main-nav"></div>
  53. </div><!-- top -->
  54. <div id="side-nav" class="ui-resizable side-nav-resizable">
  55. <div id="nav-tree">
  56. <div id="nav-tree-contents">
  57. <div id="nav-sync" class="sync"></div>
  58. </div>
  59. </div>
  60. <div id="splitbar" style="-moz-user-select:none;"
  61. class="ui-resizable-handle">
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  66. $(document).ready(function(){initNavTree('class_qwt_series_data.html',''); initResizable(); });
  67. /* @license-end */
  68. </script>
  69. <div id="doc-content">
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. </div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#pub-methods">Public Member Functions</a> &#124;
  85. <a href="#pro-attribs">Protected Attributes</a> &#124;
  86. <a href="class_qwt_series_data-members.html">List of all members</a> </div>
  87. <div class="headertitle">
  88. <div class="title">QwtSeriesData&lt; T &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <p>Abstract interface for iterating over samples.
  92. <a href="class_qwt_series_data.html#details">More...</a></p>
  93. <p><code>#include &lt;<a class="el" href="qwt__series__data_8h_source.html">qwt_series_data.h</a>&gt;</code></p>
  94. <div class="dynheader">
  95. Inheritance diagram for QwtSeriesData&lt; T &gt;:</div>
  96. <div class="dyncontent">
  97. <div class="center"><img src="class_qwt_series_data__inherit__graph.png" border="0" usemap="#a_qwt_series_data_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
  98. <map name="_qwt_series_data_3_01_t_01_4_inherit__map" id="a_qwt_series_data_3_01_t_01_4_inherit__map">
  99. <area shape="rect" title="Abstract interface for iterating over samples." alt="" coords="21,5,164,32"/>
  100. <area shape="rect" href="class_qwt_array_series_data.html" title="Template class for data, that is organized as QVector." alt="" coords="5,80,180,107"/>
  101. </map>
  102. <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
  103. <table class="memberdecls">
  104. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  105. Public Member Functions</h2></td></tr>
  106. <tr class="memitem:a3f075340d18fb112a342d74716eb8d9c"><td class="memItemLeft" align="right" valign="top"><a id="a3f075340d18fb112a342d74716eb8d9c"></a>
  107. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a3f075340d18fb112a342d74716eb8d9c">QwtSeriesData</a> ()</td></tr>
  108. <tr class="memdesc:a3f075340d18fb112a342d74716eb8d9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
  109. <tr class="separator:a3f075340d18fb112a342d74716eb8d9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a841a56f909879d599a385b9c3d046745"><td class="memItemLeft" align="right" valign="top"><a id="a841a56f909879d599a385b9c3d046745"></a>
  111. virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a841a56f909879d599a385b9c3d046745">~QwtSeriesData</a> ()</td></tr>
  112. <tr class="memdesc:a841a56f909879d599a385b9c3d046745"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
  113. <tr class="separator:a841a56f909879d599a385b9c3d046745"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:a3cfe5b26fc55a887ac85b0103ae80a3e"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a3cfe5b26fc55a887ac85b0103ae80a3e">size</a> () const =0</td></tr>
  115. <tr class="separator:a3cfe5b26fc55a887ac85b0103ae80a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:ae8650d16c07c58f01897ab48658a3266"><td class="memItemLeft" align="right" valign="top">virtual T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#ae8650d16c07c58f01897ab48658a3266">sample</a> (size_t i) const =0</td></tr>
  117. <tr class="separator:ae8650d16c07c58f01897ab48658a3266"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:aedb969ba51a27d88d26ad7f7cb1c2c7f"><td class="memItemLeft" align="right" valign="top">virtual QRectF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#aedb969ba51a27d88d26ad7f7cb1c2c7f">boundingRect</a> () const =0</td></tr>
  119. <tr class="separator:aedb969ba51a27d88d26ad7f7cb1c2c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a391b4601a7454b2f9582fbc2662d108e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a391b4601a7454b2f9582fbc2662d108e">setRectOfInterest</a> (const QRectF &amp;rect)</td></tr>
  121. <tr class="separator:a391b4601a7454b2f9582fbc2662d108e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. </table><table class="memberdecls">
  123. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  124. Protected Attributes</h2></td></tr>
  125. <tr class="memitem:a24fbbcb0baa0c728117d2e6764d00414"><td class="memItemLeft" align="right" valign="top"><a id="a24fbbcb0baa0c728117d2e6764d00414"></a>
  126. QRectF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_series_data.html#a24fbbcb0baa0c728117d2e6764d00414">d_boundingRect</a></td></tr>
  127. <tr class="memdesc:a24fbbcb0baa0c728117d2e6764d00414"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to cache a calculated bounding rectangle. <br /></td></tr>
  128. <tr class="separator:a24fbbcb0baa0c728117d2e6764d00414"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. </table>
  130. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  131. <div class="textblock"><h3>template&lt;typename T&gt;<br />
  132. class QwtSeriesData&lt; T &gt;</h3>
  133. <p>Abstract interface for iterating over samples. </p>
  134. <p>Qwt offers several implementations of the <a class="el" href="class_qwt_series_data.html" title="Abstract interface for iterating over samples.">QwtSeriesData</a> API, but in situations, where data of an application specific format needs to be displayed, without having to copy it, it is recommended to implement an individual data access.</p>
  135. <p>A subclass of <a class="el" href="class_qwt_series_data.html">QwtSeriesData&lt;QPointF&gt;</a> must implement:</p>
  136. <ul>
  137. <li><a class="el" href="class_qwt_series_data.html#a3cfe5b26fc55a887ac85b0103ae80a3e">size()</a><br />
  138. Should return number of data points.</li>
  139. <li><a class="el" href="class_qwt_series_data.html#ae8650d16c07c58f01897ab48658a3266">sample()</a><br />
  140. Should return values x and y values of the sample at specific position as QPointF object.</li>
  141. <li><a class="el" href="class_qwt_series_data.html#aedb969ba51a27d88d26ad7f7cb1c2c7f">boundingRect()</a><br />
  142. Should return the bounding rectangle of the data series. It is used for autoscaling and might help certain algorithms for displaying the data. You can use qwtBoundingRect() for an implementation but often it is possible to implement a more efficient algorithm depending on the characteristics of the series. The member d_boundingRect is intended for caching the calculated rectangle. </li>
  143. </ul>
  144. </div><h2 class="groupheader">Member Function Documentation</h2>
  145. <a id="aedb969ba51a27d88d26ad7f7cb1c2c7f"></a>
  146. <h2 class="memtitle"><span class="permalink"><a href="#aedb969ba51a27d88d26ad7f7cb1c2c7f">&#9670;&nbsp;</a></span>boundingRect()</h2>
  147. <div class="memitem">
  148. <div class="memproto">
  149. <div class="memtemplate">
  150. template&lt;typename T &gt; </div>
  151. <table class="mlabels">
  152. <tr>
  153. <td class="mlabels-left">
  154. <table class="memname">
  155. <tr>
  156. <td class="memname">virtual QRectF <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::boundingRect </td>
  157. <td>(</td>
  158. <td class="paramname"></td><td>)</td>
  159. <td> const</td>
  160. </tr>
  161. </table>
  162. </td>
  163. <td class="mlabels-right">
  164. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  165. </tr>
  166. </table>
  167. </div><div class="memdoc">
  168. <p>Calculate the bounding rect of all samples</p>
  169. <p>The bounding rect is necessary for autoscaling and can be used for a couple of painting optimizations.</p>
  170. <p>qwtBoundingRect(...) offers slow implementations iterating over the samples. For large sets it is recommended to implement something faster f.e. by caching the bounding rectangle.</p>
  171. <dl class="section return"><dt>Returns</dt><dd>Bounding rectangle </dd></dl>
  172. </div>
  173. </div>
  174. <a id="ae8650d16c07c58f01897ab48658a3266"></a>
  175. <h2 class="memtitle"><span class="permalink"><a href="#ae8650d16c07c58f01897ab48658a3266">&#9670;&nbsp;</a></span>sample()</h2>
  176. <div class="memitem">
  177. <div class="memproto">
  178. <div class="memtemplate">
  179. template&lt;typename T &gt; </div>
  180. <table class="mlabels">
  181. <tr>
  182. <td class="mlabels-left">
  183. <table class="memname">
  184. <tr>
  185. <td class="memname">virtual T <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::sample </td>
  186. <td>(</td>
  187. <td class="paramtype">size_t&#160;</td>
  188. <td class="paramname"><em>i</em></td><td>)</td>
  189. <td> const</td>
  190. </tr>
  191. </table>
  192. </td>
  193. <td class="mlabels-right">
  194. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  195. </tr>
  196. </table>
  197. </div><div class="memdoc">
  198. <p>Return a sample </p><dl class="params"><dt>Parameters</dt><dd>
  199. <table class="params">
  200. <tr><td class="paramname">i</td><td>Index </td></tr>
  201. </table>
  202. </dd>
  203. </dl>
  204. <dl class="section return"><dt>Returns</dt><dd>Sample at position i </dd></dl>
  205. <p>Implemented in <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; T &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtIntervalSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtOHLCSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QPointF &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtPoint3D &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#a370320fa49b8056656b61f4df79b778b">QwtArraySeriesData&lt; QwtSetSample &gt;</a>, <a class="el" href="class_qwt_synthetic_point_data.html#ac8be76b9c09c80fec51c978ad020aaec">QwtSyntheticPointData</a>, <a class="el" href="class_qwt_c_pointer_data.html#a7e6e149f5eadd13dd9ed5e1343f09527">QwtCPointerData</a>, and <a class="el" href="class_qwt_point_array_data.html#a10885ad1783151831a11f1cc659a98c5">QwtPointArrayData</a>.</p>
  206. </div>
  207. </div>
  208. <a id="a391b4601a7454b2f9582fbc2662d108e"></a>
  209. <h2 class="memtitle"><span class="permalink"><a href="#a391b4601a7454b2f9582fbc2662d108e">&#9670;&nbsp;</a></span>setRectOfInterest()</h2>
  210. <div class="memitem">
  211. <div class="memproto">
  212. <div class="memtemplate">
  213. template&lt;typename T &gt; </div>
  214. <table class="mlabels">
  215. <tr>
  216. <td class="mlabels-left">
  217. <table class="memname">
  218. <tr>
  219. <td class="memname">void <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::setRectOfInterest </td>
  220. <td>(</td>
  221. <td class="paramtype">const QRectF &amp;&#160;</td>
  222. <td class="paramname"><em>rect</em></td><td>)</td>
  223. <td></td>
  224. </tr>
  225. </table>
  226. </td>
  227. <td class="mlabels-right">
  228. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  229. </tr>
  230. </table>
  231. </div><div class="memdoc">
  232. <p>Set a the "rect of interest"</p>
  233. <p><a class="el" href="class_qwt_plot_series_item.html" title="Base class for plot items representing a series of samples.">QwtPlotSeriesItem</a> defines the current area of the plot canvas as "rectangle of interest" ( <a class="el" href="class_qwt_plot_series_item.html#a890792d0f44e341812b5283c249608b2" title="Update the item to changes of the axes scale division.">QwtPlotSeriesItem::updateScaleDiv()</a> ). It can be used to implement different levels of details.</p>
  234. <p>The default implementation does nothing.</p>
  235. <dl class="params"><dt>Parameters</dt><dd>
  236. <table class="params">
  237. <tr><td class="paramname">rect</td><td>Rectangle of interest </td></tr>
  238. </table>
  239. </dd>
  240. </dl>
  241. <p>Reimplemented in <a class="el" href="class_qwt_synthetic_point_data.html#a39cc8512e7d8beecde003f7781174b84">QwtSyntheticPointData</a>.</p>
  242. </div>
  243. </div>
  244. <a id="a3cfe5b26fc55a887ac85b0103ae80a3e"></a>
  245. <h2 class="memtitle"><span class="permalink"><a href="#a3cfe5b26fc55a887ac85b0103ae80a3e">&#9670;&nbsp;</a></span>size()</h2>
  246. <div class="memitem">
  247. <div class="memproto">
  248. <div class="memtemplate">
  249. template&lt;typename T &gt; </div>
  250. <table class="mlabels">
  251. <tr>
  252. <td class="mlabels-left">
  253. <table class="memname">
  254. <tr>
  255. <td class="memname">virtual size_t <a class="el" href="class_qwt_series_data.html">QwtSeriesData</a>&lt; T &gt;::size </td>
  256. <td>(</td>
  257. <td class="paramname"></td><td>)</td>
  258. <td> const</td>
  259. </tr>
  260. </table>
  261. </td>
  262. <td class="mlabels-right">
  263. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  264. </tr>
  265. </table>
  266. </div><div class="memdoc">
  267. <dl class="section return"><dt>Returns</dt><dd>Number of samples </dd></dl>
  268. <p>Implemented in <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; T &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtIntervalSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtOHLCSample &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QPointF &gt;</a>, <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtPoint3D &gt;</a>, and <a class="el" href="class_qwt_array_series_data.html#ab6cf4d74d9c429bd0479572659534cce">QwtArraySeriesData&lt; QwtSetSample &gt;</a>.</p>
  269. </div>
  270. </div>
  271. </div><!-- contents -->
  272. </div><!-- doc-content -->
  273. <!-- start footer part -->
  274. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  275. <ul>
  276. <li class="navelem"><a class="el" href="class_qwt_series_data.html">QwtSeriesData</a></li>
  277. <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  278. </ul>
  279. </div>
  280. </body>
  281. </html>