123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta name="author" content="Emanuel Eichhammer" />
- <meta name="copyright" content="(C) 2013-2015 Emanuel Eichhammer" />
- <title>QCPLayerable Class Reference</title>
- <link href="qt.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div id="top">
- <a class="headerLink" href="index.html">Main Page</a> ·
- <a class="headerLink" href="classoverview.html">Class Overview</a> ·
- <a class="headerLink" href="hierarchy.html">Hierarchy</a> ·
- <a class="headerLink" href="annotated.html">All Classes</a> ·
- <a class="headerLink" href="pages.html">Special Pages</a>
- <!-- Generated by Doxygen 1.8.6 -->
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-methods">Public Functions</a> |
- <a href="#signals">Signals</a> |
- <a href="#pro-methods">Protected Functions</a> </div>
- <div class="headertitle">
- <div class="title">QCPLayerable Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Base class for all drawable objects.
- <a href="classQCPLayerable.html#details">More...</a></p>
- <div class="dynheader">
- Inheritance diagram for QCPLayerable:</div>
- <div class="dyncontent">
- <div class="center"><img src="classQCPLayerable__inherit__graph.png" border="0" usemap="#QCPLayerable_inherit__map" alt="Inheritance graph"/></div>
- <map name="QCPLayerable_inherit__map" id="QCPLayerable_inherit__map">
- <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-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>
- </div>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Functions</h2></td></tr>
- <tr class="memitem:a74c0fa237f29bf0e49565013fc5d1ec0"><td class="memItemLeft" align="right" valign="top"> </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>
- <tr class="separator:a74c0fa237f29bf0e49565013fc5d1ec0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a10a3cc92e0fa63e4a929e61d34e275a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10a3cc92e0fa63e4a929e61d34e275a7"></a>
- bool </td><td class="memItemRight" valign="bottom"><b>visible</b> () const </td></tr>
- <tr class="separator:a10a3cc92e0fa63e4a929e61d34e275a7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab7e0e94461566093d36ffc0f5312b109"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7e0e94461566093d36ffc0f5312b109"></a>
- <a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td><td class="memItemRight" valign="bottom"><b>parentPlot</b> () const </td></tr>
- <tr class="separator:ab7e0e94461566093d36ffc0f5312b109"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a98d79f5b716d45eac4347befe546d0ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a98d79f5b716d45eac4347befe546d0ec">parentLayerable</a> () const </td></tr>
- <tr class="separator:a98d79f5b716d45eac4347befe546d0ec"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aea67e8c19145e70d68c286a36f6b8300"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea67e8c19145e70d68c286a36f6b8300"></a>
- <a class="el" href="classQCPLayer.html">QCPLayer</a> * </td><td class="memItemRight" valign="bottom"><b>layer</b> () const </td></tr>
- <tr class="separator:aea67e8c19145e70d68c286a36f6b8300"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aef5cb4aa899ed9dc9384fd614560291e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef5cb4aa899ed9dc9384fd614560291e"></a>
- bool </td><td class="memItemRight" valign="bottom"><b>antialiased</b> () const </td></tr>
- <tr class="separator:aef5cb4aa899ed9dc9384fd614560291e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3bed99ddc396b48ce3ebfdc0418744f8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a3bed99ddc396b48ce3ebfdc0418744f8">setVisible</a> (bool on)</td></tr>
- <tr class="separator:a3bed99ddc396b48ce3ebfdc0418744f8"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab0d0da6d2de45a118886d2c8e16d5a54"><td class="memItemLeft" align="right" valign="top">Q_SLOT bool </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>
- <tr class="separator:ab0d0da6d2de45a118886d2c8e16d5a54"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab25a0e7b897993b44447caee0f142083"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ab25a0e7b897993b44447caee0f142083">setLayer</a> (const QString &layerName)</td></tr>
- <tr class="separator:ab25a0e7b897993b44447caee0f142083"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4fd43e89be4a553ead41652565ff0581"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4fd43e89be4a553ead41652565ff0581">setAntialiased</a> (bool enabled)</td></tr>
- <tr class="separator:a4fd43e89be4a553ead41652565ff0581"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4001c4d0dfec55598efa4d531f2179a9"><td class="memItemLeft" align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a4001c4d0dfec55598efa4d531f2179a9">selectTest</a> (const QPointF &pos, bool onlySelectable, QVariant *details=0) const </td></tr>
- <tr class="separator:a4001c4d0dfec55598efa4d531f2179a9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a30809f7455e9794bca7b6c737622fa63"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> () const </td></tr>
- <tr class="separator:a30809f7455e9794bca7b6c737622fa63"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
- Signals</h2></td></tr>
- <tr class="memitem:abbf8657cedea73ac1c3499b521c90eba"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="separator:abbf8657cedea73ac1c3499b521c90eba"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
- Protected Functions</h2></td></tr>
- <tr class="memitem:ab20b7dbd8e0249ed61adb9622c427382"><td class="memItemLeft" align="right" valign="top">virtual void </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>
- <tr class="separator:ab20b7dbd8e0249ed61adb9622c427382"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa4035e586b7f317a06ba7e74e242a5ea"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#aa4035e586b7f317a06ba7e74e242a5ea">selectionCategory</a> () const </td></tr>
- <tr class="separator:aa4035e586b7f317a06ba7e74e242a5ea"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a07a8f746640c3704b09910df297afcba"><td class="memItemLeft" align="right" valign="top">virtual QRect </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a07a8f746640c3704b09910df297afcba">clipRect</a> () const </td></tr>
- <tr class="separator:a07a8f746640c3704b09910df297afcba"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:afdf83ddc6a265cbf4c89fe99d3d93473"><td class="memItemLeft" align="right" valign="top">virtual void </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>
- <tr class="separator:afdf83ddc6a265cbf4c89fe99d3d93473"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aecf2f7087482d4b6a78cb2770e5ed12d"><td class="memItemLeft" align="right" valign="top">virtual void </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>
- <tr class="separator:aecf2f7087482d4b6a78cb2770e5ed12d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7498c2d0d081cf7cad0fb3bb93aa0e91"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#a7498c2d0d081cf7cad0fb3bb93aa0e91">selectEvent</a> (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)</td></tr>
- <tr class="separator:a7498c2d0d081cf7cad0fb3bb93aa0e91"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae546370644a5551c76af739afc008bee"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPLayerable.html#ae546370644a5551c76af739afc008bee">deselectEvent</a> (bool *selectionStateChanged)</td></tr>
- <tr class="separator:ae546370644a5551c76af739afc008bee"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8cbe5a0c9a5674249982f5ca5f8e02bc"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="separator:a8cbe5a0c9a5674249982f5ca5f8e02bc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa23c893671f1f6744ac235cf2204cf3a"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="separator:aa23c893671f1f6744ac235cf2204cf3a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af94484cfb7cbbddb7de522e9be71d9a4"><td class="memItemLeft" align="right" valign="top">bool </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>
- <tr class="separator:af94484cfb7cbbddb7de522e9be71d9a4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a62bd552d1a45aa9accb24b310542279e"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="separator:a62bd552d1a45aa9accb24b310542279e"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Base class for all drawable objects. </p>
- <p>This is the abstract base class most visible objects derive from, e.g. plottables, axes, grid etc.</p>
- <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>
- <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>
- </div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="a74c0fa237f29bf0e49565013fc5d1ec0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QCPLayerable::QCPLayerable </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td>
- <td class="paramname"><em>plot</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">QString </td>
- <td class="paramname"><em>targetLayer</em> = <code>QString()</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * </td>
- <td class="paramname"><em>parentLayerable</em> = <code>0</code> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Creates a new <a class="el" href="classQCPLayerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> instance.</p>
- <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>
- <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>
- <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>
- <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>
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a98d79f5b716d45eac4347befe546d0ec"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * QCPLayerable::parentLayerable </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="a3bed99ddc396b48ce3ebfdc0418744f8"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::setVisible </td>
- <td>(</td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>on</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- </div>
- </div>
- <a class="anchor" id="ab0d0da6d2de45a118886d2c8e16d5a54"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool QCPLayerable::setLayer </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> * </td>
- <td class="paramname"><em>layer</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <p>Returns true if the layer of this layerable was successfully changed to <em>layer</em>. </p>
- </div>
- </div>
- <a class="anchor" id="ab25a0e7b897993b44447caee0f142083"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool QCPLayerable::setLayer </td>
- <td>(</td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>layerName</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This is an overloaded function. Sets the layer of this layerable object by name</p>
- <p>Returns true on success, i.e. if <em>layerName</em> is a valid layer name. </p>
- </div>
- </div>
- <a class="anchor" id="a4fd43e89be4a553ead41652565ff0581"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::setAntialiased </td>
- <td>(</td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>enabled</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets whether this object will be drawn antialiased or not.</p>
- <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>
- </div>
- </div>
- <a class="anchor" id="a4001c4d0dfec55598efa4d531f2179a9"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double QCPLayerable::selectTest </td>
- <td>(</td>
- <td class="paramtype">const QPointF & </td>
- <td class="paramname"><em>pos</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>onlySelectable</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">QVariant * </td>
- <td class="paramname"><em>details</em> = <code>0</code> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td> const</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This function is used to decide whether a click hits a layerable object or not.</p>
- <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>
- <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>
- <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>
- <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>
- <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>
- <p>You may pass 0 as <em>details</em> to indicate that you are not interested in those selection details.</p>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="a30809f7455e9794bca7b6c737622fa63"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">bool QCPLayerable::realVisibility </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <p>If this layerable doesn't have a direct layerable parent, returns the state of this layerable's visibility. </p>
- </div>
- </div>
- <a class="anchor" id="abbf8657cedea73ac1c3499b521c90eba"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::layerChanged </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> * </td>
- <td class="paramname"><em>newLayer</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">signal</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>This signal is emitted when the layer of this layerable changes, i.e. this layerable is moved to a different layer.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">setLayer</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="ab20b7dbd8e0249ed61adb9622c427382"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::parentPlotInitialized </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td>
- <td class="paramname"><em>parentPlot</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <p>The default implementation does nothing.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a8cbe5a0c9a5674249982f5ca5f8e02bc">initializeParentPlot</a> </dd></dl>
- <p>Reimplemented in <a class="el" href="classQCPLegend.html#a4d552c63d82742d77fb7f177bae7b1ba">QCPLegend</a>, and <a class="el" href="classQCPLayoutElement.html#a1478899e80e8244b411e96ec3b2e5ce2">QCPLayoutElement</a>.</p>
- </div>
- </div>
- <a class="anchor" id="aa4035e586b7f317a06ba7e74e242a5ea"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="namespaceQCP.html#a2ad6bb6281c7c2d593d4277b44c2b037">QCP::Interaction</a> QCPLayerable::selectionCategory </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCustomPlot.html#a5ee1e2f6ae27419deca53e75907c27e5">QCustomPlot::setInteractions</a> </dd></dl>
- <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>
- </div>
- </div>
- <a class="anchor" id="a07a8f746640c3704b09910df297afcba"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QRect QCPLayerable::clipRect </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <p>The returned clipping rect is set on the painter before the draw function of the respective object is called. </p>
- <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>
- </div>
- </div>
- <a class="anchor" id="afdf83ddc6a265cbf4c89fe99d3d93473"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::applyDefaultAntialiasingHint </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
- <td class="paramname"><em>painter</em></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="aecf2f7087482d4b6a78cb2770e5ed12d"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::draw </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
- <td class="paramname"><em>painter</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="a7498c2d0d081cf7cad0fb3bb93aa0e91"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::selectEvent </td>
- <td>(</td>
- <td class="paramtype">QMouseEvent * </td>
- <td class="paramname"><em>event</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>additive</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QVariant & </td>
- <td class="paramname"><em>details</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool * </td>
- <td class="paramname"><em>selectionStateChanged</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="ae546370644a5551c76af739afc008bee"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::deselectEvent </td>
- <td>(</td>
- <td class="paramtype">bool * </td>
- <td class="paramname"><em>selectionStateChanged</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="a8cbe5a0c9a5674249982f5ca5f8e02bc"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::initializeParentPlot </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCustomPlot.html">QCustomPlot</a> * </td>
- <td class="paramname"><em>parentPlot</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <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>
- <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>
- </div>
- </div>
- <a class="anchor" id="aa23c893671f1f6744ac235cf2204cf3a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::setParentLayerable </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPLayerable.html">QCPLayerable</a> * </td>
- <td class="paramname"><em>parentLayerable</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <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>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPLayerable.html#a30809f7455e9794bca7b6c737622fa63">realVisibility</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="af94484cfb7cbbddb7de522e9be71d9a4"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">bool QCPLayerable::moveToLayer </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPLayer.html">QCPLayer</a> * </td>
- <td class="paramname"><em>layer</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>prepend</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- <p>Returns true on success, i.e. if <em>layer</em> is a valid layer. </p>
- </div>
- </div>
- <a class="anchor" id="a62bd552d1a45aa9accb24b310542279e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPLayerable::applyAntialiasingHint </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPPainter.html">QCPPainter</a> * </td>
- <td class="paramname"><em>painter</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">bool </td>
- <td class="paramname"><em>localAntialiased</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="namespaceQCP.html#ae55dbe315d41fe80f29ba88100843a0c">QCP::AntialiasedElement</a> </td>
- <td class="paramname"><em>overrideElement</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td> const</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">protected</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <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>
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>src/layer.h</li>
- <li>src/layer.cpp</li>
- </ul>
- </div><!-- contents -->
- </body>
- </html>
|