classQCPLayerable.html 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  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>QCPLayerable 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-methods">Public Functions</a> &#124;
  22. <a href="#signals">Signals</a> &#124;
  23. <a href="#pro-methods">Protected Functions</a> </div>
  24. <div class="headertitle">
  25. <div class="title">QCPLayerable Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  26. </div><!--header-->
  27. <div class="contents">
  28. <p>Base class for all drawable objects.
  29. <a href="classQCPLayerable.html#details">More...</a></p>
  30. <div class="dynheader">
  31. Inheritance diagram for QCPLayerable:</div>
  32. <div class="dyncontent">
  33. <div class="center"><img src="classQCPLayerable__inherit__graph.png" border="0" usemap="#QCPLayerable_inherit__map" alt="Inheritance graph"/></div>
  34. <map name="QCPLayerable_inherit__map" id="QCPLayerable_inherit__map">
  35. <area shape="rect" id="node2" href="classQCPAbstractItem.html" title="The abstract base class for all items in a plot. " alt="" coords="167,221,284,245"/><area shape="rect" id="node12" href="classQCPAbstractPlottable.html" title="The abstract base class for all data representing objects in a plot. " alt="" coords="155,557,296,581"/><area shape="rect" id="node19" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. " alt="" coords="191,605,259,629"/><area shape="rect" id="node20" href="classQCPGrid.html" title="Responsible for drawing the grid of a QCPAxis. " alt="" coords="190,653,261,677"/><area shape="rect" id="node21" href="classQCPLayoutElement.html" title="The abstract base class for all objects that form the layout system. " alt="" coords="161,797,290,821"/><area shape="rect" id="node3" href="classQCPItemBracket.html" title="A bracket for referencing/highlighting certain parts in the plot. " alt="" coords="367,5,481,29"/><area shape="rect" id="node4" href="classQCPItemCurve.html" title="A curved line from one point to another. " alt="" coords="372,53,476,77"/><area shape="rect" id="node5" href="classQCPItemEllipse.html" title="An ellipse. " alt="" coords="370,101,478,125"/><area shape="rect" id="node6" href="classQCPItemLine.html" title="A line from one point to another. " alt="" coords="377,149,471,173"/><area shape="rect" id="node7" href="classQCPItemPixmap.html" title="An arbitrary pixmap. " alt="" coords="368,197,480,221"/><area shape="rect" id="node8" href="classQCPItemRect.html" title="A rectangle. " alt="" coords="377,245,471,269"/><area shape="rect" id="node9" href="classQCPItemStraightLine.html" title="A straight line that spans infinitely in both directions. " alt="" coords="355,293,493,317"/><area shape="rect" id="node10" href="classQCPItemText.html" title="A text label. " alt="" coords="377,341,471,365"/><area shape="rect" id="node11" href="classQCPItemTracer.html" title="Item that sticks to QCPGraph data points. " alt="" coords="371,389,477,413"/><area shape="rect" id="node13" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. " alt="" coords="387,437,461,461"/><area shape="rect" id="node14" href="classQCPColorMap.html" title="A plottable representing a two&#45;dimensional color map in a plot. " alt="" coords="375,485,473,509"/><area shape="rect" id="node15" href="classQCPCurve.html" title="A plottable representing a parametric curve in a plot. " alt="" coords="385,533,463,557"/><area shape="rect" id="node16" href="classQCPFinancial.html" title="A plottable representing a financial stock chart. " alt="" coords="377,581,471,605"/><area shape="rect" id="node17" href="classQCPGraph.html" title="A plottable representing a graph in a plot. " alt="" coords="383,629,465,653"/><area shape="rect" id="node18" href="classQCPStatisticalBox.html" title="A plottable representing a single statistical box in a plot. " alt="" coords="363,677,485,701"/><area shape="rect" id="node22" href="classQCPAbstractLegendItem.html" title="The abstract base class for all entries in a QCPLegend. " alt="" coords="345,725,503,749"/><area shape="rect" id="node24" href="classQCPAxisRect.html" title="Holds multiple axes and arranges them in a rectangular shape. " alt="" coords="378,773,470,797"/><area shape="rect" id="node25" href="classQCPColorScale.html" title="A color scale for use with color coding data such as QCPColorMap. " alt="" coords="371,821,477,845"/><area shape="rect" id="node26" href="classQCPLayout.html" title="The abstract base class for layouts. " alt="" coords="383,869,465,893"/><area shape="rect" id="node30" href="classQCPPlotTitle.html" title="A layout element displaying a plot title text. " alt="" coords="379,917,469,941"/><area shape="rect" id="node23" href="classQCPPlottableLegendItem.html" title="A legend item representing a plottable with an icon and the plottable name. " alt="" coords="553,725,714,749"/><area shape="rect" id="node27" href="classQCPLayoutGrid.html" title="A layout that arranges child elements in a grid. " alt="" coords="580,845,687,869"/><area shape="rect" id="node29" href="classQCPLayoutInset.html" title="A layout that places child elements aligned to the border or arbitrarily positioned. " alt="" coords="578,893,689,917"/><area shape="rect" id="node28" href="classQCPLegend.html" title="Manages a legend inside a QCustomPlot. " alt="" coords="763,845,850,869"/></map>
  36. </div>
  37. <table class="memberdecls">
  38. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  39. Public Functions</h2></td></tr>
  40. <tr class="memitem:a74c0fa237f29bf0e49565013fc5d1ec0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a74c0fa237f29bf0e49565013fc5d1ec0">QCPLayerable</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *plot, QString targetLayer=QString(), <a class="el" href="classQCPLayerable.html">QCPLayerable</a> *<a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a>=0)</td></tr>
  41. <tr class="separator:a74c0fa237f29bf0e49565013fc5d1ec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  42. <tr class="memitem:a10a3cc92e0fa63e4a929e61d34e275a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10a3cc92e0fa63e4a929e61d34e275a7"></a>
  43. bool&#160;</td><td class="memItemRight" valign="bottom"><b>visible</b> () const </td></tr>
  44. <tr class="separator:a10a3cc92e0fa63e4a929e61d34e275a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  45. <tr class="memitem:ab7e0e94461566093d36ffc0f5312b109"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7e0e94461566093d36ffc0f5312b109"></a>
  46. <a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>parentPlot</b> () const </td></tr>
  47. <tr class="separator:ab7e0e94461566093d36ffc0f5312b109"><td class="memSeparator" colspan="2">&#160;</td></tr>
  48. <tr class="memitem:a98d79f5b716d45eac4347befe546d0ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a> () const </td></tr>
  49. <tr class="separator:a98d79f5b716d45eac4347befe546d0ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
  50. <tr class="memitem:aea67e8c19145e70d68c286a36f6b8300"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea67e8c19145e70d68c286a36f6b8300"></a>
  51. <a class="el" href="classQCPLayer.html">QCPLayer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>layer</b> () const </td></tr>
  52. <tr class="separator:aea67e8c19145e70d68c286a36f6b8300"><td class="memSeparator" colspan="2">&#160;</td></tr>
  53. <tr class="memitem:aef5cb4aa899ed9dc9384fd614560291e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef5cb4aa899ed9dc9384fd614560291e"></a>
  54. bool&#160;</td><td class="memItemRight" valign="bottom"><b>antialiased</b> () const </td></tr>
  55. <tr class="separator:aef5cb4aa899ed9dc9384fd614560291e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  56. <tr class="memitem:a3bed99ddc396b48ce3ebfdc0418744f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a3bed99ddc396b48ce3ebfdc0418744f8">setVisible</a> (bool on)</td></tr>
  57. <tr class="separator:a3bed99ddc396b48ce3ebfdc0418744f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  58. <tr class="memitem:ab0d0da6d2de45a118886d2c8e16d5a54"><td class="memItemLeft" align="right" valign="top">Q_SLOT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a> (<a class="el" href="classQCPLayer.html">QCPLayer</a> *layer)</td></tr>
  59. <tr class="separator:ab0d0da6d2de45a118886d2c8e16d5a54"><td class="memSeparator" colspan="2">&#160;</td></tr>
  60. <tr class="memitem:ab25a0e7b897993b44447caee0f142083"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab25a0e7b897993b44447caee0f142083">setLayer</a> (const QString &amp;layerName)</td></tr>
  61. <tr class="separator:ab25a0e7b897993b44447caee0f142083"><td class="memSeparator" colspan="2">&#160;</td></tr>
  62. <tr class="memitem:a4fd43e89be4a553ead41652565ff0581"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">setAntialiased</a> (bool enabled)</td></tr>
  63. <tr class="separator:a4fd43e89be4a553ead41652565ff0581"><td class="memSeparator" colspan="2">&#160;</td></tr>
  64. <tr class="memitem:a4001c4d0dfec55598efa4d531f2179a9"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a> (const QPointF &amp;pos, bool onlySelectable, QVariant *details=0) const </td></tr>
  65. <tr class="separator:a4001c4d0dfec55598efa4d531f2179a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:a30809f7455e9794bca7b6c737622fa63"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> () const </td></tr>
  67. <tr class="separator:a30809f7455e9794bca7b6c737622fa63"><td class="memSeparator" colspan="2">&#160;</td></tr>
  68. </table><table class="memberdecls">
  69. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
  70. Signals</h2></td></tr>
  71. <tr class="memitem:abbf8657cedea73ac1c3499b521c90eba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#abbf8657cedea73ac1c3499b521c90eba">layerChanged</a> (<a class="el" href="classQCPLayer.html">QCPLayer</a> *newLayer)</td></tr>
  72. <tr class="separator:abbf8657cedea73ac1c3499b521c90eba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. </table><table class="memberdecls">
  74. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  75. Protected Functions</h2></td></tr>
  76. <tr class="memitem:ab20b7dbd8e0249ed61adb9622c427382"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab20b7dbd8e0249ed61adb9622c427382">parentPlotInitialized</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot)</td></tr>
  77. <tr class="separator:ab20b7dbd8e0249ed61adb9622c427382"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:aa4035e586b7f317a06ba7e74e242a5ea"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aa4035e586b7f317a06ba7e74e242a5ea">selectionCategory</a> () const </td></tr>
  79. <tr class="separator:aa4035e586b7f317a06ba7e74e242a5ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. <tr class="memitem:a07a8f746640c3704b09910df297afcba"><td class="memItemLeft" align="right" valign="top">virtual QRect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a07a8f746640c3704b09910df297afcba">clipRect</a> () const </td></tr>
  81. <tr class="separator:a07a8f746640c3704b09910df297afcba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:afdf83ddc6a265cbf4c89fe99d3d93473"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#afdf83ddc6a265cbf4c89fe99d3d93473">applyDefaultAntialiasingHint</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter) const =0</td></tr>
  83. <tr class="separator:afdf83ddc6a265cbf4c89fe99d3d93473"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. <tr class="memitem:aecf2f7087482d4b6a78cb2770e5ed12d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter)=0</td></tr>
  85. <tr class="separator:aecf2f7087482d4b6a78cb2770e5ed12d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:a7498c2d0d081cf7cad0fb3bb93aa0e91"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> (QMouseEvent *event, bool additive, const QVariant &amp;details, bool *selectionStateChanged)</td></tr>
  87. <tr class="separator:a7498c2d0d081cf7cad0fb3bb93aa0e91"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:ae546370644a5551c76af739afc008bee"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a> (bool *selectionStateChanged)</td></tr>
  89. <tr class="separator:ae546370644a5551c76af739afc008bee"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:a8cbe5a0c9a5674249982f5ca5f8e02bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot)</td></tr>
  91. <tr class="separator:a8cbe5a0c9a5674249982f5ca5f8e02bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:aa23c893671f1f6744ac235cf2204cf3a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aa23c893671f1f6744ac235cf2204cf3a">setParentLayerable</a> (<a class="el" href="classQCPLayerable.html">QCPLayerable</a> *<a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a>)</td></tr>
  93. <tr class="separator:aa23c893671f1f6744ac235cf2204cf3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  94. <tr class="memitem:af94484cfb7cbbddb7de522e9be71d9a4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#af94484cfb7cbbddb7de522e9be71d9a4">moveToLayer</a> (<a class="el" href="classQCPLayer.html">QCPLayer</a> *layer, bool prepend)</td></tr>
  95. <tr class="separator:af94484cfb7cbbddb7de522e9be71d9a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:a62bd552d1a45aa9accb24b310542279e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a62bd552d1a45aa9accb24b310542279e">applyAntialiasingHint</a> (<a class="el" href="classQCPPainter.html">QCPPainter</a> *painter, bool localAntialiased, <a class="el" href="namespaceQCP.html#ae55dbe315d41fe80f29ba88100843a0c">QCP::AntialiasedElement</a> overrideElement) const </td></tr>
  97. <tr class="separator:a62bd552d1a45aa9accb24b310542279e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. </table>
  99. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  100. <div class="textblock"><p>Base class for all drawable objects. </p>
  101. <p>This is the abstract base class most visible objects derive from, e.g. plottables, axes, grid etc.</p>
  102. <p>Every layerable is on a layer (<a class="el" href="classQCPLayer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a>) which allows controlling the rendering order by stacking the layers accordingly.</p>
  103. <p>For details about the layering mechanism, see the <a class="el" href="classQCPLayer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a> documentation. </p>
  104. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  105. <a class="anchor" id="a74c0fa237f29bf0e49565013fc5d1ec0"></a>
  106. <div class="memitem">
  107. <div class="memproto">
  108. <table class="memname">
  109. <tr>
  110. <td class="memname">QCPLayerable::QCPLayerable </td>
  111. <td>(</td>
  112. <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td>
  113. <td class="paramname"><em>plot</em>, </td>
  114. </tr>
  115. <tr>
  116. <td class="paramkey"></td>
  117. <td></td>
  118. <td class="paramtype">QString&#160;</td>
  119. <td class="paramname"><em>targetLayer</em> = <code>QString()</code>, </td>
  120. </tr>
  121. <tr>
  122. <td class="paramkey"></td>
  123. <td></td>
  124. <td class="paramtype"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> *&#160;</td>
  125. <td class="paramname"><em>parentLayerable</em> = <code>0</code>&#160;</td>
  126. </tr>
  127. <tr>
  128. <td></td>
  129. <td>)</td>
  130. <td></td><td></td>
  131. </tr>
  132. </table>
  133. </div><div class="memdoc">
  134. <p>Creates a new <a class="el" href="classQCPLayerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> instance.</p>
  135. <p>Since <a class="el" href="classQCPLayerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> is an abstract base class, it can't be instantiated directly. Use one of the derived classes.</p>
  136. <p>If <em>plot</em> is provided, it automatically places itself on the layer named <em>targetLayer</em>. If <em>targetLayer</em> is an empty string, it places itself on the current layer of the plot (see <a class="el" href="classQCustomPlot.html#a73a6dc47c653bb6f8f030abca5a11852">QCustomPlot::setCurrentLayer</a>).</p>
  137. <p>It is possible to provide 0 as <em>plot</em>. In that case, you should assign a parent plot at a later time with <a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a>.</p>
  138. <p>The layerable's parent layerable is set to <em>parentLayerable</em>, if provided. Direct layerable parents are mainly used to control visibility in a hierarchy of layerables. This means a layerable is only drawn, if all its ancestor layerables are also visible. Note that <em>parentLayerable</em> does not become the QObject-parent (for memory management) of this layerable, <em>plot</em> does. It is not uncommon to set the QObject-parent to something else in the constructors of <a class="el" href="classQCPLayerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> subclasses, to guarantee a working destruction hierarchy. </p>
  139. </div>
  140. </div>
  141. <h2 class="groupheader">Member Function Documentation</h2>
  142. <a class="anchor" id="a98d79f5b716d45eac4347befe546d0ec"></a>
  143. <div class="memitem">
  144. <div class="memproto">
  145. <table class="mlabels">
  146. <tr>
  147. <td class="mlabels-left">
  148. <table class="memname">
  149. <tr>
  150. <td class="memname"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * QCPLayerable::parentLayerable </td>
  151. <td>(</td>
  152. <td class="paramname"></td><td>)</td>
  153. <td> const</td>
  154. </tr>
  155. </table>
  156. </td>
  157. <td class="mlabels-right">
  158. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  159. </tr>
  160. </table>
  161. </div><div class="memdoc">
  162. <p>Returns the parent layerable of this layerable. The parent layerable is used to provide visibility hierarchies in conjunction with the method <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a>. This way, layerables only get drawn if their parent layerables are visible, too.</p>
  163. <p>Note that a parent layerable is not necessarily also the QObject parent for memory management. Further, a layerable doesn't always have a parent layerable, so this function may return 0.</p>
  164. <p>A parent layerable is set implicitly with when placed inside layout elements and doesn't need to be set manually by the user. </p>
  165. </div>
  166. </div>
  167. <a class="anchor" id="a3bed99ddc396b48ce3ebfdc0418744f8"></a>
  168. <div class="memitem">
  169. <div class="memproto">
  170. <table class="memname">
  171. <tr>
  172. <td class="memname">void QCPLayerable::setVisible </td>
  173. <td>(</td>
  174. <td class="paramtype">bool&#160;</td>
  175. <td class="paramname"><em>on</em></td><td>)</td>
  176. <td></td>
  177. </tr>
  178. </table>
  179. </div><div class="memdoc">
  180. <p>Sets the visibility of this layerable object. If an object is not visible, it will not be drawn 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, and user interaction with it (e.g. click and selection) is not possible. </p>
  181. </div>
  182. </div>
  183. <a class="anchor" id="ab0d0da6d2de45a118886d2c8e16d5a54"></a>
  184. <div class="memitem">
  185. <div class="memproto">
  186. <table class="memname">
  187. <tr>
  188. <td class="memname">bool QCPLayerable::setLayer </td>
  189. <td>(</td>
  190. <td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> *&#160;</td>
  191. <td class="paramname"><em>layer</em></td><td>)</td>
  192. <td></td>
  193. </tr>
  194. </table>
  195. </div><div class="memdoc">
  196. <p>Sets the <em>layer</em> of this layerable object. The object will be placed on top of the other objects already on <em>layer</em>.</p>
  197. <p>If <em>layer</em> is 0, this layerable will not be on any layer and thus not appear in the plot (or interact/receive events).</p>
  198. <p>Returns true if the layer of this layerable was successfully changed to <em>layer</em>. </p>
  199. </div>
  200. </div>
  201. <a class="anchor" id="ab25a0e7b897993b44447caee0f142083"></a>
  202. <div class="memitem">
  203. <div class="memproto">
  204. <table class="memname">
  205. <tr>
  206. <td class="memname">bool QCPLayerable::setLayer </td>
  207. <td>(</td>
  208. <td class="paramtype">const QString &amp;&#160;</td>
  209. <td class="paramname"><em>layerName</em></td><td>)</td>
  210. <td></td>
  211. </tr>
  212. </table>
  213. </div><div class="memdoc">
  214. <p>This is an overloaded function. Sets the layer of this layerable object by name</p>
  215. <p>Returns true on success, i.e. if <em>layerName</em> is a valid layer name. </p>
  216. </div>
  217. </div>
  218. <a class="anchor" id="a4fd43e89be4a553ead41652565ff0581"></a>
  219. <div class="memitem">
  220. <div class="memproto">
  221. <table class="memname">
  222. <tr>
  223. <td class="memname">void QCPLayerable::setAntialiased </td>
  224. <td>(</td>
  225. <td class="paramtype">bool&#160;</td>
  226. <td class="paramname"><em>enabled</em></td><td>)</td>
  227. <td></td>
  228. </tr>
  229. </table>
  230. </div><div class="memdoc">
  231. <p>Sets whether this object will be drawn antialiased or not.</p>
  232. <p>Note that antialiasing settings may be overridden by <a class="el" href="classQCustomPlot.html#af6f91e5eab1be85f67c556e98c3745e8">QCustomPlot::setAntialiasedElements</a> and <a class="el" href="classQCustomPlot.html#ae10d685b5eabea2999fb8775ca173c24">QCustomPlot::setNotAntialiasedElements</a>. </p>
  233. </div>
  234. </div>
  235. <a class="anchor" id="a4001c4d0dfec55598efa4d531f2179a9"></a>
  236. <div class="memitem">
  237. <div class="memproto">
  238. <table class="mlabels">
  239. <tr>
  240. <td class="mlabels-left">
  241. <table class="memname">
  242. <tr>
  243. <td class="memname">double QCPLayerable::selectTest </td>
  244. <td>(</td>
  245. <td class="paramtype">const QPointF &amp;&#160;</td>
  246. <td class="paramname"><em>pos</em>, </td>
  247. </tr>
  248. <tr>
  249. <td class="paramkey"></td>
  250. <td></td>
  251. <td class="paramtype">bool&#160;</td>
  252. <td class="paramname"><em>onlySelectable</em>, </td>
  253. </tr>
  254. <tr>
  255. <td class="paramkey"></td>
  256. <td></td>
  257. <td class="paramtype">QVariant *&#160;</td>
  258. <td class="paramname"><em>details</em> = <code>0</code>&#160;</td>
  259. </tr>
  260. <tr>
  261. <td></td>
  262. <td>)</td>
  263. <td></td><td> const</td>
  264. </tr>
  265. </table>
  266. </td>
  267. <td class="mlabels-right">
  268. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  269. </tr>
  270. </table>
  271. </div><div class="memdoc">
  272. <p>This function is used to decide whether a click hits a layerable object or not.</p>
  273. <p><em>pos</em> is a point in pixel coordinates 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. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if <em>onlySelectable</em> is true and the object is not selectable, -1.0 is returned, too.</p>
  274. <p>If the object is represented not by single lines but by an area like a <a class="el" href="classQCPItemText.html">QCPItemText</a> or the bars of a <a class="el" href="classQCPBars.html">QCPBars</a> plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).</p>
  275. <p>Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).</p>
  276. <p>The actual setting of the selection state is not done by this function. This is handled by the parent <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> when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/deselectEvent methods.</p>
  277. <p><em>details</em> is an optional output parameter. Every layerable subclass may place any information in <em>details</em>. This information will be passed to <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> when the parent <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> decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> will carry the <em>details</em>. This is useful for multi-part objects (like <a class="el" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. ">QCPAxis</a>). This way, a possibly complex calculation to decide which part was clicked is only done once in <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>. The result (i.e. the actually clicked part) can then be placed in <em>details</em>. So in the subsequent <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a>, the decision which part was selected doesn't have to be done a second time for a single selection operation.</p>
  278. <p>You may pass 0 as <em>details</em> to indicate that you are not interested in those selection details.</p>
  279. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a>, <a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a>, <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> </dd></dl>
  280. <p>Reimplemented in <a class="el" href="classQCPAxis.html#a2877a6230920c118be65c6113089f467">QCPAxis</a>, <a class="el" href="classQCPLayoutInset.html#ab5a2f2b88c05e369fd7da9583d17aa3a">QCPLayoutInset</a>, <a class="el" href="classQCPLegend.html#aa3892801051bc7b985e003576df844db">QCPLegend</a>, <a class="el" href="classQCPBars.html#a0d37a9feb1d0baf73ce6e809db214445">QCPBars</a>, <a class="el" href="classQCPAbstractItem.html#a96d522d10ffc0413b9a366c6f7f0476b">QCPAbstractItem</a>, <a class="el" href="classQCPGraph.html#abc9ff375aabcf2d21cca33d6baf85772">QCPGraph</a>, <a class="el" href="classQCPColorMap.html#a4088dc7bcbe9bba605c84a912ba660ff">QCPColorMap</a>, <a class="el" href="classQCPLayoutElement.html#a9fcf5d0ea19f2c23b2b528bce2c6f095">QCPLayoutElement</a>, <a class="el" href="classQCPFinancial.html#adf6cff00a55f775487d375fe4df5e95b">QCPFinancial</a>, <a class="el" href="classQCPCurve.html#a5af9949e725704811bbc81ecd5970b8e">QCPCurve</a>, <a class="el" href="classQCPStatisticalBox.html#a7d3ac843dc48a085740fdfc4319a89cc">QCPStatisticalBox</a>, <a class="el" href="classQCPItemTracer.html#ae71f3728421c83c188c117279ca050fd">QCPItemTracer</a>, <a class="el" href="classQCPItemText.html#a285b95bb6634c2e4f7768abb7a8bc69c">QCPItemText</a>, <a class="el" href="classQCPAbstractPlottable.html#a38efe9641d972992a3d44204bc80ec1d">QCPAbstractPlottable</a>, <a class="el" href="classQCPAbstractLegendItem.html#ad0480d5cad34627a294a2921caa4a62f">QCPAbstractLegendItem</a>, <a class="el" href="classQCPPlotTitle.html#a5b7ae716be9134a48f4e378feb0e6699">QCPPlotTitle</a>, <a class="el" href="classQCPItemBracket.html#aa6933caff1d42c54bcebc769ef88c798">QCPItemBracket</a>, <a class="el" href="classQCPItemPixmap.html#a9f8436aa141fa0fb504191c882c2f4d9">QCPItemPixmap</a>, <a class="el" href="classQCPItemCurve.html#a741375c11667b5f9c95b2683f93ee514">QCPItemCurve</a>, <a class="el" href="classQCPItemLine.html#a7541e5d9378ca121d07b0df3b24f7178">QCPItemLine</a>, <a class="el" href="classQCPItemEllipse.html#acd7e5f9528630b2ab5987e2a5782eb7c">QCPItemEllipse</a>, <a class="el" href="classQCPItemRect.html#af13b0797079b40b73d1c7286b76f18ac">QCPItemRect</a>, and <a class="el" href="classQCPItemStraightLine.html#a64cc3796f58ce856012732603edb2f1c">QCPItemStraightLine</a>.</p>
  281. </div>
  282. </div>
  283. <a class="anchor" id="a30809f7455e9794bca7b6c737622fa63"></a>
  284. <div class="memitem">
  285. <div class="memproto">
  286. <table class="memname">
  287. <tr>
  288. <td class="memname">bool QCPLayerable::realVisibility </td>
  289. <td>(</td>
  290. <td class="paramname"></td><td>)</td>
  291. <td> const</td>
  292. </tr>
  293. </table>
  294. </div><div class="memdoc">
  295. <p>Returns whether this layerable is visible, taking the visibility of the layerable parent and the visibility of the layer this layerable is on into account. This is the method that is consulted to decide whether a layerable shall be drawn or not.</p>
  296. <p>If this layerable has a direct layerable parent (usually set via hierarchies implemented in subclasses, like in the case of <a class="el" href="classQCPLayoutElement.html" title="The abstract base class for all objects that form the layout system. ">QCPLayoutElement</a>), this function returns true only if this layerable has its visibility set to true and the parent layerable's <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> returns true.</p>
  297. <p>If this layerable doesn't have a direct layerable parent, returns the state of this layerable's visibility. </p>
  298. </div>
  299. </div>
  300. <a class="anchor" id="abbf8657cedea73ac1c3499b521c90eba"></a>
  301. <div class="memitem">
  302. <div class="memproto">
  303. <table class="mlabels">
  304. <tr>
  305. <td class="mlabels-left">
  306. <table class="memname">
  307. <tr>
  308. <td class="memname">void QCPLayerable::layerChanged </td>
  309. <td>(</td>
  310. <td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> *&#160;</td>
  311. <td class="paramname"><em>newLayer</em></td><td>)</td>
  312. <td></td>
  313. </tr>
  314. </table>
  315. </td>
  316. <td class="mlabels-right">
  317. <span class="mlabels"><span class="mlabel">signal</span></span> </td>
  318. </tr>
  319. </table>
  320. </div><div class="memdoc">
  321. <p>This signal is emitted when the layer of this layerable changes, i.e. this layerable is moved to a different layer.</p>
  322. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a> </dd></dl>
  323. </div>
  324. </div>
  325. <a class="anchor" id="ab20b7dbd8e0249ed61adb9622c427382"></a>
  326. <div class="memitem">
  327. <div class="memproto">
  328. <table class="mlabels">
  329. <tr>
  330. <td class="mlabels-left">
  331. <table class="memname">
  332. <tr>
  333. <td class="memname">void QCPLayerable::parentPlotInitialized </td>
  334. <td>(</td>
  335. <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td>
  336. <td class="paramname"><em>parentPlot</em></td><td>)</td>
  337. <td></td>
  338. </tr>
  339. </table>
  340. </td>
  341. <td class="mlabels-right">
  342. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  343. </tr>
  344. </table>
  345. </div><div class="memdoc">
  346. <p>This function is called by <a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a>, to allow subclasses to react on the setting of a parent plot. This is the case when 0 was passed as parent plot in the constructor, and the parent plot is set at a later time.</p>
  347. <p>For example, QCPLayoutElement/QCPLayout hierarchies may be created independently of any <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> at first. When they are then added to a layout inside 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>, the top level element of the hierarchy gets its parent plot initialized with <a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a>. To propagate the parent plot to all the children of the hierarchy, the top level element then uses this function to pass the parent plot on to its child elements.</p>
  348. <p>The default implementation does nothing.</p>
  349. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a> </dd></dl>
  350. <p>Reimplemented in <a class="el" href="classQCPLegend.html#a4d552c63d82742d77fb7f177bae7b1ba">QCPLegend</a>, and <a class="el" href="classQCPLayoutElement.html#a1478899e80e8244b411e96ec3b2e5ce2">QCPLayoutElement</a>.</p>
  351. </div>
  352. </div>
  353. <a class="anchor" id="aa4035e586b7f317a06ba7e74e242a5ea"></a>
  354. <div class="memitem">
  355. <div class="memproto">
  356. <table class="mlabels">
  357. <tr>
  358. <td class="mlabels-left">
  359. <table class="memname">
  360. <tr>
  361. <td class="memname"><a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> QCPLayerable::selectionCategory </td>
  362. <td>(</td>
  363. <td class="paramname"></td><td>)</td>
  364. <td> const</td>
  365. </tr>
  366. </table>
  367. </td>
  368. <td class="mlabels-right">
  369. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  370. </tr>
  371. </table>
  372. </div><div class="memdoc">
  373. <p>Returns the selection category this layerable shall belong to. The selection category is used in conjunction with <a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> to control which objects are selectable and which aren't.</p>
  374. <p>Subclasses that don't fit any of the normal <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> values can use <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037af67a50bc26147a13b551b3a625374949">QCP::iSelectOther</a>. This is what the default implementation returns.</p>
  375. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> </dd></dl>
  376. <p>Reimplemented in <a class="el" href="classQCPAxis.html#aca53b2f365dfc1257cba9e62395aa68f">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a7a9795a28c9c2514b4ae50f0a63d407c">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#a777b5d384936396ad9c3ceb3d3453f1c">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#a5eef607bcc2aee8bfe2380a8710f6c64">QCPAbstractPlottable</a>, and <a class="el" href="classQCPAbstractLegendItem.html#a53a80054ab329beaca072fb08c08944b">QCPAbstractLegendItem</a>.</p>
  377. </div>
  378. </div>
  379. <a class="anchor" id="a07a8f746640c3704b09910df297afcba"></a>
  380. <div class="memitem">
  381. <div class="memproto">
  382. <table class="mlabels">
  383. <tr>
  384. <td class="mlabels-left">
  385. <table class="memname">
  386. <tr>
  387. <td class="memname">QRect QCPLayerable::clipRect </td>
  388. <td>(</td>
  389. <td class="paramname"></td><td>)</td>
  390. <td> const</td>
  391. </tr>
  392. </table>
  393. </td>
  394. <td class="mlabels-right">
  395. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  396. </tr>
  397. </table>
  398. </div><div class="memdoc">
  399. <p>Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent <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>. Specific subclasses may reimplement this function to provide different clipping rects.</p>
  400. <p>The returned clipping rect is set on the painter before the draw function of the respective object is called. </p>
  401. <p>Reimplemented in <a class="el" href="classQCPAbstractItem.html#a538e25ff8856534582f5b2b400a46405">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#ac01960b0827913922f5364d559c124ed">QCPAbstractPlottable</a>, and <a class="el" href="classQCPAbstractLegendItem.html#abcb540c331b49ef7ee0ea1abbd0dcac3">QCPAbstractLegendItem</a>.</p>
  402. </div>
  403. </div>
  404. <a class="anchor" id="afdf83ddc6a265cbf4c89fe99d3d93473"></a>
  405. <div class="memitem">
  406. <div class="memproto">
  407. <table class="mlabels">
  408. <tr>
  409. <td class="mlabels-left">
  410. <table class="memname">
  411. <tr>
  412. <td class="memname">void QCPLayerable::applyDefaultAntialiasingHint </td>
  413. <td>(</td>
  414. <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> *&#160;</td>
  415. <td class="paramname"><em>painter</em></td><td>)</td>
  416. <td> const</td>
  417. </tr>
  418. </table>
  419. </td>
  420. <td class="mlabels-right">
  421. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
  422. </tr>
  423. </table>
  424. </div><div class="memdoc">
  425. <p>This function applies the default antialiasing setting to the specified <em>painter</em>, using the function <a class="el" href="classQCPLayerable.html#a62bd552d1a45aa9accb24b310542279e">applyAntialiasingHint</a>. It is the antialiasing state the painter is put in, when <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.</p>
  426. <p><b>First example:</b> <a class="el" href="classQCPGraph.html" title="A plottable representing a graph in a plot. ">QCPGraph</a> has multiple entities that have an antialiasing setting: The graph line, fills, scatters and error bars. Those can be configured via <a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">QCPGraph::setAntialiased</a>, <a class="el" href="classQCPAbstractPlottable.html#a089d6b5577120239b55c39ed27c39536">QCPGraph::setAntialiasedFill</a>, <a class="el" href="classQCPAbstractPlottable.html#a2f03f067ede2ed4da6f7d0e4777a3f02">QCPGraph::setAntialiasedScatters</a> etc. Consequently, there isn't only the <a class="el" href="classQCPAbstractPlottable.html#a76e9d6cc7972dc1528f526d163766aca">QCPGraph::applyDefaultAntialiasingHint</a> function (which corresponds to the graph line's antialiasing), but specialized ones like <a class="el" href="classQCPAbstractPlottable.html#ac08a480155895e674dbfe5a5670e0ff3">QCPGraph::applyFillAntialiasingHint</a> and <a class="el" href="classQCPAbstractPlottable.html#a753272ee225a62827e90c3e1e78de4b1">QCPGraph::applyScattersAntialiasingHint</a>. So before drawing one of those entities, <a class="el" href="classQCPGraph.html#a659218cc62c2a7786213d9dd429c1c8d">QCPGraph::draw</a> calls the respective specialized applyAntialiasingHint function.</p>
  427. <p><b>Second example:</b> <a class="el" href="classQCPItemLine.html" title="A line from one point to another. ">QCPItemLine</a> consists only of a line so there is only one antialiasing setting which can be controlled with <a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">QCPItemLine::setAntialiased</a>. (This function is inherited by all layerables. The specialized functions, as seen on <a class="el" href="classQCPGraph.html" title="A plottable representing a graph in a plot. ">QCPGraph</a>, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal <a class="el" href="classQCPAbstractItem.html#a0839031abdd71067e2256a4d53c7a011">QCPItemLine::applyDefaultAntialiasingHint</a>. The <a class="el" href="classQCPItemLine.html#a1fc045dd33919f8006df0692aeb0e84a">QCPItemLine::draw</a> function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the <a class="el" href="classQCPLayerable.html#aecf2f7087482d4b6a78cb2770e5ed12d">draw</a> function is called, and that's the state it wants to draw the line with. </p>
  428. <p>Implemented in <a class="el" href="classQCPAxis.html#a13bde39eb1e0b7c14a02935689be8aba">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a26307f532c3458b379663b7d517a5f47">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#a0839031abdd71067e2256a4d53c7a011">QCPAbstractItem</a>, <a class="el" href="classQCPLayoutElement.html#ad6d2b4bb0291c2441b2e1ca3d5296df5">QCPLayoutElement</a>, <a class="el" href="classQCPAxisRect.html#a9a6dd0763701cbc7d01f899bcbb3f9ca">QCPAxisRect</a>, <a class="el" href="classQCPColorScale.html#a23d530c340c15d2fce6583e7120ee8bd">QCPColorScale</a>, <a class="el" href="classQCPAbstractPlottable.html#a76e9d6cc7972dc1528f526d163766aca">QCPAbstractPlottable</a>, <a class="el" href="classQCPAbstractLegendItem.html#a71c3baeda42ba78d2cccd97e74110a5e">QCPAbstractLegendItem</a>, <a class="el" href="classQCPPlotTitle.html#a0e2a491864bf8d8e8b159ef38e9d85bd">QCPPlotTitle</a>, and <a class="el" href="classQCPGrid.html#a9916f5e38b4d6cae446537aeb47c7272">QCPGrid</a>.</p>
  429. </div>
  430. </div>
  431. <a class="anchor" id="aecf2f7087482d4b6a78cb2770e5ed12d"></a>
  432. <div class="memitem">
  433. <div class="memproto">
  434. <table class="mlabels">
  435. <tr>
  436. <td class="mlabels-left">
  437. <table class="memname">
  438. <tr>
  439. <td class="memname">void QCPLayerable::draw </td>
  440. <td>(</td>
  441. <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> *&#160;</td>
  442. <td class="paramname"><em>painter</em></td><td>)</td>
  443. <td></td>
  444. </tr>
  445. </table>
  446. </td>
  447. <td class="mlabels-right">
  448. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
  449. </tr>
  450. </table>
  451. </div><div class="memdoc">
  452. <p>This function draws the layerable with the specified <em>painter</em>. It is only called by <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>, if the layerable is visible (<a class="el" href="classQCPLayerable.html#a3bed99ddc396b48ce3ebfdc0418744f8">setVisible</a>).</p>
  453. <p>Before this function is called, the painter's antialiasing state is set via <a class="el" href="classQCPLayerable.html#afdf83ddc6a265cbf4c89fe99d3d93473">applyDefaultAntialiasingHint</a>, see the documentation there. Further, the clipping rectangle was set to <a class="el" href="classQCPLayerable.html#a07a8f746640c3704b09910df297afcba">clipRect</a>. </p>
  454. <p>Implemented in <a class="el" href="classQCPAxis.html#a258b1e783eda5cd14ec5552c696a424e">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a4462151bf875ca85fa3815457c683fdc">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#ad0dc056f650c3ca73414e6b4f01674ef">QCPAbstractItem</a>, <a class="el" href="classQCPBars.html#a42b894e34dac799f90ff3700706b31df">QCPBars</a>, <a class="el" href="classQCPGraph.html#a659218cc62c2a7786213d9dd429c1c8d">QCPGraph</a>, <a class="el" href="classQCPColorMap.html#a3b0f45a3177be9522d5e9b8cd8ae122d">QCPColorMap</a>, <a class="el" href="classQCPLayoutElement.html#a547bcc1e6e2be5645ca781efe0834653">QCPLayoutElement</a>, <a class="el" href="classQCPFinancial.html#ad71a59a1b42616594831e04e52c92120">QCPFinancial</a>, <a class="el" href="classQCPAxisRect.html#afb1bbbbda8345cd2710d92ee48440b53">QCPAxisRect</a>, <a class="el" href="classQCPAbstractPlottable.html#acbab5e30dcd04fd302b4a5902ac2c482">QCPAbstractPlottable</a>, <a class="el" href="classQCPPlottableLegendItem.html#a68a781c3de4f9959fdf82075052d43aa">QCPPlottableLegendItem</a>, <a class="el" href="classQCPItemText.html#a8793adb271ab79b4cf391dc55e9987f1">QCPItemText</a>, <a class="el" href="classQCPCurve.html#a2361302d2fc6ec669849bd3bca00c4b2">QCPCurve</a>, <a class="el" href="classQCPItemTracer.html#aaaf49b48382c730ec9be0e74c2538315">QCPItemTracer</a>, <a class="el" href="classQCPStatisticalBox.html#a753b62761217dd6b92f8a29e286a1317">QCPStatisticalBox</a>, <a class="el" href="classQCPAbstractLegendItem.html#a97dedc084c672359710f16b31d046d1d">QCPAbstractLegendItem</a>, <a class="el" href="classQCPItemPixmap.html#a879e8076c2db01a38b34cfa73ec95d2f">QCPItemPixmap</a>, <a class="el" href="classQCPPlotTitle.html#ae4f1f8d24489628dabb7256363b097d2">QCPPlotTitle</a>, <a class="el" href="classQCPGrid.html#ad009c23f96078616aa4f66a750974b23">QCPGrid</a>, <a class="el" href="classQCPItemEllipse.html#afe97ec827adb05f000fe007783faae3c">QCPItemEllipse</a>, <a class="el" href="classQCPItemBracket.html#a8343cf0559c64886add7aa7f4b22f1a6">QCPItemBracket</a>, <a class="el" href="classQCPItemRect.html#a18cd583638b876cdd50f1a155ec182aa">QCPItemRect</a>, <a class="el" href="classQCPItemCurve.html#a56cb5b72cd02db2eda598274a39839a9">QCPItemCurve</a>, <a class="el" href="classQCPItemLine.html#a1fc045dd33919f8006df0692aeb0e84a">QCPItemLine</a>, and <a class="el" href="classQCPItemStraightLine.html#a2daa1e1253216c26565d56a2d5530170">QCPItemStraightLine</a>.</p>
  455. </div>
  456. </div>
  457. <a class="anchor" id="a7498c2d0d081cf7cad0fb3bb93aa0e91"></a>
  458. <div class="memitem">
  459. <div class="memproto">
  460. <table class="mlabels">
  461. <tr>
  462. <td class="mlabels-left">
  463. <table class="memname">
  464. <tr>
  465. <td class="memname">void QCPLayerable::selectEvent </td>
  466. <td>(</td>
  467. <td class="paramtype">QMouseEvent *&#160;</td>
  468. <td class="paramname"><em>event</em>, </td>
  469. </tr>
  470. <tr>
  471. <td class="paramkey"></td>
  472. <td></td>
  473. <td class="paramtype">bool&#160;</td>
  474. <td class="paramname"><em>additive</em>, </td>
  475. </tr>
  476. <tr>
  477. <td class="paramkey"></td>
  478. <td></td>
  479. <td class="paramtype">const QVariant &amp;&#160;</td>
  480. <td class="paramname"><em>details</em>, </td>
  481. </tr>
  482. <tr>
  483. <td class="paramkey"></td>
  484. <td></td>
  485. <td class="paramtype">bool *&#160;</td>
  486. <td class="paramname"><em>selectionStateChanged</em>&#160;</td>
  487. </tr>
  488. <tr>
  489. <td></td>
  490. <td>)</td>
  491. <td></td><td></td>
  492. </tr>
  493. </table>
  494. </td>
  495. <td class="mlabels-right">
  496. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  497. </tr>
  498. </table>
  499. </div><div class="memdoc">
  500. <p>This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing.</p>
  501. <p><em>event</em> is the mouse event that caused the selection. <em>additive</em> indicates, whether the user was holding the multi-select-modifier while performing the selection (see <a class="el" href="classQCustomPlot.html#a8fc96e3b5138a06759a2a90c166df516">QCustomPlot::setMultiSelectModifier</a>). if <em>additive</em> is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected).</p>
  502. <p>Every selectEvent is preceded by a call to <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent <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>). The <em>details</em> data you output from <a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a> is fed back via <em>details</em> here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually <em>details</em> is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like <a class="el" href="classQCPAxis.html" title="Manages a single axis inside a QCustomPlot. ">QCPAxis</a>). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked.</p>
  503. <p><em>selectionStateChanged</em> is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if <em>additive</em> is true, <em>selectionStateChanged</em> must also be set to true, because the selection toggles. If <em>additive</em> is false, <em>selectionStateChanged</em> is only set to true, if the layerable was previously unselected and now is switched to the selected state.</p>
  504. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>, <a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a> </dd></dl>
  505. <p>Reimplemented in <a class="el" href="classQCPAxis.html#aa8a5fe80e2898ec08ada26b5fbee9eca">QCPAxis</a>, <a class="el" href="classQCPLegend.html#af93bf87dc5c383a9d2ada80b35f3a1a5">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#aaf92af7b9893712959a6c073d334d88d">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#a16aaad02456aa23a759efd1ac90c79bf">QCPAbstractPlottable</a>, <a class="el" href="classQCPPlotTitle.html#a22672ef2abe442b1e73b7ee04cff9bdd">QCPPlotTitle</a>, and <a class="el" href="classQCPAbstractLegendItem.html#abcfe9e335d99c7fac74e03d26723c1b7">QCPAbstractLegendItem</a>.</p>
  506. </div>
  507. </div>
  508. <a class="anchor" id="ae546370644a5551c76af739afc008bee"></a>
  509. <div class="memitem">
  510. <div class="memproto">
  511. <table class="mlabels">
  512. <tr>
  513. <td class="mlabels-left">
  514. <table class="memname">
  515. <tr>
  516. <td class="memname">void QCPLayerable::deselectEvent </td>
  517. <td>(</td>
  518. <td class="paramtype">bool *&#160;</td>
  519. <td class="paramname"><em>selectionStateChanged</em></td><td>)</td>
  520. <td></td>
  521. </tr>
  522. </table>
  523. </td>
  524. <td class="mlabels-right">
  525. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  526. </tr>
  527. </table>
  528. </div><div class="memdoc">
  529. <p>This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to <a class="el" href="classQCustomPlot.html#a9d4808ab925b003054085246c92a257c">QCustomPlot::deselectAll</a>. Subclasses should react to it by unsetting their selection appropriately.</p>
  530. <p>just as in <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a>, the output parameter <em>selectionStateChanged</em> (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively.</p>
  531. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a>, <a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> </dd></dl>
  532. <p>Reimplemented in <a class="el" href="classQCPAxis.html#a53512242cde6ec21943a3ba10dbf78c3">QCPAxis</a>, <a class="el" href="classQCPLegend.html#a5208ead4331c9b0440f768f059777c58">QCPLegend</a>, <a class="el" href="classQCPAbstractItem.html#a91f090d6763cfedb0749219c63788ae9">QCPAbstractItem</a>, <a class="el" href="classQCPAbstractPlottable.html#a6fa0d0f95560ea8b01ee13f296dab2b1">QCPAbstractPlottable</a>, <a class="el" href="classQCPPlotTitle.html#ac6dfce05bebdb9bd0bfacd5ff02f3325">QCPPlotTitle</a>, and <a class="el" href="classQCPAbstractLegendItem.html#ae64e667e7c5b85cd92c9b91928faef28">QCPAbstractLegendItem</a>.</p>
  533. </div>
  534. </div>
  535. <a class="anchor" id="a8cbe5a0c9a5674249982f5ca5f8e02bc"></a>
  536. <div class="memitem">
  537. <div class="memproto">
  538. <table class="mlabels">
  539. <tr>
  540. <td class="mlabels-left">
  541. <table class="memname">
  542. <tr>
  543. <td class="memname">void QCPLayerable::initializeParentPlot </td>
  544. <td>(</td>
  545. <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> *&#160;</td>
  546. <td class="paramname"><em>parentPlot</em></td><td>)</td>
  547. <td></td>
  548. </tr>
  549. </table>
  550. </td>
  551. <td class="mlabels-right">
  552. <span class="mlabels"><span class="mlabel">protected</span></span> </td>
  553. </tr>
  554. </table>
  555. </div><div class="memdoc">
  556. <p>Sets the parent plot of this layerable. Use this function once to set the parent plot if you have passed 0 in the constructor. It can not be used to move a layerable from one <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> to another one.</p>
  557. <p>Note that, unlike when passing a non-null parent plot in the constructor, this function does not make <em>parentPlot</em> the QObject-parent of this layerable. If you want this, call QObject::setParent(<em>parentPlot</em>) in addition to this function.</p>
  558. <p>Further, you will probably want to set a layer (<a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a>) after calling this function, to make the layerable appear 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>.</p>
  559. <p>The parent plot change will be propagated to subclasses via a call to <a class="el" href="classQCPLayerable.html#ab20b7dbd8e0249ed61adb9622c427382">parentPlotInitialized</a> so they can react accordingly (e.g. also initialize the parent plot of child layerables, like <a class="el" href="classQCPLayout.html" title="The abstract base class for layouts. ">QCPLayout</a> does). </p>
  560. </div>
  561. </div>
  562. <a class="anchor" id="aa23c893671f1f6744ac235cf2204cf3a"></a>
  563. <div class="memitem">
  564. <div class="memproto">
  565. <table class="mlabels">
  566. <tr>
  567. <td class="mlabels-left">
  568. <table class="memname">
  569. <tr>
  570. <td class="memname">void QCPLayerable::setParentLayerable </td>
  571. <td>(</td>
  572. <td class="paramtype"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> *&#160;</td>
  573. <td class="paramname"><em>parentLayerable</em></td><td>)</td>
  574. <td></td>
  575. </tr>
  576. </table>
  577. </td>
  578. <td class="mlabels-right">
  579. <span class="mlabels"><span class="mlabel">protected</span></span> </td>
  580. </tr>
  581. </table>
  582. </div><div class="memdoc">
  583. <p>Sets the parent layerable of this layerable to <em>parentLayerable</em>. Note that <em>parentLayerable</em> does not become the QObject-parent (for memory management) of this layerable.</p>
  584. <p>The parent layerable has influence on the return value of the <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> method. Only layerables with a fully visible parent tree will return true for <a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a>, and thus be drawn.</p>
  585. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> </dd></dl>
  586. </div>
  587. </div>
  588. <a class="anchor" id="af94484cfb7cbbddb7de522e9be71d9a4"></a>
  589. <div class="memitem">
  590. <div class="memproto">
  591. <table class="mlabels">
  592. <tr>
  593. <td class="mlabels-left">
  594. <table class="memname">
  595. <tr>
  596. <td class="memname">bool QCPLayerable::moveToLayer </td>
  597. <td>(</td>
  598. <td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> *&#160;</td>
  599. <td class="paramname"><em>layer</em>, </td>
  600. </tr>
  601. <tr>
  602. <td class="paramkey"></td>
  603. <td></td>
  604. <td class="paramtype">bool&#160;</td>
  605. <td class="paramname"><em>prepend</em>&#160;</td>
  606. </tr>
  607. <tr>
  608. <td></td>
  609. <td>)</td>
  610. <td></td><td></td>
  611. </tr>
  612. </table>
  613. </td>
  614. <td class="mlabels-right">
  615. <span class="mlabels"><span class="mlabel">protected</span></span> </td>
  616. </tr>
  617. </table>
  618. </div><div class="memdoc">
  619. <p>Moves this layerable object to <em>layer</em>. If <em>prepend</em> is true, this object will be prepended to the new layer's list, i.e. it will be drawn below the objects already on the layer. If it is false, the object will be appended.</p>
  620. <p>Returns true on success, i.e. if <em>layer</em> is a valid layer. </p>
  621. </div>
  622. </div>
  623. <a class="anchor" id="a62bd552d1a45aa9accb24b310542279e"></a>
  624. <div class="memitem">
  625. <div class="memproto">
  626. <table class="mlabels">
  627. <tr>
  628. <td class="mlabels-left">
  629. <table class="memname">
  630. <tr>
  631. <td class="memname">void QCPLayerable::applyAntialiasingHint </td>
  632. <td>(</td>
  633. <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> *&#160;</td>
  634. <td class="paramname"><em>painter</em>, </td>
  635. </tr>
  636. <tr>
  637. <td class="paramkey"></td>
  638. <td></td>
  639. <td class="paramtype">bool&#160;</td>
  640. <td class="paramname"><em>localAntialiased</em>, </td>
  641. </tr>
  642. <tr>
  643. <td class="paramkey"></td>
  644. <td></td>
  645. <td class="paramtype"><a class="el" href="namespaceQCP.html#ae55dbe315d41fe80f29ba88100843a0c">QCP::AntialiasedElement</a>&#160;</td>
  646. <td class="paramname"><em>overrideElement</em>&#160;</td>
  647. </tr>
  648. <tr>
  649. <td></td>
  650. <td>)</td>
  651. <td></td><td> const</td>
  652. </tr>
  653. </table>
  654. </td>
  655. <td class="mlabels-right">
  656. <span class="mlabels"><span class="mlabel">protected</span></span> </td>
  657. </tr>
  658. </table>
  659. </div><div class="memdoc">
  660. <p>Sets the QCPainter::setAntialiasing state on the provided <em>painter</em>, depending on the <em>localAntialiased</em> value as well as the overrides <a class="el" href="classQCustomPlot.html#af6f91e5eab1be85f67c556e98c3745e8">QCustomPlot::setAntialiasedElements</a> and <a class="el" href="classQCustomPlot.html#ae10d685b5eabea2999fb8775ca173c24">QCustomPlot::setNotAntialiasedElements</a>. Which override enum this function takes into account is controlled via <em>overrideElement</em>. </p>
  661. </div>
  662. </div>
  663. <hr/>The documentation for this class was generated from the following files:<ul>
  664. <li>src/layer.h</li>
  665. <li>src/layer.cpp</li>
  666. </ul>
  667. </div><!-- contents -->
  668. </body>
  669. </html>