class_qwt_abstract_legend.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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: QwtAbstractLegend Class 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_abstract_legend.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-slots">Public Slots</a> &#124;
  85. <a href="#pub-methods">Public Member Functions</a> &#124;
  86. <a href="class_qwt_abstract_legend-members.html">List of all members</a> </div>
  87. <div class="headertitle">
  88. <div class="title">QwtAbstractLegend Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <p>Abstract base class for legend widgets.
  92. <a href="class_qwt_abstract_legend.html#details">More...</a></p>
  93. <p><code>#include &lt;<a class="el" href="qwt__abstract__legend_8h_source.html">qwt_abstract_legend.h</a>&gt;</code></p>
  94. <div class="dynheader">
  95. Inheritance diagram for QwtAbstractLegend:</div>
  96. <div class="dyncontent">
  97. <div class="center"><img src="class_qwt_abstract_legend__inherit__graph.png" border="0" usemap="#a_qwt_abstract_legend_inherit__map" alt="Inheritance graph"/></div>
  98. <map name="_qwt_abstract_legend_inherit__map" id="a_qwt_abstract_legend_inherit__map">
  99. <area shape="rect" title="Abstract base class for legend widgets." alt="" coords="5,80,143,107"/>
  100. <area shape="rect" href="class_qwt_legend.html" title="The legend widget." alt="" coords="30,155,118,181"/>
  101. <area shape="rect" title=" " alt="" coords="39,5,109,32"/>
  102. </map>
  103. <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
  104. <table class="memberdecls">
  105. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
  106. Public Slots</h2></td></tr>
  107. <tr class="memitem:aa9fc80c9e1dcbcfef51b96a3bff268ca"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#aa9fc80c9e1dcbcfef51b96a3bff268ca">updateLegend</a> (const QVariant &amp;itemInfo, const QList&lt; <a class="el" href="class_qwt_legend_data.html">QwtLegendData</a> &gt; &amp;data)=0</td></tr>
  108. <tr class="memdesc:aa9fc80c9e1dcbcfef51b96a3bff268ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the entries for a plot item. <a href="class_qwt_abstract_legend.html#aa9fc80c9e1dcbcfef51b96a3bff268ca">More...</a><br /></td></tr>
  109. <tr class="separator:aa9fc80c9e1dcbcfef51b96a3bff268ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. </table><table class="memberdecls">
  111. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  112. Public Member Functions</h2></td></tr>
  113. <tr class="memitem:a77092d06decd579fcde5c90875c3830b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a77092d06decd579fcde5c90875c3830b">QwtAbstractLegend</a> (QWidget *parent=NULL)</td></tr>
  114. <tr class="separator:a77092d06decd579fcde5c90875c3830b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:a6d86d9c50679dea9fefafc457fc70814"><td class="memItemLeft" align="right" valign="top"><a id="a6d86d9c50679dea9fefafc457fc70814"></a>
  116. virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a6d86d9c50679dea9fefafc457fc70814">~QwtAbstractLegend</a> ()</td></tr>
  117. <tr class="memdesc:a6d86d9c50679dea9fefafc457fc70814"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
  118. <tr class="separator:a6d86d9c50679dea9fefafc457fc70814"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a2fe1ac5ac1448e4d86b7437505214d9c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a2fe1ac5ac1448e4d86b7437505214d9c">renderLegend</a> (QPainter *painter, const QRectF &amp;rect, bool fillBackground) const =0</td></tr>
  120. <tr class="separator:a2fe1ac5ac1448e4d86b7437505214d9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:a9904720ba92daf03d0e5d8559cc5cdfe"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a9904720ba92daf03d0e5d8559cc5cdfe">isEmpty</a> () const =0</td></tr>
  122. <tr class="separator:a9904720ba92daf03d0e5d8559cc5cdfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a619f3705f6f9be8c1f38df68d83a37ff"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_abstract_legend.html#a619f3705f6f9be8c1f38df68d83a37ff">scrollExtent</a> (Qt::Orientation) const</td></tr>
  124. <tr class="separator:a619f3705f6f9be8c1f38df68d83a37ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. </table>
  126. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  127. <div class="textblock"><p>Abstract base class for legend widgets. </p>
  128. <p>Legends, that need to be under control of the <a class="el" href="class_qwt_plot.html" title="A 2-D plotting widget.">QwtPlot</a> layout system need to be derived from <a class="el" href="class_qwt_abstract_legend.html" title="Abstract base class for legend widgets.">QwtAbstractLegend</a>.</p>
  129. <dl class="section note"><dt>Note</dt><dd>Other type of legends can be implemented by connecting to the <a class="el" href="class_qwt_plot.html#acf7bcea83713f73e5914325c50a1c22b">QwtPlot::legendDataChanged()</a> signal. But as these legends are unknown to the plot layout system the layout code ( on screen and for <a class="el" href="class_qwt_plot_renderer.html" title="Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainte...">QwtPlotRenderer</a> ) need to be organized in application code.</dd></dl>
  130. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_legend.html" title="The legend widget.">QwtLegend</a> </dd></dl>
  131. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  132. <a id="a77092d06decd579fcde5c90875c3830b"></a>
  133. <h2 class="memtitle"><span class="permalink"><a href="#a77092d06decd579fcde5c90875c3830b">&#9670;&nbsp;</a></span>QwtAbstractLegend()</h2>
  134. <div class="memitem">
  135. <div class="memproto">
  136. <table class="mlabels">
  137. <tr>
  138. <td class="mlabels-left">
  139. <table class="memname">
  140. <tr>
  141. <td class="memname">QwtAbstractLegend::QwtAbstractLegend </td>
  142. <td>(</td>
  143. <td class="paramtype">QWidget *&#160;</td>
  144. <td class="paramname"><em>parent</em> = <code>NULL</code></td><td>)</td>
  145. <td></td>
  146. </tr>
  147. </table>
  148. </td>
  149. <td class="mlabels-right">
  150. <span class="mlabels"><span class="mlabel">explicit</span></span> </td>
  151. </tr>
  152. </table>
  153. </div><div class="memdoc">
  154. <p>Constructor</p>
  155. <dl class="params"><dt>Parameters</dt><dd>
  156. <table class="params">
  157. <tr><td class="paramname">parent</td><td>Parent widget </td></tr>
  158. </table>
  159. </dd>
  160. </dl>
  161. </div>
  162. </div>
  163. <h2 class="groupheader">Member Function Documentation</h2>
  164. <a id="a9904720ba92daf03d0e5d8559cc5cdfe"></a>
  165. <h2 class="memtitle"><span class="permalink"><a href="#a9904720ba92daf03d0e5d8559cc5cdfe">&#9670;&nbsp;</a></span>isEmpty()</h2>
  166. <div class="memitem">
  167. <div class="memproto">
  168. <table class="mlabels">
  169. <tr>
  170. <td class="mlabels-left">
  171. <table class="memname">
  172. <tr>
  173. <td class="memname">virtual bool QwtAbstractLegend::isEmpty </td>
  174. <td>(</td>
  175. <td class="paramname"></td><td>)</td>
  176. <td> const</td>
  177. </tr>
  178. </table>
  179. </td>
  180. <td class="mlabels-right">
  181. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  182. </tr>
  183. </table>
  184. </div><div class="memdoc">
  185. <dl class="section return"><dt>Returns</dt><dd>True, when no plot item is inserted </dd></dl>
  186. <p>Implemented in <a class="el" href="class_qwt_legend.html#aced18eb9dc01af9f89da7e52491a9ee1">QwtLegend</a>.</p>
  187. </div>
  188. </div>
  189. <a id="a2fe1ac5ac1448e4d86b7437505214d9c"></a>
  190. <h2 class="memtitle"><span class="permalink"><a href="#a2fe1ac5ac1448e4d86b7437505214d9c">&#9670;&nbsp;</a></span>renderLegend()</h2>
  191. <div class="memitem">
  192. <div class="memproto">
  193. <table class="mlabels">
  194. <tr>
  195. <td class="mlabels-left">
  196. <table class="memname">
  197. <tr>
  198. <td class="memname">virtual void QwtAbstractLegend::renderLegend </td>
  199. <td>(</td>
  200. <td class="paramtype">QPainter *&#160;</td>
  201. <td class="paramname"><em>painter</em>, </td>
  202. </tr>
  203. <tr>
  204. <td class="paramkey"></td>
  205. <td></td>
  206. <td class="paramtype">const QRectF &amp;&#160;</td>
  207. <td class="paramname"><em>rect</em>, </td>
  208. </tr>
  209. <tr>
  210. <td class="paramkey"></td>
  211. <td></td>
  212. <td class="paramtype">bool&#160;</td>
  213. <td class="paramname"><em>fillBackground</em>&#160;</td>
  214. </tr>
  215. <tr>
  216. <td></td>
  217. <td>)</td>
  218. <td></td><td> const</td>
  219. </tr>
  220. </table>
  221. </td>
  222. <td class="mlabels-right">
  223. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. <p>Render the legend into a given rectangle.</p>
  228. <dl class="params"><dt>Parameters</dt><dd>
  229. <table class="params">
  230. <tr><td class="paramname">painter</td><td>Painter </td></tr>
  231. <tr><td class="paramname">rect</td><td>Bounding rectangle </td></tr>
  232. <tr><td class="paramname">fillBackground</td><td>When true, fill rect with the widget background</td></tr>
  233. </table>
  234. </dd>
  235. </dl>
  236. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_abstract_legend.html#a2fe1ac5ac1448e4d86b7437505214d9c">renderLegend()</a> is used by <a class="el" href="class_qwt_plot_renderer.html" title="Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainte...">QwtPlotRenderer</a> </dd></dl>
  237. <p>Implemented in <a class="el" href="class_qwt_legend.html#a41c46ddb5b69ec23b76d3016a908535d">QwtLegend</a>.</p>
  238. </div>
  239. </div>
  240. <a id="a619f3705f6f9be8c1f38df68d83a37ff"></a>
  241. <h2 class="memtitle"><span class="permalink"><a href="#a619f3705f6f9be8c1f38df68d83a37ff">&#9670;&nbsp;</a></span>scrollExtent()</h2>
  242. <div class="memitem">
  243. <div class="memproto">
  244. <table class="mlabels">
  245. <tr>
  246. <td class="mlabels-left">
  247. <table class="memname">
  248. <tr>
  249. <td class="memname">int QwtAbstractLegend::scrollExtent </td>
  250. <td>(</td>
  251. <td class="paramtype">Qt::Orientation&#160;</td>
  252. <td class="paramname"><em>orientation</em></td><td>)</td>
  253. <td> const</td>
  254. </tr>
  255. </table>
  256. </td>
  257. <td class="mlabels-right">
  258. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  259. </tr>
  260. </table>
  261. </div><div class="memdoc">
  262. <p>Return the extent, that is needed for elements to scroll the legend ( usually scrollbars ),</p>
  263. <dl class="params"><dt>Parameters</dt><dd>
  264. <table class="params">
  265. <tr><td class="paramname">orientation</td><td>Orientation </td></tr>
  266. </table>
  267. </dd>
  268. </dl>
  269. <dl class="section return"><dt>Returns</dt><dd>Extent of the corresponding scroll element </dd></dl>
  270. <p>Reimplemented in <a class="el" href="class_qwt_legend.html#af6479d6dd8ac45142ce0da5d8be29a2a">QwtLegend</a>.</p>
  271. </div>
  272. </div>
  273. <a id="aa9fc80c9e1dcbcfef51b96a3bff268ca"></a>
  274. <h2 class="memtitle"><span class="permalink"><a href="#aa9fc80c9e1dcbcfef51b96a3bff268ca">&#9670;&nbsp;</a></span>updateLegend</h2>
  275. <div class="memitem">
  276. <div class="memproto">
  277. <table class="mlabels">
  278. <tr>
  279. <td class="mlabels-left">
  280. <table class="memname">
  281. <tr>
  282. <td class="memname">virtual void QwtAbstractLegend::updateLegend </td>
  283. <td>(</td>
  284. <td class="paramtype">const QVariant &amp;&#160;</td>
  285. <td class="paramname"><em>itemInfo</em>, </td>
  286. </tr>
  287. <tr>
  288. <td class="paramkey"></td>
  289. <td></td>
  290. <td class="paramtype">const QList&lt; <a class="el" href="class_qwt_legend_data.html">QwtLegendData</a> &gt; &amp;&#160;</td>
  291. <td class="paramname"><em>data</em>&#160;</td>
  292. </tr>
  293. <tr>
  294. <td></td>
  295. <td>)</td>
  296. <td></td><td></td>
  297. </tr>
  298. </table>
  299. </td>
  300. <td class="mlabels-right">
  301. <span class="mlabels"><span class="mlabel">pure virtual</span><span class="mlabel">slot</span></span> </td>
  302. </tr>
  303. </table>
  304. </div><div class="memdoc">
  305. <p>Update the entries for a plot item. </p>
  306. <dl class="params"><dt>Parameters</dt><dd>
  307. <table class="params">
  308. <tr><td class="paramname">itemInfo</td><td>Info about an item </td></tr>
  309. <tr><td class="paramname">data</td><td>List of legend entry attributes for the item </td></tr>
  310. </table>
  311. </dd>
  312. </dl>
  313. </div>
  314. </div>
  315. </div><!-- contents -->
  316. </div><!-- doc-content -->
  317. <!-- start footer part -->
  318. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  319. <ul>
  320. <li class="navelem"><a class="el" href="class_qwt_abstract_legend.html">QwtAbstractLegend</a></li>
  321. <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>
  322. </ul>
  323. </div>
  324. </body>
  325. </html>