Ingen beskrivning

class_q_c_p_item_position.html 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  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: QCPItemPosition Class Reference</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. <!-- Generated by Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  43. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  44. <li><a href="files.html"><span>Files</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="Search" 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>Class&#160;List</span></a></li>
  66. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  67. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  68. <li><a href="functions.html"><span>Class&#160;Members</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-types">Public Types</a> &#124;
  87. <a href="#pub-methods">Public Member Functions</a> &#124;
  88. <a href="#pro-methods">Protected Member Functions</a> &#124;
  89. <a href="#pro-attribs">Protected Attributes</a> &#124;
  90. <a href="class_q_c_p_item_position-members.html">List of all members</a> </div>
  91. <div class="headertitle">
  92. <div class="title">QCPItemPosition Class Reference</div> </div>
  93. </div><!--header-->
  94. <div class="contents">
  95. <p>Manages the position of an item.
  96. <a href="class_q_c_p_item_position.html#details">More...</a></p>
  97. <div class="dynheader">
  98. Inheritance diagram for QCPItemPosition:</div>
  99. <div class="dyncontent">
  100. <div class="center">
  101. <img src="class_q_c_p_item_position.png" usemap="#QCPItemPosition_map" alt=""/>
  102. <map id="QCPItemPosition_map" name="QCPItemPosition_map">
  103. <area href="class_q_c_p_item_anchor.html" title="An anchor of an item to which positions can be attached to. " alt="QCPItemAnchor" shape="rect" coords="0,0,105,24"/>
  104. </map>
  105. </div></div>
  106. <table class="memberdecls">
  107. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  108. Public Types</h2></td></tr>
  109. <tr class="memitem:aad9936c22bf43e3d358552f6e86dbdc8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> { <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>,
  110. <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ac7d6aa89ceacb39658b0d6da061c789a">ptViewportRatio</a>,
  111. <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>,
  112. <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a>
  113. }</td></tr>
  114. <tr class="separator:aad9936c22bf43e3d358552f6e86dbdc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. </table><table class="memberdecls">
  116. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  117. Public Member Functions</h2></td></tr>
  118. <tr class="memitem:a3efc524f37fdcd22907545eb77555ce4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#a3efc524f37fdcd22907545eb77555ce4">QCPItemPosition</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)</td></tr>
  119. <tr class="separator:a3efc524f37fdcd22907545eb77555ce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:ad64a1a26fbed5b8917e0eb8843099fd6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad64a1a26fbed5b8917e0eb8843099fd6"></a>
  121. <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>type</b> () const </td></tr>
  122. <tr class="separator:ad64a1a26fbed5b8917e0eb8843099fd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a0db87cc41efabc1cf94acee7ebe14eee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0db87cc41efabc1cf94acee7ebe14eee"></a>
  124. <a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>parentAnchor</b> () const </td></tr>
  125. <tr class="separator:a0db87cc41efabc1cf94acee7ebe14eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:ac3cb2bddf5f89e5181830be30b93d090"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3cb2bddf5f89e5181830be30b93d090"></a>
  127. double&#160;</td><td class="memItemRight" valign="bottom"><b>key</b> () const </td></tr>
  128. <tr class="separator:ac3cb2bddf5f89e5181830be30b93d090"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:a6817f7356d3a2b63e8446c6b6106dae1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6817f7356d3a2b63e8446c6b6106dae1"></a>
  130. double&#160;</td><td class="memItemRight" valign="bottom"><b>value</b> () const </td></tr>
  131. <tr class="separator:a6817f7356d3a2b63e8446c6b6106dae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:a253d7adbb6d46299bd6cbc31aa8819f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a253d7adbb6d46299bd6cbc31aa8819f1"></a>
  133. QPointF&#160;</td><td class="memItemRight" valign="bottom"><b>coords</b> () const </td></tr>
  134. <tr class="separator:a253d7adbb6d46299bd6cbc31aa8819f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:ab99de7ae5766d246defb2de9f47eaf51"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab99de7ae5766d246defb2de9f47eaf51"></a>
  136. <a class="el" href="class_q_c_p_axis.html">QCPAxis</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>keyAxis</b> () const </td></tr>
  137. <tr class="separator:ab99de7ae5766d246defb2de9f47eaf51"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a8d3a039fb2e69df86b4015daa30dfd2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d3a039fb2e69df86b4015daa30dfd2d"></a>
  139. <a class="el" href="class_q_c_p_axis.html">QCPAxis</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>valueAxis</b> () const </td></tr>
  140. <tr class="separator:a8d3a039fb2e69df86b4015daa30dfd2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:a7f10fa702a324880cc4de958f434cec7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f10fa702a324880cc4de958f434cec7"></a>
  142. <a class="el" href="class_q_c_p_axis_rect.html">QCPAxisRect</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>axisRect</b> () const </td></tr>
  143. <tr class="separator:a7f10fa702a324880cc4de958f434cec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. <tr class="memitem:ae490f9c76ee2ba33752c495d3b6e8fb5"><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_position.html#ae490f9c76ee2ba33752c495d3b6e8fb5">pixelPoint</a> () const </td></tr>
  145. <tr class="separator:ae490f9c76ee2ba33752c495d3b6e8fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  146. <tr class="memitem:aa476abf71ed8fa4c537457ebb1a754ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> (<a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> type)</td></tr>
  147. <tr class="separator:aa476abf71ed8fa4c537457ebb1a754ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. <tr class="memitem:ac094d67a95d2dceafa0d50b9db3a7e51"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a> (<a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a> *parentAnchor, bool keepPixelPosition=false)</td></tr>
  149. <tr class="separator:ac094d67a95d2dceafa0d50b9db3a7e51"><td class="memSeparator" colspan="2">&#160;</td></tr>
  150. <tr class="memitem:aa988ba4e87ab684c9021017dcaba945f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> (double key, double value)</td></tr>
  151. <tr class="separator:aa988ba4e87ab684c9021017dcaba945f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  152. <tr class="memitem:acc70b3abc143287f806e5f154e5e07b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#acc70b3abc143287f806e5f154e5e07b0">setCoords</a> (const QPointF &amp;coords)</td></tr>
  153. <tr class="separator:acc70b3abc143287f806e5f154e5e07b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:a2185f45c75ac8cb9be89daeaaad50e37"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a> (<a class="el" href="class_q_c_p_axis.html">QCPAxis</a> *keyAxis, <a class="el" href="class_q_c_p_axis.html">QCPAxis</a> *valueAxis)</td></tr>
  155. <tr class="separator:a2185f45c75ac8cb9be89daeaaad50e37"><td class="memSeparator" colspan="2">&#160;</td></tr>
  156. <tr class="memitem:a0cd9b326fb324710169e92e8ca0041c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#a0cd9b326fb324710169e92e8ca0041c2">setAxisRect</a> (<a class="el" href="class_q_c_p_axis_rect.html">QCPAxisRect</a> *axisRect)</td></tr>
  157. <tr class="separator:a0cd9b326fb324710169e92e8ca0041c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  158. <tr class="memitem:ab404e56d9ac2ac2df0382c57933a71ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_item_position.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> (const QPointF &amp;<a class="el" href="class_q_c_p_item_position.html#ae490f9c76ee2ba33752c495d3b6e8fb5">pixelPoint</a>)</td></tr>
  159. <tr class="separator:ab404e56d9ac2ac2df0382c57933a71ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="inherit_header pub_methods_class_q_c_p_item_anchor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_q_c_p_item_anchor')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a></td></tr>
  161. <tr class="memitem:aeb6b681d2bf324db40a915d32ec5624f inherit pub_methods_class_q_c_p_item_anchor"><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>
  162. <tr class="separator:aeb6b681d2bf324db40a915d32ec5624f inherit pub_methods_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <tr class="memitem:ac93984042a58c875e76847dc3e5f75fe inherit pub_methods_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac93984042a58c875e76847dc3e5f75fe"></a>
  164. QString&#160;</td><td class="memItemRight" valign="bottom"><b>name</b> () const </td></tr>
  165. <tr class="separator:ac93984042a58c875e76847dc3e5f75fe inherit pub_methods_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. </table><table class="memberdecls">
  167. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  168. Protected Member Functions</h2></td></tr>
  169. <tr class="memitem:a577a7efc601df85a20b3e709d1ac320e"><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_position.html#a577a7efc601df85a20b3e709d1ac320e">toQCPItemPosition</a> ()</td></tr>
  170. <tr class="separator:a577a7efc601df85a20b3e709d1ac320e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  171. <tr class="inherit_header pro_methods_class_q_c_p_item_anchor"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_q_c_p_item_anchor')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a></td></tr>
  172. <tr class="memitem:ad11517e2ce5c2f9a798e78fb45e2e0d0 inherit pro_methods_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad11517e2ce5c2f9a798e78fb45e2e0d0"></a>
  173. 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>
  174. <tr class="separator:ad11517e2ce5c2f9a798e78fb45e2e0d0 inherit pro_methods_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  175. <tr class="memitem:ab65ec61984575f737f43c2bb59dd0d76 inherit pro_methods_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab65ec61984575f737f43c2bb59dd0d76"></a>
  176. 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>
  177. <tr class="separator:ab65ec61984575f737f43c2bb59dd0d76 inherit pro_methods_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  178. </table><table class="memberdecls">
  179. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  180. Protected Attributes</h2></td></tr>
  181. <tr class="memitem:ac9c7bbca809601323d3ae2542ef2801a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac9c7bbca809601323d3ae2542ef2801a"></a>
  182. <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>mPositionType</b></td></tr>
  183. <tr class="separator:ac9c7bbca809601323d3ae2542ef2801a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:a63967a33933231e92f68c8ce06bfc37e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63967a33933231e92f68c8ce06bfc37e"></a>
  185. QPointer&lt; <a class="el" href="class_q_c_p_axis.html">QCPAxis</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mKeyAxis</b></td></tr>
  186. <tr class="separator:a63967a33933231e92f68c8ce06bfc37e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  187. <tr class="memitem:a505dc2da24ba274452c1c817fcaba011"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a505dc2da24ba274452c1c817fcaba011"></a>
  188. QPointer&lt; <a class="el" href="class_q_c_p_axis.html">QCPAxis</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mValueAxis</b></td></tr>
  189. <tr class="separator:a505dc2da24ba274452c1c817fcaba011"><td class="memSeparator" colspan="2">&#160;</td></tr>
  190. <tr class="memitem:add40fcb8994c247d85f42a126286b740"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add40fcb8994c247d85f42a126286b740"></a>
  191. QPointer&lt; <a class="el" href="class_q_c_p_axis_rect.html">QCPAxisRect</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mAxisRect</b></td></tr>
  192. <tr class="separator:add40fcb8994c247d85f42a126286b740"><td class="memSeparator" colspan="2">&#160;</td></tr>
  193. <tr class="memitem:a4ff3931ad115603dfb4c7000b24bb415"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ff3931ad115603dfb4c7000b24bb415"></a>
  194. double&#160;</td><td class="memItemRight" valign="bottom"><b>mKey</b></td></tr>
  195. <tr class="separator:a4ff3931ad115603dfb4c7000b24bb415"><td class="memSeparator" colspan="2">&#160;</td></tr>
  196. <tr class="memitem:a67bf5df69f587d53731724a7d61c6c3f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67bf5df69f587d53731724a7d61c6c3f"></a>
  197. double&#160;</td><td class="memItemRight" valign="bottom"><b>mValue</b></td></tr>
  198. <tr class="separator:a67bf5df69f587d53731724a7d61c6c3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  199. <tr class="memitem:a21e37c5a8cabe747a2c60773b23eddeb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21e37c5a8cabe747a2c60773b23eddeb"></a>
  200. <a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mParentAnchor</b></td></tr>
  201. <tr class="separator:a21e37c5a8cabe747a2c60773b23eddeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  202. <tr class="inherit_header pro_attribs_class_q_c_p_item_anchor"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_q_c_p_item_anchor')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a></td></tr>
  203. <tr class="memitem:a23ad4d0ab0d2cbb41a7baf05bcf996ec inherit pro_attribs_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23ad4d0ab0d2cbb41a7baf05bcf996ec"></a>
  204. QString&#160;</td><td class="memItemRight" valign="bottom"><b>mName</b></td></tr>
  205. <tr class="separator:a23ad4d0ab0d2cbb41a7baf05bcf996ec inherit pro_attribs_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  206. <tr class="memitem:a59b968410831ba91a25cc75a77dde6f5 inherit pro_attribs_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59b968410831ba91a25cc75a77dde6f5"></a>
  207. <a class="el" href="class_q_custom_plot.html">QCustomPlot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>mParentPlot</b></td></tr>
  208. <tr class="separator:a59b968410831ba91a25cc75a77dde6f5 inherit pro_attribs_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  209. <tr class="memitem:a80fad480ad3bb980446ed6ebc00818ae inherit pro_attribs_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80fad480ad3bb980446ed6ebc00818ae"></a>
  210. <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>
  211. <tr class="separator:a80fad480ad3bb980446ed6ebc00818ae inherit pro_attribs_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  212. <tr class="memitem:a00c62070333e8345976b579676ad3997 inherit pro_attribs_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00c62070333e8345976b579676ad3997"></a>
  213. int&#160;</td><td class="memItemRight" valign="bottom"><b>mAnchorId</b></td></tr>
  214. <tr class="separator:a00c62070333e8345976b579676ad3997 inherit pro_attribs_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  215. <tr class="memitem:a5f0e67f395a63e2dd0e29ff1dcaf37b7 inherit pro_attribs_class_q_c_p_item_anchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f0e67f395a63e2dd0e29ff1dcaf37b7"></a>
  216. 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>
  217. <tr class="separator:a5f0e67f395a63e2dd0e29ff1dcaf37b7 inherit pro_attribs_class_q_c_p_item_anchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. </table>
  219. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  220. <div class="textblock"><p>Manages the position of an item. </p>
  221. <p>Every item has at least one public <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> member pointer which provides ways to position the item 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. Some items have multiple positions, for example <a class="el" href="class_q_c_p_item_rect.html" title="A rectangle. ">QCPItemRect</a> has two: <em>topLeft</em> and <em>bottomRight</em>.</p>
  222. <p><a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> has a type (<a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>) that can be set with <a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>. This type defines how coordinates passed to <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> are to be interpreted, e.g. as absolute pixel coordinates, as plot coordinates of certain axes, etc.</p>
  223. <p>Further, <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> may have a parent <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>, see <a class="el" href="class_q_c_p_item_position.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>. (Note that every <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> inherits 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> and thus can itself be used as parent anchor for other positions.) This way you can tie multiple items together. If the <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> has a parent, the coordinates set with <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> are considered to be absolute values in the reference frame of the parent anchor, where (0, 0) means directly ontop of the parent anchor. For example, You could attach the <em>start</em> position of a <a class="el" href="class_q_c_p_item_line.html" title="A line from one point to another. ">QCPItemLine</a> to the <em>bottom</em> anchor of a <a class="el" href="class_q_c_p_item_text.html" title="A text label. ">QCPItemText</a> to make the starting point of the line always be centered under the text label, no matter where the text is moved to, or is itself tied to.</p>
  224. <p>To set the apparent pixel position 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 directly, use <a class="el" href="class_q_c_p_item_position.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a>. This works no matter what type this <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> is or what parent-child situation it is in, as <a class="el" href="class_q_c_p_item_position.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> transforms the coordinates appropriately, to make the position appear at the specified pixel values. </p>
  225. </div><h2 class="groupheader">Member Enumeration Documentation</h2>
  226. <a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8"></a>
  227. <div class="memitem">
  228. <div class="memproto">
  229. <table class="memname">
  230. <tr>
  231. <td class="memname">enum <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a></td>
  232. </tr>
  233. </table>
  234. </div><div class="memdoc">
  235. <p>Defines the ways an item position can be specified. Thus it defines what the numbers passed to <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> actually mean.</p>
  236. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> </dd></dl>
  237. <table class="fieldtable">
  238. <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0"></a>ptAbsolute&#160;</td><td class="fielddoc">
  239. <p>Static positioning in pixels, starting from the top left corner of the viewport/widget. </p>
  240. </td></tr>
  241. <tr><td class="fieldname"><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8ac7d6aa89ceacb39658b0d6da061c789a"></a>ptViewportRatio&#160;</td><td class="fielddoc">
  242. <p>Static positioning given by a fraction of the viewport size. </p>
  243. </td></tr>
  244. <tr><td class="fieldname"><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75"></a>ptAxisRectRatio&#160;</td><td class="fielddoc">
  245. <p>Static positioning given by a fraction of the axis rect size (see <a class="el" href="class_q_c_p_item_position.html#a0cd9b326fb324710169e92e8ca0041c2">setAxisRect</a>). </p>
  246. </td></tr>
  247. <tr><td class="fieldname"><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c"></a>ptPlotCoords&#160;</td><td class="fielddoc">
  248. <p>Dynamic positioning at a plot coordinate defined by two axes (see <a class="el" href="class_q_c_p_item_position.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a>). </p>
  249. </td></tr>
  250. </table>
  251. </div>
  252. </div>
  253. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  254. <a class="anchor" id="a3efc524f37fdcd22907545eb77555ce4"></a>
  255. <div class="memitem">
  256. <div class="memproto">
  257. <table class="memname">
  258. <tr>
  259. <td class="memname">QCPItemPosition::QCPItemPosition </td>
  260. <td>(</td>
  261. <td class="paramtype"><a class="el" href="class_q_custom_plot.html">QCustomPlot</a> *&#160;</td>
  262. <td class="paramname"><em>parentPlot</em>, </td>
  263. </tr>
  264. <tr>
  265. <td class="paramkey"></td>
  266. <td></td>
  267. <td class="paramtype"><a class="el" href="class_q_c_p_abstract_item.html">QCPAbstractItem</a> *&#160;</td>
  268. <td class="paramname"><em>parentItem</em>, </td>
  269. </tr>
  270. <tr>
  271. <td class="paramkey"></td>
  272. <td></td>
  273. <td class="paramtype">const QString&#160;</td>
  274. <td class="paramname"><em>name</em>&#160;</td>
  275. </tr>
  276. <tr>
  277. <td></td>
  278. <td>)</td>
  279. <td></td><td></td>
  280. </tr>
  281. </table>
  282. </div><div class="memdoc">
  283. <p>Creates a new <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a>. You shouldn't create <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> instances directly, even if you want to make a new item subclass. Use QCPAbstractItem::createPosition 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>
  284. </div>
  285. </div>
  286. <h2 class="groupheader">Member Function Documentation</h2>
  287. <a class="anchor" id="ae490f9c76ee2ba33752c495d3b6e8fb5"></a>
  288. <div class="memitem">
  289. <div class="memproto">
  290. <table class="mlabels">
  291. <tr>
  292. <td class="mlabels-left">
  293. <table class="memname">
  294. <tr>
  295. <td class="memname">QPointF QCPItemPosition::pixelPoint </td>
  296. <td>(</td>
  297. <td class="paramname"></td><td>)</td>
  298. <td> const</td>
  299. </tr>
  300. </table>
  301. </td>
  302. <td class="mlabels-right">
  303. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  304. </tr>
  305. </table>
  306. </div><div class="memdoc">
  307. <p>Returns the final absolute pixel position of the <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</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. It includes all effects of type (<a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>) and possible parent anchors (<a class="el" href="class_q_c_p_item_position.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>).</p>
  308. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_q_c_p_item_position.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> </dd></dl>
  309. <p>Reimplemented from <a class="el" href="class_q_c_p_item_anchor.html#ae92def8f9297c5d73f5806c586517bb3">QCPItemAnchor</a>.</p>
  310. </div>
  311. </div>
  312. <a class="anchor" id="a2185f45c75ac8cb9be89daeaaad50e37"></a>
  313. <div class="memitem">
  314. <div class="memproto">
  315. <table class="memname">
  316. <tr>
  317. <td class="memname">void QCPItemPosition::setAxes </td>
  318. <td>(</td>
  319. <td class="paramtype"><a class="el" href="class_q_c_p_axis.html">QCPAxis</a> *&#160;</td>
  320. <td class="paramname"><em>keyAxis</em>, </td>
  321. </tr>
  322. <tr>
  323. <td class="paramkey"></td>
  324. <td></td>
  325. <td class="paramtype"><a class="el" href="class_q_c_p_axis.html">QCPAxis</a> *&#160;</td>
  326. <td class="paramname"><em>valueAxis</em>&#160;</td>
  327. </tr>
  328. <tr>
  329. <td></td>
  330. <td>)</td>
  331. <td></td><td></td>
  332. </tr>
  333. </table>
  334. </div><div class="memdoc">
  335. <p>When <a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> is <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a>, this function may be used to specify the axes the coordinates set with <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> relate to. By default they are set to the initial xAxis and yAxis of 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>. </p>
  336. </div>
  337. </div>
  338. <a class="anchor" id="a0cd9b326fb324710169e92e8ca0041c2"></a>
  339. <div class="memitem">
  340. <div class="memproto">
  341. <table class="memname">
  342. <tr>
  343. <td class="memname">void QCPItemPosition::setAxisRect </td>
  344. <td>(</td>
  345. <td class="paramtype"><a class="el" href="class_q_c_p_axis_rect.html">QCPAxisRect</a> *&#160;</td>
  346. <td class="paramname"><em>axisRect</em></td><td>)</td>
  347. <td></td>
  348. </tr>
  349. </table>
  350. </div><div class="memdoc">
  351. <p>When <a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> is <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>, this function may be used to specify the axis rect the coordinates set with <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> relate to. By default this is set to the main axis rect of 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>. </p>
  352. </div>
  353. </div>
  354. <a class="anchor" id="aa988ba4e87ab684c9021017dcaba945f"></a>
  355. <div class="memitem">
  356. <div class="memproto">
  357. <table class="memname">
  358. <tr>
  359. <td class="memname">void QCPItemPosition::setCoords </td>
  360. <td>(</td>
  361. <td class="paramtype">double&#160;</td>
  362. <td class="paramname"><em>key</em>, </td>
  363. </tr>
  364. <tr>
  365. <td class="paramkey"></td>
  366. <td></td>
  367. <td class="paramtype">double&#160;</td>
  368. <td class="paramname"><em>value</em>&#160;</td>
  369. </tr>
  370. <tr>
  371. <td></td>
  372. <td>)</td>
  373. <td></td><td></td>
  374. </tr>
  375. </table>
  376. </div><div class="memdoc">
  377. <p>Sets the coordinates of this <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a>. What the coordinates mean, is defined by the type (<a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>).</p>
  378. <p>For example, if the type is <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>, <em>key</em> and <em>value</em> mean the x and y pixel position 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. In that case the origin (0, 0) is in the top left corner of 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> viewport. If the type is <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a>, <em>key</em> and <em>value</em> mean a point in the plot coordinate system defined by the axes set by <a class="el" href="class_q_c_p_item_position.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a>. By default those are 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>'s xAxis and yAxis. See the documentation of <a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> for other available coordinate types and their meaning.</p>
  379. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_q_c_p_item_position.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> </dd></dl>
  380. </div>
  381. </div>
  382. <a class="anchor" id="acc70b3abc143287f806e5f154e5e07b0"></a>
  383. <div class="memitem">
  384. <div class="memproto">
  385. <table class="memname">
  386. <tr>
  387. <td class="memname">void QCPItemPosition::setCoords </td>
  388. <td>(</td>
  389. <td class="paramtype">const QPointF &amp;&#160;</td>
  390. <td class="paramname"><em>pos</em></td><td>)</td>
  391. <td></td>
  392. </tr>
  393. </table>
  394. </div><div class="memdoc">
  395. <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
  396. <p>Sets the coordinates as a QPointF <em>pos</em> where pos.x has the meaning of <em>key</em> and pos.y the meaning of <em>value</em> of the <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords(double key, double value)</a> method. </p>
  397. </div>
  398. </div>
  399. <a class="anchor" id="ac094d67a95d2dceafa0d50b9db3a7e51"></a>
  400. <div class="memitem">
  401. <div class="memproto">
  402. <table class="memname">
  403. <tr>
  404. <td class="memname">bool QCPItemPosition::setParentAnchor </td>
  405. <td>(</td>
  406. <td class="paramtype"><a class="el" href="class_q_c_p_item_anchor.html">QCPItemAnchor</a> *&#160;</td>
  407. <td class="paramname"><em>parentAnchor</em>, </td>
  408. </tr>
  409. <tr>
  410. <td class="paramkey"></td>
  411. <td></td>
  412. <td class="paramtype">bool&#160;</td>
  413. <td class="paramname"><em>keepPixelPosition</em> = <code>false</code>&#160;</td>
  414. </tr>
  415. <tr>
  416. <td></td>
  417. <td>)</td>
  418. <td></td><td></td>
  419. </tr>
  420. </table>
  421. </div><div class="memdoc">
  422. <p>Sets the parent of this <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> to <em>parentAnchor</em>. This means the position will now follow any position changes of the anchor. The local coordinate system of positions with a parent anchor always is absolute with (0, 0) being exactly on top of the parent anchor. (Hence the type shouldn't be <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a> for positions with parent anchors.)</p>
  423. <p>if <em>keepPixelPosition</em> is true, the current pixel position of the <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> is preserved during reparenting. If it's set to false, the coordinates are set to (0, 0), i.e. the position will be exactly on top of the parent anchor.</p>
  424. <p>To remove this <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> from any parent anchor, set <em>parentAnchor</em> to 0.</p>
  425. <p>If the <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> previously had no parent and the type is <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a>, the type is set to <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>, to keep the position in a valid state. </p>
  426. </div>
  427. </div>
  428. <a class="anchor" id="ab404e56d9ac2ac2df0382c57933a71ef"></a>
  429. <div class="memitem">
  430. <div class="memproto">
  431. <table class="memname">
  432. <tr>
  433. <td class="memname">void QCPItemPosition::setPixelPoint </td>
  434. <td>(</td>
  435. <td class="paramtype">const QPointF &amp;&#160;</td>
  436. <td class="paramname"><em>pixelPoint</em></td><td>)</td>
  437. <td></td>
  438. </tr>
  439. </table>
  440. </div><div class="memdoc">
  441. <p>Sets the apparent pixel position. This works no matter what type (<a class="el" href="class_q_c_p_item_position.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>) this <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> is or what parent-child situation it is in, as coordinates are transformed appropriately, to make the position finally appear at the specified pixel values.</p>
  442. <p>Only if the type is <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a> and no parent anchor is set, this function's effect is identical to that of <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>.</p>
  443. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_q_c_p_item_position.html#ae490f9c76ee2ba33752c495d3b6e8fb5">pixelPoint</a>, <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> </dd></dl>
  444. </div>
  445. </div>
  446. <a class="anchor" id="aa476abf71ed8fa4c537457ebb1a754ad"></a>
  447. <div class="memitem">
  448. <div class="memproto">
  449. <table class="memname">
  450. <tr>
  451. <td class="memname">void QCPItemPosition::setType </td>
  452. <td>(</td>
  453. <td class="paramtype"><a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a>&#160;</td>
  454. <td class="paramname"><em>type</em></td><td>)</td>
  455. <td></td>
  456. </tr>
  457. </table>
  458. </div><div class="memdoc">
  459. <p>Sets the type of the position. The type defines how the coordinates passed to <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> should be handled and how the <a class="el" href="class_q_c_p_item_position.html" title="Manages the position of an item. ">QCPItemPosition</a> should behave in the plot.</p>
  460. <p>The possible values for <em>type</em> can be separated in two main categories:</p>
  461. <ul>
  462. <li>The position is regarded as a point in plot coordinates. This corresponds to <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a> and requires two axes that define the plot coordinate system. They can be specified with <a class="el" href="class_q_c_p_item_position.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a>. By default, 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>'s x- and yAxis are used.</li>
  463. </ul>
  464. <ul>
  465. <li>The position is fixed 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, i.e. independent of axis ranges. This corresponds to all other types, i.e. <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>, <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ac7d6aa89ceacb39658b0d6da061c789a">ptViewportRatio</a> and <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>. They differ only in the way the absolute position is described, see the documentation of PositionType for details. For <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>, note that you can specify the axis rect with <a class="el" href="class_q_c_p_item_position.html#a0cd9b326fb324710169e92e8ca0041c2">setAxisRect</a>. By default this is set to the main axis rect.</li>
  466. </ul>
  467. <p>Note that the position type <a class="el" href="class_q_c_p_item_position.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a> is only available (and sensible) when the position has no parent anchor (<a class="el" href="class_q_c_p_item_position.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>).</p>
  468. <p>If the type is changed, the apparent pixel position on the plot is preserved. This means the coordinates as retrieved with coords() and set with <a class="el" href="class_q_c_p_item_position.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> may change in the process. </p>
  469. </div>
  470. </div>
  471. <a class="anchor" id="a577a7efc601df85a20b3e709d1ac320e"></a>
  472. <div class="memitem">
  473. <div class="memproto">
  474. <table class="mlabels">
  475. <tr>
  476. <td class="mlabels-left">
  477. <table class="memname">
  478. <tr>
  479. <td class="memname">virtual <a class="el" href="class_q_c_p_item_position.html">QCPItemPosition</a>* QCPItemPosition::toQCPItemPosition </td>
  480. <td>(</td>
  481. <td class="paramname"></td><td>)</td>
  482. <td></td>
  483. </tr>
  484. </table>
  485. </td>
  486. <td class="mlabels-right">
  487. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  488. </tr>
  489. </table>
  490. </div><div class="memdoc">
  491. <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>
  492. <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>
  493. <p>Reimplemented from <a class="el" href="class_q_c_p_item_anchor.html#ac54b20120669950255a63587193dbb86">QCPItemAnchor</a>.</p>
  494. </div>
  495. </div>
  496. <hr/>The documentation for this class was generated from the following files:<ul>
  497. <li><a class="el" href="qcustomplot_8h_source.html">qcustomplot.h</a></li>
  498. <li><a class="el" href="qcustomplot_8cpp.html">qcustomplot.cpp</a></li>
  499. </ul>
  500. </div><!-- contents -->
  501. <!-- start footer part -->
  502. <hr class="footer"/><address class="footer"><small>
  503. Generated on Tue Aug 11 2015 13:04:51 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  504. <img class="footer" src="doxygen.png" alt="doxygen"/>
  505. </a> 1.8.9.1
  506. </small></address>
  507. </body>
  508. </html>