Ingen beskrivning

class_q_c_p_item_anchor.html 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.9.1"/>
  7. <title>My Project: Referencia de la Clase QCPItemAnchor</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td style="padding-left: 0.5em;">
  26. <div id="projectname">My Project
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generado por Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Página&#160;principal</span></a></li>
  41. <li><a href="pages.html"><span>Páginas&#160;relacionadas</span></a></li>
  42. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  43. <li class="current"><a href="annotated.html"><span>Clases</span></a></li>
  44. <li><a href="files.html"><span>Archivos</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Buscar" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. <div id="navrow2" class="tabs2">
  64. <ul class="tablist">
  65. <li><a href="annotated.html"><span>Lista&#160;de&#160;clases</span></a></li>
  66. <li><a href="classes.html"><span>Índice&#160;de&#160;clases</span></a></li>
  67. <li><a href="hierarchy.html"><span>Jerarquía&#160;de&#160;la&#160;clase</span></a></li>
  68. <li><a href="functions.html"><span>Miembros&#160;de&#160;las&#160;clases</span></a></li>
  69. </ul>
  70. </div>
  71. <!-- window showing the filter options -->
  72. <div id="MSearchSelectWindow"
  73. onmouseover="return searchBox.OnSearchSelectShow()"
  74. onmouseout="return searchBox.OnSearchSelectHide()"
  75. onkeydown="return searchBox.OnSearchSelectKey(event)">
  76. </div>
  77. <!-- iframe showing the search results (closed by default) -->
  78. <div id="MSearchResultsWindow">
  79. <iframe src="javascript:void(0)" frameborder="0"
  80. name="MSearchResults" id="MSearchResults">
  81. </iframe>
  82. </div>
  83. </div><!-- top -->
  84. <div class="header">
  85. <div class="summary">
  86. <a href="#pub-methods">Métodos públicos</a> &#124;
  87. <a href="#pro-methods">Métodos protegidos</a> &#124;
  88. <a href="#pro-attribs">Atributos protegidos</a> &#124;
  89. <a href="#friends">Amigas</a> &#124;
  90. <a href="class_q_c_p_item_anchor-members.html">Lista de todos los miembros</a> </div>
  91. <div class="headertitle">
  92. <div class="title">Referencia de la Clase QCPItemAnchor</div> </div>
  93. </div><!--header-->
  94. <div class="contents">
  95. <p>An anchor of an item to which positions can be attached to.
  96. <a href="class_q_c_p_item_anchor.html#details">Más...</a></p>
  97. <div class="dynheader">
  98. Diagrama de herencias de QCPItemAnchor</div>
  99. <div class="dyncontent">
  100. <div class="center">
  101. <img src="class_q_c_p_item_anchor.png" usemap="#QCPItemAnchor_map" alt=""/>
  102. <map id="QCPItemAnchor_map" name="QCPItemAnchor_map">
  103. <area href="class_q_c_p_item_position.html" title="Manages the position of an item. " alt="QCPItemPosition" shape="rect" coords="0,56,105,80"/>
  104. </map>
  105. </div></div>
  106. <table class="memberdecls">
  107. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  108. Métodos públicos</h2></td></tr>
  109. <tr class="memitem:aeb6b681d2bf324db40a915d32ec5624f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_anchor.html#aeb6b681d2bf324db40a915d32ec5624f">QCPItemAnchor</a> (<a class="el" href="class_q_custom_plot.html">QCustomPlot</a> *parentPlot, <a class="el" href="class_q_c_p_abstract_item.html">QCPAbstractItem</a> *parentItem, const QString name, int anchorId=-1)</td></tr>
  110. <tr class="separator:aeb6b681d2bf324db40a915d32ec5624f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:ac93984042a58c875e76847dc3e5f75fe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac93984042a58c875e76847dc3e5f75fe"></a>
  112. QString&#160;</td><td class="memItemRight" valign="bottom"><b>name</b> () const </td></tr>
  113. <tr class="separator:ac93984042a58c875e76847dc3e5f75fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:ae92def8f9297c5d73f5806c586517bb3"><td class="memItemLeft" align="right" valign="top">virtual QPointF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_anchor.html#ae92def8f9297c5d73f5806c586517bb3">pixelPoint</a> () const </td></tr>
  115. <tr class="separator:ae92def8f9297c5d73f5806c586517bb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. </table><table class="memberdecls">
  117. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  118. Métodos protegidos</h2></td></tr>
  119. <tr class="memitem:ac54b20120669950255a63587193dbb86"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_q_c_p_item_position.html">QCPItemPosition</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_anchor.html#ac54b20120669950255a63587193dbb86">toQCPItemPosition</a> ()</td></tr>
  120. <tr class="separator:ac54b20120669950255a63587193dbb86"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:ad11517e2ce5c2f9a798e78fb45e2e0d0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad11517e2ce5c2f9a798e78fb45e2e0d0"></a>
  122. void&#160;</td><td class="memItemRight" valign="bottom"><b>addChild</b> (<a class="el" href="class_q_c_p_item_position.html">QCPItemPosition</a> *pos)</td></tr>
  123. <tr class="separator:ad11517e2ce5c2f9a798e78fb45e2e0d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:ab65ec61984575f737f43c2bb59dd0d76"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab65ec61984575f737f43c2bb59dd0d76"></a>
  125. void&#160;</td><td class="memItemRight" valign="bottom"><b>removeChild</b> (<a class="el" href="class_q_c_p_item_position.html">QCPItemPosition</a> *pos)</td></tr>
  126. <tr class="separator:ab65ec61984575f737f43c2bb59dd0d76"><td class="memSeparator" colspan="2">&#160;</td></tr>
  127. </table><table class="memberdecls">
  128. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  129. Atributos protegidos</h2></td></tr>
  130. <tr class="memitem:a23ad4d0ab0d2cbb41a7baf05bcf996ec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23ad4d0ab0d2cbb41a7baf05bcf996ec"></a>
  131. QString&#160;</td><td class="memItemRight" valign="bottom"><b>mName</b></td></tr>
  132. <tr class="separator:a23ad4d0ab0d2cbb41a7baf05bcf996ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
  133. <tr class="memitem:a59b968410831ba91a25cc75a77dde6f5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59b968410831ba91a25cc75a77dde6f5"></a>
  134. <a class="el" href="class_q_custom_plot.html">QCustomPlot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mParentPlot</b></td></tr>
  135. <tr class="separator:a59b968410831ba91a25cc75a77dde6f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:a80fad480ad3bb980446ed6ebc00818ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80fad480ad3bb980446ed6ebc00818ae"></a>
  137. <a class="el" href="class_q_c_p_abstract_item.html">QCPAbstractItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mParentItem</b></td></tr>
  138. <tr class="separator:a80fad480ad3bb980446ed6ebc00818ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
  139. <tr class="memitem:a00c62070333e8345976b579676ad3997"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00c62070333e8345976b579676ad3997"></a>
  140. int&#160;</td><td class="memItemRight" valign="bottom"><b>mAnchorId</b></td></tr>
  141. <tr class="separator:a00c62070333e8345976b579676ad3997"><td class="memSeparator" colspan="2">&#160;</td></tr>
  142. <tr class="memitem:a5f0e67f395a63e2dd0e29ff1dcaf37b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f0e67f395a63e2dd0e29ff1dcaf37b7"></a>
  143. QSet&lt; <a class="el" href="class_q_c_p_item_position.html">QCPItemPosition</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mChildren</b></td></tr>
  144. <tr class="separator:a5f0e67f395a63e2dd0e29ff1dcaf37b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. </table><table class="memberdecls">
  146. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
  147. Amigas</h2></td></tr>
  148. <tr class="memitem:aa9b8ddc062778e202a0be06a57d18d17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9b8ddc062778e202a0be06a57d18d17"></a>
  149. class&#160;</td><td class="memItemRight" valign="bottom"><b>QCPItemPosition</b></td></tr>
  150. <tr class="separator:aa9b8ddc062778e202a0be06a57d18d17"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. </table>
  152. <a name="details" id="details"></a><h2 class="groupheader">Descripción detallada</h2>
  153. <div class="textblock"><p>An anchor of an item to which positions can be attached to. </p>
  154. <p>An item (<a class="el" href="class_q_c_p_abstract_item.html" title="The abstract base class for all items in a plot. ">QCPAbstractItem</a>) may have one or more anchors. Unlike <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a>, an anchor doesn't control anything on its item, but provides a way to tie other items via their positions to the anchor.</p>
  155. <p>For example, a <a class="el" href="class_q_c_p_item_rect.html" title="A rectangle. ">QCPItemRect</a> is defined by its positions <em>topLeft</em> and <em>bottomRight</em>. Additionally it has various anchors like <em>top</em>, <em>topRight</em> or <em>bottomLeft</em> etc. So you can attach the <em>start</em> (which is a <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a>) of a <a class="el" href="class_q_c_p_item_line.html" title="A line from one point to another. ">QCPItemLine</a> to one of the anchors by calling <a class="el" href="class_q_c_p_item_position.html#ac094d67a95d2dceafa0d50b9db3a7e51">QCPItemPosition::setParentAnchor</a> on <em>start</em>, passing the wanted anchor of the <a class="el" href="class_q_c_p_item_rect.html" title="A rectangle. ">QCPItemRect</a>. This way the start of the line will now always follow the respective anchor location on the rect item.</p>
  156. <p>Note that <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> derives from <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>, so every position can also serve as an anchor to other positions.</p>
  157. <p>To learn how to provide anchors in your own item subclasses, see the subclassing section of the <a class="el" href="class_q_c_p_abstract_item.html" title="The abstract base class for all items in a plot. ">QCPAbstractItem</a> documentation. </p>
  158. </div><h2 class="groupheader">Documentación del constructor y destructor</h2>
  159. <a class="anchor" id="aeb6b681d2bf324db40a915d32ec5624f"></a>
  160. <div class="memitem">
  161. <div class="memproto">
  162. <table class="memname">
  163. <tr>
  164. <td class="memname">QCPItemAnchor::QCPItemAnchor </td>
  165. <td>(</td>
  166. <td class="paramtype"><a class="el" href="class_q_custom_plot.html">QCustomPlot</a> *&#160;</td>
  167. <td class="paramname"><em>parentPlot</em>, </td>
  168. </tr>
  169. <tr>
  170. <td class="paramkey"></td>
  171. <td></td>
  172. <td class="paramtype"><a class="el" href="class_q_c_p_abstract_item.html">QCPAbstractItem</a> *&#160;</td>
  173. <td class="paramname"><em>parentItem</em>, </td>
  174. </tr>
  175. <tr>
  176. <td class="paramkey"></td>
  177. <td></td>
  178. <td class="paramtype">const QString&#160;</td>
  179. <td class="paramname"><em>name</em>, </td>
  180. </tr>
  181. <tr>
  182. <td class="paramkey"></td>
  183. <td></td>
  184. <td class="paramtype">int&#160;</td>
  185. <td class="paramname"><em>anchorId</em> = <code>-1</code>&#160;</td>
  186. </tr>
  187. <tr>
  188. <td></td>
  189. <td>)</td>
  190. <td></td><td></td>
  191. </tr>
  192. </table>
  193. </div><div class="memdoc">
  194. <p>Creates a new <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>. You shouldn't create <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a> instances directly, even if you want to make a new item subclass. Use QCPAbstractItem::createAnchor instead, as explained in the subclassing section of the <a class="el" href="class_q_c_p_abstract_item.html" title="The abstract base class for all items in a plot. ">QCPAbstractItem</a> documentation. </p>
  195. </div>
  196. </div>
  197. <h2 class="groupheader">Documentación de las funciones miembro</h2>
  198. <a class="anchor" id="ae92def8f9297c5d73f5806c586517bb3"></a>
  199. <div class="memitem">
  200. <div class="memproto">
  201. <table class="mlabels">
  202. <tr>
  203. <td class="mlabels-left">
  204. <table class="memname">
  205. <tr>
  206. <td class="memname">QPointF QCPItemAnchor::pixelPoint </td>
  207. <td>(</td>
  208. <td class="paramname"></td><td>)</td>
  209. <td> const</td>
  210. </tr>
  211. </table>
  212. </td>
  213. <td class="mlabels-right">
  214. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  215. </tr>
  216. </table>
  217. </div><div class="memdoc">
  218. <p>Returns the final absolute pixel position of the <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a> on the <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> surface.</p>
  219. <p>The pixel information is internally retrieved via QCPAbstractItem::anchorPixelPosition of the parent item, <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a> is just an intermediary. </p>
  220. <p>Reimplementado en <a class="el" href="class_q_c_p_item_position.html#ae490f9c76ee2ba33752c495d3b6e8fb5">QCPItemPosition</a>.</p>
  221. </div>
  222. </div>
  223. <a class="anchor" id="ac54b20120669950255a63587193dbb86"></a>
  224. <div class="memitem">
  225. <div class="memproto">
  226. <table class="mlabels">
  227. <tr>
  228. <td class="mlabels-left">
  229. <table class="memname">
  230. <tr>
  231. <td class="memname"><a class="el" href="class_q_c_p_item_position.html">QCPItemPosition</a> * QCPItemAnchor::toQCPItemPosition </td>
  232. <td>(</td>
  233. <td class="paramname"></td><td>)</td>
  234. <td></td>
  235. </tr>
  236. </table>
  237. </td>
  238. <td class="mlabels-right">
  239. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  240. </tr>
  241. </table>
  242. </div><div class="memdoc">
  243. <p>Returns 0 if this instance is merely a <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>, and a valid pointer of type QCPItemPosition* if it actually is a <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> (which is a subclass of <a class="el" href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>).</p>
  244. <p>This safe downcast functionality could also be achieved with a dynamic_cast. However, <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> avoids dynamic_cast to work with projects that don't have RTTI support enabled (e.g. -fno-rtti flag with gcc compiler). </p>
  245. <p>Reimplementado en <a class="el" href="class_q_c_p_item_position.html#a577a7efc601df85a20b3e709d1ac320e">QCPItemPosition</a>.</p>
  246. </div>
  247. </div>
  248. <hr/>La documentación para esta clase fue generada a partir de los siguientes ficheros:<ul>
  249. <li><a class="el" href="qcustomplot_8h_source.html">qcustomplot.h</a></li>
  250. <li><a class="el" href="qcustomplot_8cpp.html">qcustomplot.cpp</a></li>
  251. </ul>
  252. </div><!-- contents -->
  253. <!-- start footer part -->
  254. <hr class="footer"/><address class="footer"><small>
  255. Generado el Martes, 11 de Agosto de 2015 13:05:00 para My Project por &#160;<a href="http://www.doxygen.org/index.html">
  256. <img class="footer" src="doxygen.png" alt="doxygen"/>
  257. </a> 1.8.9.1
  258. </small></address>
  259. </body>
  260. </html>