classQCPItemPosition.html 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  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 name="author" content="Emanuel Eichhammer" />
  6. <meta name="copyright" content="(C) 2013-2015 Emanuel Eichhammer" />
  7. <title>QCPItemPosition Class Reference</title>
  8. <link href="qt.css" rel="stylesheet" type="text/css"/>
  9. </head>
  10. <body>
  11. <div id="top">
  12. <a class="headerLink" href="index.html">Main Page</a> &middot;
  13. <a class="headerLink" href="classoverview.html">Class Overview</a> &middot;
  14. <a class="headerLink" href="hierarchy.html">Hierarchy</a> &middot;
  15. <a class="headerLink" href="annotated.html">All Classes</a> &middot;
  16. <a class="headerLink" href="pages.html">Special Pages</a>
  17. <!-- Generated by Doxygen 1.8.6 -->
  18. </div><!-- top -->
  19. <div class="header">
  20. <div class="summary">
  21. <a href="#pub-types">Public Types</a> &#124;
  22. <a href="#pub-methods">Public Functions</a> &#124;
  23. <a href="#pro-methods">Protected Functions</a> </div>
  24. <div class="headertitle">
  25. <div class="title">QCPItemPosition Class Reference</div> </div>
  26. </div><!--header-->
  27. <div class="contents">
  28. <p>Manages the position of an item.
  29. <a href="classQCPItemPosition.html#details">More...</a></p>
  30. <div class="dynheader">
  31. Inheritance diagram for QCPItemPosition:</div>
  32. <div class="dyncontent">
  33. <div class="center"><img src="classQCPItemPosition__inherit__graph.png" border="0" usemap="#QCPItemPosition_inherit__map" alt="Inheritance graph"/></div>
  34. <map name="QCPItemPosition_inherit__map" id="QCPItemPosition_inherit__map">
  35. <area shape="rect" id="node2" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. " alt="" coords="7,5,117,29"/></map>
  36. </div>
  37. <table class="memberdecls">
  38. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  39. Public Types</h2></td></tr>
  40. <tr class="memitem:aad9936c22bf43e3d358552f6e86dbdc8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> </td></tr>
  41. <tr class="separator:aad9936c22bf43e3d358552f6e86dbdc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  42. </table><table class="memberdecls">
  43. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  44. Public Functions</h2></td></tr>
  45. <tr class="memitem:a3efc524f37fdcd22907545eb77555ce4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#a3efc524f37fdcd22907545eb77555ce4">QCPItemPosition</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot, <a class="el" href="classQCPAbstractItem.html">QCPAbstractItem</a> *parentItem, const QString name)</td></tr>
  46. <tr class="separator:a3efc524f37fdcd22907545eb77555ce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  47. <tr class="memitem:aecb709d72c9aa334a7f62e2c9e0b5d60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#aecb709d72c9aa334a7f62e2c9e0b5d60">type</a> () const </td></tr>
  48. <tr class="separator:aecb709d72c9aa334a7f62e2c9e0b5d60"><td class="memSeparator" colspan="2">&#160;</td></tr>
  49. <tr class="memitem:a3cb68cf9c95be05c66a0f47448e328e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3cb68cf9c95be05c66a0f47448e328e5"></a>
  50. <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>typeX</b> () const </td></tr>
  51. <tr class="separator:a3cb68cf9c95be05c66a0f47448e328e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  52. <tr class="memitem:a8a2fec9dec1ce006a598b32685fd7ab3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a2fec9dec1ce006a598b32685fd7ab3"></a>
  53. <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>typeY</b> () const </td></tr>
  54. <tr class="separator:a8a2fec9dec1ce006a598b32685fd7ab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  55. <tr class="memitem:a7b4ffab9946945c0e11cd2352dc2e042"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#a7b4ffab9946945c0e11cd2352dc2e042">parentAnchor</a> () const </td></tr>
  56. <tr class="separator:a7b4ffab9946945c0e11cd2352dc2e042"><td class="memSeparator" colspan="2">&#160;</td></tr>
  57. <tr class="memitem:a485abba71c8552086c5f68e95dca7f9a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a485abba71c8552086c5f68e95dca7f9a"></a>
  58. <a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>parentAnchorX</b> () const </td></tr>
  59. <tr class="separator:a485abba71c8552086c5f68e95dca7f9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  60. <tr class="memitem:a1502dba801cb20424b7e097399e372de"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1502dba801cb20424b7e097399e372de"></a>
  61. <a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>parentAnchorY</b> () const </td></tr>
  62. <tr class="separator:a1502dba801cb20424b7e097399e372de"><td class="memSeparator" colspan="2">&#160;</td></tr>
  63. <tr class="memitem:ac3cb2bddf5f89e5181830be30b93d090"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3cb2bddf5f89e5181830be30b93d090"></a>
  64. double&#160;</td><td class="memItemRight" valign="bottom"><b>key</b> () const </td></tr>
  65. <tr class="separator:ac3cb2bddf5f89e5181830be30b93d090"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:a6817f7356d3a2b63e8446c6b6106dae1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6817f7356d3a2b63e8446c6b6106dae1"></a>
  67. double&#160;</td><td class="memItemRight" valign="bottom"><b>value</b> () const </td></tr>
  68. <tr class="separator:a6817f7356d3a2b63e8446c6b6106dae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  69. <tr class="memitem:a253d7adbb6d46299bd6cbc31aa8819f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a253d7adbb6d46299bd6cbc31aa8819f1"></a>
  70. QPointF&#160;</td><td class="memItemRight" valign="bottom"><b>coords</b> () const </td></tr>
  71. <tr class="separator:a253d7adbb6d46299bd6cbc31aa8819f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  72. <tr class="memitem:ab99de7ae5766d246defb2de9f47eaf51"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab99de7ae5766d246defb2de9f47eaf51"></a>
  73. <a class="el" href="classQCPAxis.html">QCPAxis</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>keyAxis</b> () const </td></tr>
  74. <tr class="separator:ab99de7ae5766d246defb2de9f47eaf51"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:a8d3a039fb2e69df86b4015daa30dfd2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d3a039fb2e69df86b4015daa30dfd2d"></a>
  76. <a class="el" href="classQCPAxis.html">QCPAxis</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>valueAxis</b> () const </td></tr>
  77. <tr class="separator:a8d3a039fb2e69df86b4015daa30dfd2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a7f10fa702a324880cc4de958f434cec7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f10fa702a324880cc4de958f434cec7"></a>
  79. <a class="el" href="classQCPAxisRect.html">QCPAxisRect</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>axisRect</b> () const </td></tr>
  80. <tr class="separator:a7f10fa702a324880cc4de958f434cec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:ae490f9c76ee2ba33752c495d3b6e8fb5"><td class="memItemLeft" align="right" valign="top">virtual QPointF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#ae490f9c76ee2ba33752c495d3b6e8fb5">pixelPoint</a> () const </td></tr>
  82. <tr class="separator:ae490f9c76ee2ba33752c495d3b6e8fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  83. <tr class="memitem:aa476abf71ed8fa4c537457ebb1a754ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> (<a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> <a class="el" href="classQCPItemPosition.html#aecb709d72c9aa334a7f62e2c9e0b5d60">type</a>)</td></tr>
  84. <tr class="separator:aa476abf71ed8fa4c537457ebb1a754ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:a2113b2351d6d00457fb3559a4e20c3ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a> (<a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> <a class="el" href="classQCPItemPosition.html#aecb709d72c9aa334a7f62e2c9e0b5d60">type</a>)</td></tr>
  86. <tr class="separator:a2113b2351d6d00457fb3559a4e20c3ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ac2a454aa5a54c1615c50686601ec4510"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a> (<a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> <a class="el" href="classQCPItemPosition.html#aecb709d72c9aa334a7f62e2c9e0b5d60">type</a>)</td></tr>
  88. <tr class="separator:ac2a454aa5a54c1615c50686601ec4510"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:ac094d67a95d2dceafa0d50b9db3a7e51"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a> (<a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *<a class="el" href="classQCPItemPosition.html#a7b4ffab9946945c0e11cd2352dc2e042">parentAnchor</a>, bool keepPixelPosition=false)</td></tr>
  90. <tr class="separator:ac094d67a95d2dceafa0d50b9db3a7e51"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:add71461a973927c74e42179480916d9c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#add71461a973927c74e42179480916d9c">setParentAnchorX</a> (<a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *<a class="el" href="classQCPItemPosition.html#a7b4ffab9946945c0e11cd2352dc2e042">parentAnchor</a>, bool keepPixelPosition=false)</td></tr>
  92. <tr class="separator:add71461a973927c74e42179480916d9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:add5ec1db9d19cec58a3b5c9e0a0c3f9d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#add5ec1db9d19cec58a3b5c9e0a0c3f9d">setParentAnchorY</a> (<a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *<a class="el" href="classQCPItemPosition.html#a7b4ffab9946945c0e11cd2352dc2e042">parentAnchor</a>, bool keepPixelPosition=false)</td></tr>
  94. <tr class="separator:add5ec1db9d19cec58a3b5c9e0a0c3f9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:aa988ba4e87ab684c9021017dcaba945f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> (double key, double value)</td></tr>
  96. <tr class="separator:aa988ba4e87ab684c9021017dcaba945f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:acc70b3abc143287f806e5f154e5e07b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#acc70b3abc143287f806e5f154e5e07b0">setCoords</a> (const QPointF &amp;coords)</td></tr>
  98. <tr class="separator:acc70b3abc143287f806e5f154e5e07b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a2185f45c75ac8cb9be89daeaaad50e37"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a> (<a class="el" href="classQCPAxis.html">QCPAxis</a> *keyAxis, <a class="el" href="classQCPAxis.html">QCPAxis</a> *valueAxis)</td></tr>
  100. <tr class="separator:a2185f45c75ac8cb9be89daeaaad50e37"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:a0cd9b326fb324710169e92e8ca0041c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#a0cd9b326fb324710169e92e8ca0041c2">setAxisRect</a> (<a class="el" href="classQCPAxisRect.html">QCPAxisRect</a> *axisRect)</td></tr>
  102. <tr class="separator:a0cd9b326fb324710169e92e8ca0041c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:ab404e56d9ac2ac2df0382c57933a71ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> (const QPointF &amp;<a class="el" href="classQCPItemPosition.html#ae490f9c76ee2ba33752c495d3b6e8fb5">pixelPoint</a>)</td></tr>
  104. <tr class="separator:ab404e56d9ac2ac2df0382c57933a71ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="inherit_header pub_methods_classQCPItemAnchor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classQCPItemAnchor')"><img src="closed.png" alt="-"/>&#160;Public Functions inherited from <a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a></td></tr>
  106. <tr class="memitem:aeb6b681d2bf324db40a915d32ec5624f inherit pub_methods_classQCPItemAnchor"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemAnchor.html#aeb6b681d2bf324db40a915d32ec5624f">QCPItemAnchor</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot, <a class="el" href="classQCPAbstractItem.html">QCPAbstractItem</a> *parentItem, const QString name, int anchorId=-1)</td></tr>
  107. <tr class="separator:aeb6b681d2bf324db40a915d32ec5624f inherit pub_methods_classQCPItemAnchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:ac93984042a58c875e76847dc3e5f75fe inherit pub_methods_classQCPItemAnchor"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac93984042a58c875e76847dc3e5f75fe"></a>
  109. QString&#160;</td><td class="memItemRight" valign="bottom"><b>name</b> () const </td></tr>
  110. <tr class="separator:ac93984042a58c875e76847dc3e5f75fe inherit pub_methods_classQCPItemAnchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. </table><table class="memberdecls">
  112. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  113. Protected Functions</h2></td></tr>
  114. <tr class="memitem:a577a7efc601df85a20b3e709d1ac320e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemPosition.html#a577a7efc601df85a20b3e709d1ac320e">toQCPItemPosition</a> ()</td></tr>
  115. <tr class="separator:a577a7efc601df85a20b3e709d1ac320e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="inherit_header pro_methods_classQCPItemAnchor"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classQCPItemAnchor')"><img src="closed.png" alt="-"/>&#160;Protected Functions inherited from <a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a></td></tr>
  117. <tr class="memitem:aef15daa640debfb11b0aeaa2116c6fbc inherit pro_methods_classQCPItemAnchor"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemAnchor.html#aef15daa640debfb11b0aeaa2116c6fbc">addChildX</a> (<a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *pos)</td></tr>
  118. <tr class="separator:aef15daa640debfb11b0aeaa2116c6fbc inherit pro_methods_classQCPItemAnchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a230b1d494cda63458e289bbe1b642599 inherit pro_methods_classQCPItemAnchor"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemAnchor.html#a230b1d494cda63458e289bbe1b642599">removeChildX</a> (<a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *pos)</td></tr>
  120. <tr class="separator:a230b1d494cda63458e289bbe1b642599 inherit pro_methods_classQCPItemAnchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:af05dc56f24536f0c7a9a0f57b58cea67 inherit pro_methods_classQCPItemAnchor"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemAnchor.html#af05dc56f24536f0c7a9a0f57b58cea67">addChildY</a> (<a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *pos)</td></tr>
  122. <tr class="separator:af05dc56f24536f0c7a9a0f57b58cea67 inherit pro_methods_classQCPItemAnchor"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:aa2394911d8fff3bd958b9f4f1994b64d inherit pro_methods_classQCPItemAnchor"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPItemAnchor.html#aa2394911d8fff3bd958b9f4f1994b64d">removeChildY</a> (<a class="el" href="classQCPItemPosition.html">QCPItemPosition</a> *pos)</td></tr>
  124. <tr class="separator:aa2394911d8fff3bd958b9f4f1994b64d inherit pro_methods_classQCPItemAnchor"><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>Manages the position of an item. </p>
  128. <p>Every item has at least one public <a class="el" href="classQCPItemPosition.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="classQCustomPlot.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="classQCPItemRect.html" title="A rectangle. ">QCPItemRect</a> has two: <em>topLeft</em> and <em>bottomRight</em>.</p>
  129. <p><a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> has a type (<a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a>) that can be set with <a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>. This type defines how coordinates passed to <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> are to be interpreted, e.g. as absolute pixel coordinates, as plot coordinates of certain axes, etc. For more advanced plots it is also possible to assign different types per X/Y coordinate of the position (see <a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a>, <a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a>). This way an item could be positioned at a fixed pixel distance from the top in the Y direction, while following a plot coordinate in the X direction.</p>
  130. <p>A <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> may have a parent <a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>, see <a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>. This way you can tie multiple items together. If the <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> has a parent, its coordinates (<a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>) are considered to be absolute pixels 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="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a> to the <em>bottom</em> anchor of a <a class="el" href="classQCPItemText.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. For more advanced plots, it is possible to assign different parent anchors per X/Y coordinate of the position, see <a class="el" href="classQCPItemPosition.html#add71461a973927c74e42179480916d9c">setParentAnchorX</a>, <a class="el" href="classQCPItemPosition.html#add5ec1db9d19cec58a3b5c9e0a0c3f9d">setParentAnchorY</a>. This way an item could follow another item in the X direction but stay at a fixed position in the Y direction. Or even follow item A in X, and item B in Y.</p>
  131. <p>Note that every <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> inherits from <a class="el" href="classQCPItemAnchor.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.</p>
  132. <p>To set the apparent pixel position on the <a class="el" href="classQCustomPlot.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="classQCPItemPosition.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a>. This works no matter what type this <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> is or what parent-child situation it is in, as <a class="el" href="classQCPItemPosition.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> transforms the coordinates appropriately, to make the position appear at the specified pixel values. </p>
  133. </div><h2 class="groupheader">Member Enumeration Documentation</h2>
  134. <a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8"></a>
  135. <div class="memitem">
  136. <div class="memproto">
  137. <table class="memname">
  138. <tr>
  139. <td class="memname">enum <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a></td>
  140. </tr>
  141. </table>
  142. </div><div class="memdoc">
  143. <p>Defines the ways an item position can be specified. Thus it defines what the numbers passed to <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> actually mean.</p>
  144. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> </dd></dl>
  145. <table class="fieldtable">
  146. <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0"></a>ptAbsolute</em>&#160;</td><td class="fielddoc">
  147. <p>Static positioning in pixels, starting from the top left corner of the viewport/widget. </p>
  148. </td></tr>
  149. <tr><td class="fieldname"><em><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8ac7d6aa89ceacb39658b0d6da061c789a"></a>ptViewportRatio</em>&#160;</td><td class="fielddoc">
  150. <p>Static positioning given by a fraction of the viewport size. For example, if you call setCoords(0, 0), the position will be at the top left corner of the viewport/widget. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and vertically at the top of the viewport/widget, etc. </p>
  151. </td></tr>
  152. <tr><td class="fieldname"><em><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75"></a>ptAxisRectRatio</em>&#160;</td><td class="fielddoc">
  153. <p>Static positioning given by a fraction of the axis rect size (see <a class="el" href="classQCPItemPosition.html#a0cd9b326fb324710169e92e8ca0041c2">setAxisRect</a>). For example, if you call setCoords(0, 0), the position will be at the top left corner of the axis rect. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and vertically at the top of the axis rect, etc. You can also go beyond the axis rect by providing negative coordinates or coordinates larger than 1. </p>
  154. </td></tr>
  155. <tr><td class="fieldname"><em><a class="anchor" id="aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c"></a>ptPlotCoords</em>&#160;</td><td class="fielddoc">
  156. <p>Dynamic positioning at a plot coordinate defined by two axes (see <a class="el" href="classQCPItemPosition.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a>). </p>
  157. </td></tr>
  158. </table>
  159. </div>
  160. </div>
  161. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  162. <a class="anchor" id="a3efc524f37fdcd22907545eb77555ce4"></a>
  163. <div class="memitem">
  164. <div class="memproto">
  165. <table class="memname">
  166. <tr>
  167. <td class="memname">QCPItemPosition::QCPItemPosition </td>
  168. <td>(</td>
  169. <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td>
  170. <td class="paramname"><em>parentPlot</em>, </td>
  171. </tr>
  172. <tr>
  173. <td class="paramkey"></td>
  174. <td></td>
  175. <td class="paramtype"><a class="el" href="classQCPAbstractItem.html">QCPAbstractItem</a> *&#160;</td>
  176. <td class="paramname"><em>parentItem</em>, </td>
  177. </tr>
  178. <tr>
  179. <td class="paramkey"></td>
  180. <td></td>
  181. <td class="paramtype">const QString&#160;</td>
  182. <td class="paramname"><em>name</em>&#160;</td>
  183. </tr>
  184. <tr>
  185. <td></td>
  186. <td>)</td>
  187. <td></td><td></td>
  188. </tr>
  189. </table>
  190. </div><div class="memdoc">
  191. <p>Creates a new <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a>. You shouldn't create <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> instances directly, even if you want to make a new item subclass. Use <a class="el" href="classQCPAbstractItem.html#a75036d39c4d4e2e1a7dd145fff915d32">QCPAbstractItem::createPosition</a> instead, as explained in the subclassing section of the <a class="el" href="classQCPAbstractItem.html" title="The abstract base class for all items in a plot. ">QCPAbstractItem</a> documentation. </p>
  192. </div>
  193. </div>
  194. <h2 class="groupheader">Member Function Documentation</h2>
  195. <a class="anchor" id="aecb709d72c9aa334a7f62e2c9e0b5d60"></a>
  196. <div class="memitem">
  197. <div class="memproto">
  198. <table class="mlabels">
  199. <tr>
  200. <td class="mlabels-left">
  201. <table class="memname">
  202. <tr>
  203. <td class="memname"><a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a> * QCPItemPosition::type </td>
  204. <td>(</td>
  205. <td class="paramname"></td><td>)</td>
  206. <td> const</td>
  207. </tr>
  208. </table>
  209. </td>
  210. <td class="mlabels-right">
  211. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  212. </tr>
  213. </table>
  214. </div><div class="memdoc">
  215. <p>Returns the current position type.</p>
  216. <p>If different types were set for X and Y (<a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a>, <a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a>), this method returns the type of the X coordinate. In that case rather use <em>typeX()</em> and <em>typeY()</em>.</p>
  217. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> </dd></dl>
  218. </div>
  219. </div>
  220. <a class="anchor" id="a7b4ffab9946945c0e11cd2352dc2e042"></a>
  221. <div class="memitem">
  222. <div class="memproto">
  223. <table class="mlabels">
  224. <tr>
  225. <td class="mlabels-left">
  226. <table class="memname">
  227. <tr>
  228. <td class="memname"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> * QCPItemPosition::parentAnchor </td>
  229. <td>(</td>
  230. <td class="paramname"></td><td>)</td>
  231. <td> const</td>
  232. </tr>
  233. </table>
  234. </td>
  235. <td class="mlabels-right">
  236. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  237. </tr>
  238. </table>
  239. </div><div class="memdoc">
  240. <p>Returns the current parent anchor.</p>
  241. <p>If different parent anchors were set for X and Y (<a class="el" href="classQCPItemPosition.html#add71461a973927c74e42179480916d9c">setParentAnchorX</a>, <a class="el" href="classQCPItemPosition.html#add5ec1db9d19cec58a3b5c9e0a0c3f9d">setParentAnchorY</a>), this method returns the parent anchor of the Y coordinate. In that case rather use <em>parentAnchorX()</em> and <em>parentAnchorY()</em>.</p>
  242. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a> </dd></dl>
  243. </div>
  244. </div>
  245. <a class="anchor" id="ae490f9c76ee2ba33752c495d3b6e8fb5"></a>
  246. <div class="memitem">
  247. <div class="memproto">
  248. <table class="mlabels">
  249. <tr>
  250. <td class="mlabels-left">
  251. <table class="memname">
  252. <tr>
  253. <td class="memname">QPointF QCPItemPosition::pixelPoint </td>
  254. <td>(</td>
  255. <td class="paramname"></td><td>)</td>
  256. <td> const</td>
  257. </tr>
  258. </table>
  259. </td>
  260. <td class="mlabels-right">
  261. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  262. </tr>
  263. </table>
  264. </div><div class="memdoc">
  265. <p>Returns the final absolute pixel position of the <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> on the <a class="el" href="classQCustomPlot.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="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>) and possible parent anchors (<a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>).</p>
  266. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> </dd></dl>
  267. <p>Reimplemented from <a class="el" href="classQCPItemAnchor.html#ae92def8f9297c5d73f5806c586517bb3">QCPItemAnchor</a>.</p>
  268. </div>
  269. </div>
  270. <a class="anchor" id="aa476abf71ed8fa4c537457ebb1a754ad"></a>
  271. <div class="memitem">
  272. <div class="memproto">
  273. <table class="memname">
  274. <tr>
  275. <td class="memname">void QCPItemPosition::setType </td>
  276. <td>(</td>
  277. <td class="paramtype"><a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a>&#160;</td>
  278. <td class="paramname"><em>type</em></td><td>)</td>
  279. <td></td>
  280. </tr>
  281. </table>
  282. </div><div class="memdoc">
  283. <p>Sets the type of the position. The type defines how the coordinates passed to <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> should be handled and how the <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> should behave in the plot.</p>
  284. <p>The possible values for <em>type</em> can be separated in two main categories:</p>
  285. <ul>
  286. <li>The position is regarded as a point in plot coordinates. This corresponds to <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a> and requires two axes that define the plot coordinate system. They can be specified with <a class="el" href="classQCPItemPosition.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a>. By default, the <a class="el" href="classQCustomPlot.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>
  287. </ul>
  288. <ul>
  289. <li>The position is fixed on the <a class="el" href="classQCustomPlot.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="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>, <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8ac7d6aa89ceacb39658b0d6da061c789a">ptViewportRatio</a> and <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>. They differ only in the way the absolute position is described, see the documentation of <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">PositionType</a> for details. For <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>, note that you can specify the axis rect with <a class="el" href="classQCPItemPosition.html#a0cd9b326fb324710169e92e8ca0041c2">setAxisRect</a>. By default this is set to the main axis rect.</li>
  290. </ul>
  291. <p>Note that the position type <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a> is only available (and sensible) when the position has no parent anchor (<a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>).</p>
  292. <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="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> may change in the process.</p>
  293. <p>This method sets the type for both X and Y directions. It is also possible to set different types for X and Y, see <a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a>, <a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a>. </p>
  294. </div>
  295. </div>
  296. <a class="anchor" id="a2113b2351d6d00457fb3559a4e20c3ea"></a>
  297. <div class="memitem">
  298. <div class="memproto">
  299. <table class="memname">
  300. <tr>
  301. <td class="memname">void QCPItemPosition::setTypeX </td>
  302. <td>(</td>
  303. <td class="paramtype"><a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a>&#160;</td>
  304. <td class="paramname"><em>type</em></td><td>)</td>
  305. <td></td>
  306. </tr>
  307. </table>
  308. </div><div class="memdoc">
  309. <p>This method sets the position type of the X coordinate to <em>type</em>.</p>
  310. <p>For a detailed description of what a position type is, see the documentation of <a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>.</p>
  311. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>, <a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a> </dd></dl>
  312. </div>
  313. </div>
  314. <a class="anchor" id="ac2a454aa5a54c1615c50686601ec4510"></a>
  315. <div class="memitem">
  316. <div class="memproto">
  317. <table class="memname">
  318. <tr>
  319. <td class="memname">void QCPItemPosition::setTypeY </td>
  320. <td>(</td>
  321. <td class="paramtype"><a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8">QCPItemPosition::PositionType</a>&#160;</td>
  322. <td class="paramname"><em>type</em></td><td>)</td>
  323. <td></td>
  324. </tr>
  325. </table>
  326. </div><div class="memdoc">
  327. <p>This method sets the position type of the Y coordinate to <em>type</em>.</p>
  328. <p>For a detailed description of what a position type is, see the documentation of <a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>.</p>
  329. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>, <a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a> </dd></dl>
  330. </div>
  331. </div>
  332. <a class="anchor" id="ac094d67a95d2dceafa0d50b9db3a7e51"></a>
  333. <div class="memitem">
  334. <div class="memproto">
  335. <table class="memname">
  336. <tr>
  337. <td class="memname">bool QCPItemPosition::setParentAnchor </td>
  338. <td>(</td>
  339. <td class="paramtype"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td>
  340. <td class="paramname"><em>parentAnchor</em>, </td>
  341. </tr>
  342. <tr>
  343. <td class="paramkey"></td>
  344. <td></td>
  345. <td class="paramtype">bool&#160;</td>
  346. <td class="paramname"><em>keepPixelPosition</em> = <code>false</code>&#160;</td>
  347. </tr>
  348. <tr>
  349. <td></td>
  350. <td>)</td>
  351. <td></td><td></td>
  352. </tr>
  353. </table>
  354. </div><div class="memdoc">
  355. <p>Sets the parent of this <a class="el" href="classQCPItemPosition.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 pixels, with (0, 0) being exactly on top of the parent anchor. (Hence the type shouldn't be set to <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a> for positions with parent anchors.)</p>
  356. <p>if <em>keepPixelPosition</em> is true, the current pixel position of the <a class="el" href="classQCPItemPosition.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>
  357. <p>To remove this <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> from any parent anchor, set <em>parentAnchor</em> to 0.</p>
  358. <p>If the <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> previously had no parent and the type is <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a>, the type is set to <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>, to keep the position in a valid state.</p>
  359. <p>This method sets the parent anchor for both X and Y directions. It is also possible to set different parents for X and Y, see <a class="el" href="classQCPItemPosition.html#add71461a973927c74e42179480916d9c">setParentAnchorX</a>, <a class="el" href="classQCPItemPosition.html#add5ec1db9d19cec58a3b5c9e0a0c3f9d">setParentAnchorY</a>. </p>
  360. </div>
  361. </div>
  362. <a class="anchor" id="add71461a973927c74e42179480916d9c"></a>
  363. <div class="memitem">
  364. <div class="memproto">
  365. <table class="memname">
  366. <tr>
  367. <td class="memname">bool QCPItemPosition::setParentAnchorX </td>
  368. <td>(</td>
  369. <td class="paramtype"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td>
  370. <td class="paramname"><em>parentAnchor</em>, </td>
  371. </tr>
  372. <tr>
  373. <td class="paramkey"></td>
  374. <td></td>
  375. <td class="paramtype">bool&#160;</td>
  376. <td class="paramname"><em>keepPixelPosition</em> = <code>false</code>&#160;</td>
  377. </tr>
  378. <tr>
  379. <td></td>
  380. <td>)</td>
  381. <td></td><td></td>
  382. </tr>
  383. </table>
  384. </div><div class="memdoc">
  385. <p>This method sets the parent anchor of the X coordinate to <em>parentAnchor</em>.</p>
  386. <p>For a detailed description of what a parent anchor is, see the documentation of <a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>.</p>
  387. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>, <a class="el" href="classQCPItemPosition.html#add5ec1db9d19cec58a3b5c9e0a0c3f9d">setParentAnchorY</a> </dd></dl>
  388. </div>
  389. </div>
  390. <a class="anchor" id="add5ec1db9d19cec58a3b5c9e0a0c3f9d"></a>
  391. <div class="memitem">
  392. <div class="memproto">
  393. <table class="memname">
  394. <tr>
  395. <td class="memname">bool QCPItemPosition::setParentAnchorY </td>
  396. <td>(</td>
  397. <td class="paramtype"><a class="el" href="classQCPItemAnchor.html">QCPItemAnchor</a> *&#160;</td>
  398. <td class="paramname"><em>parentAnchor</em>, </td>
  399. </tr>
  400. <tr>
  401. <td class="paramkey"></td>
  402. <td></td>
  403. <td class="paramtype">bool&#160;</td>
  404. <td class="paramname"><em>keepPixelPosition</em> = <code>false</code>&#160;</td>
  405. </tr>
  406. <tr>
  407. <td></td>
  408. <td>)</td>
  409. <td></td><td></td>
  410. </tr>
  411. </table>
  412. </div><div class="memdoc">
  413. <p>This method sets the parent anchor of the Y coordinate to <em>parentAnchor</em>.</p>
  414. <p>For a detailed description of what a parent anchor is, see the documentation of <a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>.</p>
  415. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#ac094d67a95d2dceafa0d50b9db3a7e51">setParentAnchor</a>, <a class="el" href="classQCPItemPosition.html#add71461a973927c74e42179480916d9c">setParentAnchorX</a> </dd></dl>
  416. </div>
  417. </div>
  418. <a class="anchor" id="aa988ba4e87ab684c9021017dcaba945f"></a>
  419. <div class="memitem">
  420. <div class="memproto">
  421. <table class="memname">
  422. <tr>
  423. <td class="memname">void QCPItemPosition::setCoords </td>
  424. <td>(</td>
  425. <td class="paramtype">double&#160;</td>
  426. <td class="paramname"><em>key</em>, </td>
  427. </tr>
  428. <tr>
  429. <td class="paramkey"></td>
  430. <td></td>
  431. <td class="paramtype">double&#160;</td>
  432. <td class="paramname"><em>value</em>&#160;</td>
  433. </tr>
  434. <tr>
  435. <td></td>
  436. <td>)</td>
  437. <td></td><td></td>
  438. </tr>
  439. </table>
  440. </div><div class="memdoc">
  441. <p>Sets the coordinates of this <a class="el" href="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a>. What the coordinates mean, is defined by the type (<a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>, <a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a>, <a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a>).</p>
  442. <p>For example, if the type is <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a>, <em>key</em> and <em>value</em> mean the x and y pixel position on the <a class="el" href="classQCustomPlot.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="classQCustomPlot.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="classQCPItemPosition.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="classQCPItemPosition.html#a2185f45c75ac8cb9be89daeaaad50e37">setAxes</a>. By default those are the <a class="el" href="classQCustomPlot.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="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> for other available coordinate types and their meaning.</p>
  443. <p>If different types were configured for X and Y (<a class="el" href="classQCPItemPosition.html#a2113b2351d6d00457fb3559a4e20c3ea">setTypeX</a>, <a class="el" href="classQCPItemPosition.html#ac2a454aa5a54c1615c50686601ec4510">setTypeY</a>), <em>key</em> and <em>value</em> must also be provided in the different coordinate systems. Here, the X type refers to <em>key</em>, and the Y type refers to <em>value</em>.</p>
  444. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#ab404e56d9ac2ac2df0382c57933a71ef">setPixelPoint</a> </dd></dl>
  445. </div>
  446. </div>
  447. <a class="anchor" id="acc70b3abc143287f806e5f154e5e07b0"></a>
  448. <div class="memitem">
  449. <div class="memproto">
  450. <table class="memname">
  451. <tr>
  452. <td class="memname">void QCPItemPosition::setCoords </td>
  453. <td>(</td>
  454. <td class="paramtype">const QPointF &amp;&#160;</td>
  455. <td class="paramname"><em>pos</em></td><td>)</td>
  456. <td></td>
  457. </tr>
  458. </table>
  459. </div><div class="memdoc">
  460. <p>This is an overloaded function.</p>
  461. <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="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords(double key, double value)</a> method. </p>
  462. </div>
  463. </div>
  464. <a class="anchor" id="a2185f45c75ac8cb9be89daeaaad50e37"></a>
  465. <div class="memitem">
  466. <div class="memproto">
  467. <table class="memname">
  468. <tr>
  469. <td class="memname">void QCPItemPosition::setAxes </td>
  470. <td>(</td>
  471. <td class="paramtype"><a class="el" href="classQCPAxis.html">QCPAxis</a> *&#160;</td>
  472. <td class="paramname"><em>keyAxis</em>, </td>
  473. </tr>
  474. <tr>
  475. <td class="paramkey"></td>
  476. <td></td>
  477. <td class="paramtype"><a class="el" href="classQCPAxis.html">QCPAxis</a> *&#160;</td>
  478. <td class="paramname"><em>valueAxis</em>&#160;</td>
  479. </tr>
  480. <tr>
  481. <td></td>
  482. <td>)</td>
  483. <td></td><td></td>
  484. </tr>
  485. </table>
  486. </div><div class="memdoc">
  487. <p>When <a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> is <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8ad5ffb8dc99ad73263f7010c77342294c">ptPlotCoords</a>, this function may be used to specify the axes the coordinates set with <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> relate to. By default they are set to the initial xAxis and yAxis of the <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>. </p>
  488. </div>
  489. </div>
  490. <a class="anchor" id="a0cd9b326fb324710169e92e8ca0041c2"></a>
  491. <div class="memitem">
  492. <div class="memproto">
  493. <table class="memname">
  494. <tr>
  495. <td class="memname">void QCPItemPosition::setAxisRect </td>
  496. <td>(</td>
  497. <td class="paramtype"><a class="el" href="classQCPAxisRect.html">QCPAxisRect</a> *&#160;</td>
  498. <td class="paramname"><em>axisRect</em></td><td>)</td>
  499. <td></td>
  500. </tr>
  501. </table>
  502. </div><div class="memdoc">
  503. <p>When <a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a> is <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a01080fd00eaf09fa238ef6b73bbfef75">ptAxisRectRatio</a>, this function may be used to specify the axis rect the coordinates set with <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> relate to. By default this is set to the main axis rect of the <a class="el" href="classQCustomPlot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>. </p>
  504. </div>
  505. </div>
  506. <a class="anchor" id="ab404e56d9ac2ac2df0382c57933a71ef"></a>
  507. <div class="memitem">
  508. <div class="memproto">
  509. <table class="memname">
  510. <tr>
  511. <td class="memname">void QCPItemPosition::setPixelPoint </td>
  512. <td>(</td>
  513. <td class="paramtype">const QPointF &amp;&#160;</td>
  514. <td class="paramname"><em>pixelPoint</em></td><td>)</td>
  515. <td></td>
  516. </tr>
  517. </table>
  518. </div><div class="memdoc">
  519. <p>Sets the apparent pixel position. This works no matter what type (<a class="el" href="classQCPItemPosition.html#aa476abf71ed8fa4c537457ebb1a754ad">setType</a>) this <a class="el" href="classQCPItemPosition.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>
  520. <p>Only if the type is <a class="el" href="classQCPItemPosition.html#aad9936c22bf43e3d358552f6e86dbdc8a564f5e53e550ead1ec5fc7fc7d0b73e0">ptAbsolute</a> and no parent anchor is set, this function's effect is identical to that of <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a>.</p>
  521. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPItemPosition.html#ae490f9c76ee2ba33752c495d3b6e8fb5">pixelPoint</a>, <a class="el" href="classQCPItemPosition.html#aa988ba4e87ab684c9021017dcaba945f">setCoords</a> </dd></dl>
  522. </div>
  523. </div>
  524. <a class="anchor" id="a577a7efc601df85a20b3e709d1ac320e"></a>
  525. <div class="memitem">
  526. <div class="memproto">
  527. <table class="mlabels">
  528. <tr>
  529. <td class="mlabels-left">
  530. <table class="memname">
  531. <tr>
  532. <td class="memname">virtual <a class="el" href="classQCPItemPosition.html">QCPItemPosition</a>* QCPItemPosition::toQCPItemPosition </td>
  533. <td>(</td>
  534. <td class="paramname"></td><td>)</td>
  535. <td></td>
  536. </tr>
  537. </table>
  538. </td>
  539. <td class="mlabels-right">
  540. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  541. </tr>
  542. </table>
  543. </div><div class="memdoc">
  544. <p>Returns 0 if this instance is merely a <a class="el" href="classQCPItemAnchor.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="classQCPItemPosition.html" title="Manages the position of an item. ">QCPItemPosition</a> (which is a subclass of <a class="el" href="classQCPItemAnchor.html" title="An anchor of an item to which positions can be attached to. ">QCPItemAnchor</a>).</p>
  545. <p>This safe downcast functionality could also be achieved with a dynamic_cast. However, <a class="el" href="classQCustomPlot.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>
  546. <p>Reimplemented from <a class="el" href="classQCPItemAnchor.html#ac54b20120669950255a63587193dbb86">QCPItemAnchor</a>.</p>
  547. </div>
  548. </div>
  549. <hr/>The documentation for this class was generated from the following files:<ul>
  550. <li>src/item.h</li>
  551. <li>src/item.cpp</li>
  552. </ul>
  553. </div><!-- contents -->
  554. </body>
  555. </html>