123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <!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 http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.9.1"/>
- <title>My Project: QCPLayer Class Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { init_search(); });
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td style="padding-left: 0.5em;">
- <div id="projectname">My Project
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.9.1 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="pages.html"><span>Related Pages</span></a></li>
- <li><a href="namespaces.html"><span>Namespaces</span></a></li>
- <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="annotated.html"><span>Class List</span></a></li>
- <li><a href="classes.html"><span>Class Index</span></a></li>
- <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
- <li><a href="functions.html"><span>Class Members</span></a></li>
- </ul>
- </div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
-
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
-
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-methods">Public Member Functions</a> |
- <a href="#pro-methods">Protected Member Functions</a> |
- <a href="#pro-attribs">Protected Attributes</a> |
- <a href="#friends">Friends</a> |
- <a href="class_q_c_p_layer-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">QCPLayer Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
-
- <p>A layer that may contain objects, to control the rendering order.
- <a href="class_q_c_p_layer.html#details">More...</a></p>
- <div class="dynheader">
- Inheritance diagram for QCPLayer:</div>
- <div class="dyncontent">
- <div class="center">
- <img src="class_q_c_p_layer.png" usemap="#QCPLayer_map" alt=""/>
- <map id="QCPLayer_map" name="QCPLayer_map">
- </map>
- </div></div>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Member Functions</h2></td></tr>
- <tr class="memitem:a5d0657fc86d624e5efbe930ef21af718"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_layer.html#a5d0657fc86d624e5efbe930ef21af718">QCPLayer</a> (<a class="el" href="class_q_custom_plot.html">QCustomPlot</a> *parentPlot, const QString &layerName)</td></tr>
- <tr class="separator:a5d0657fc86d624e5efbe930ef21af718"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3958c9a938c2d05a7378c41484acee08"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3958c9a938c2d05a7378c41484acee08"></a>
- <a class="el" href="class_q_custom_plot.html">QCustomPlot</a> * </td><td class="memItemRight" valign="bottom"><b>parentPlot</b> () const </td></tr>
- <tr class="separator:a3958c9a938c2d05a7378c41484acee08"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a96ebd1e436f3813938cb9cd4a59a60be"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96ebd1e436f3813938cb9cd4a59a60be"></a>
- QString </td><td class="memItemRight" valign="bottom"><b>name</b> () const </td></tr>
- <tr class="separator:a96ebd1e436f3813938cb9cd4a59a60be"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad5d7010829a6b99f326b07d7e37c8c99"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_layer.html#ad5d7010829a6b99f326b07d7e37c8c99">index</a> () const </td></tr>
- <tr class="separator:ad5d7010829a6b99f326b07d7e37c8c99"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a94c2f0100e48cefad2de8fe0fbb03c27"><td class="memItemLeft" align="right" valign="top">QList< <a class="el" href="class_q_c_p_layerable.html">QCPLayerable</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_layer.html#a94c2f0100e48cefad2de8fe0fbb03c27">children</a> () const </td></tr>
- <tr class="separator:a94c2f0100e48cefad2de8fe0fbb03c27"><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 Member Functions</h2></td></tr>
- <tr class="memitem:a57ce5e49364aa9122276d5df3b4a0ddc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a57ce5e49364aa9122276d5df3b4a0ddc"></a>
- void </td><td class="memItemRight" valign="bottom"><b>addChild</b> (<a class="el" href="class_q_c_p_layerable.html">QCPLayerable</a> *layerable, bool prepend)</td></tr>
- <tr class="separator:a57ce5e49364aa9122276d5df3b4a0ddc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac2f64ac7761650582d968d86670ef362"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2f64ac7761650582d968d86670ef362"></a>
- void </td><td class="memItemRight" valign="bottom"><b>removeChild</b> (<a class="el" href="class_q_c_p_layerable.html">QCPLayerable</a> *layerable)</td></tr>
- <tr class="separator:ac2f64ac7761650582d968d86670ef362"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
- Protected Attributes</h2></td></tr>
- <tr class="memitem:a2f3374a7884bf403720cd1cf6f7ad1bb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f3374a7884bf403720cd1cf6f7ad1bb"></a>
- <a class="el" href="class_q_custom_plot.html">QCustomPlot</a> * </td><td class="memItemRight" valign="bottom"><b>mParentPlot</b></td></tr>
- <tr class="separator:a2f3374a7884bf403720cd1cf6f7ad1bb"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a91e6298183cb4b9dfd4efdfaf1ecc220"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91e6298183cb4b9dfd4efdfaf1ecc220"></a>
- QString </td><td class="memItemRight" valign="bottom"><b>mName</b></td></tr>
- <tr class="separator:a91e6298183cb4b9dfd4efdfaf1ecc220"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a122088bcab6cec76a52b75ce8606605b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a122088bcab6cec76a52b75ce8606605b"></a>
- int </td><td class="memItemRight" valign="bottom"><b>mIndex</b></td></tr>
- <tr class="separator:a122088bcab6cec76a52b75ce8606605b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a704aa71bba469383c3a3c598c1ec0d28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a704aa71bba469383c3a3c598c1ec0d28"></a>
- QList< <a class="el" href="class_q_c_p_layerable.html">QCPLayerable</a> * > </td><td class="memItemRight" valign="bottom"><b>mChildren</b></td></tr>
- <tr class="separator:a704aa71bba469383c3a3c598c1ec0d28"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
- Friends</h2></td></tr>
- <tr class="memitem:a1cdf9df76adcfae45261690aa0ca2198"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1cdf9df76adcfae45261690aa0ca2198"></a>
- class </td><td class="memItemRight" valign="bottom"><b>QCustomPlot</b></td></tr>
- <tr class="separator:a1cdf9df76adcfae45261690aa0ca2198"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad655f55cccf49ba14d5172ec517e07ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad655f55cccf49ba14d5172ec517e07ae"></a>
- class </td><td class="memItemRight" valign="bottom"><b>QCPLayerable</b></td></tr>
- <tr class="separator:ad655f55cccf49ba14d5172ec517e07ae"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>A layer that may contain objects, to control the rendering order. </p>
- <p>The Layering system of <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> is the mechanism to control the rendering order of the elements inside the plot.</p>
- <p>It is based on the two classes <a class="el" href="class_q_c_p_layer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a> and <a class="el" href="class_q_c_p_layerable.html" title="Base class for all drawable objects. ">QCPLayerable</a>. <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> holds an ordered list of one or more instances of <a class="el" href="class_q_c_p_layer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a> (see <a class="el" href="class_q_custom_plot.html#ad5255393df078448bb6ac83fa5db5f52">QCustomPlot::addLayer</a>, <a class="el" href="class_q_custom_plot.html#aac492da01782820454e9136a8db28182">QCustomPlot::layer</a>, <a class="el" href="class_q_custom_plot.html#ae896140beff19424e9e9e02d6e331104">QCustomPlot::moveLayer</a>, etc.). When replotting, <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> goes through the list of layers bottom to top and successively draws the layerables of the layers.</p>
- <p>A <a class="el" href="class_q_c_p_layer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a> contains an ordered list of <a class="el" href="class_q_c_p_layerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> instances. <a class="el" href="class_q_c_p_layerable.html" title="Base class for all drawable objects. ">QCPLayerable</a> is an abstract base class from which almost all visible objects derive, like axes, grids, graphs, items, etc.</p>
- <p>Initially, <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a> has five layers: "background", "grid", "main", "axes" and "legend" (in that order). The top two layers "axes" and "legend" contain the default axes and legend, so they will be drawn on top. In the middle, there is the "main" layer. It is initially empty and set as the current layer (see <a class="el" href="class_q_custom_plot.html#a73a6dc47c653bb6f8f030abca5a11852">QCustomPlot::setCurrentLayer</a>). This means, all new plottables, items etc. are created on this layer by default. Then comes the "grid" layer which contains the <a class="el" href="class_q_c_p_grid.html" title="Responsible for drawing the grid of a QCPAxis. ">QCPGrid</a> instances (which belong tightly to <a class="el" href="class_q_c_p_axis.html" title="Manages a single axis inside a QCustomPlot. ">QCPAxis</a>, see <a class="el" href="class_q_c_p_axis.html#ac4fb913cce3072b5e75a4635e0f6cd04">QCPAxis::grid</a>). The Axis rect background shall be drawn behind everything else, thus the default <a class="el" href="class_q_c_p_axis_rect.html" title="Holds multiple axes and arranges them in a rectangular shape. ">QCPAxisRect</a> instance is placed on the "background" layer. Of course, the layer affiliation of the individual objects can be changed as required (<a class="el" href="class_q_c_p_layerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">QCPLayerable::setLayer</a>).</p>
- <p>Controlling the ordering of objects is easy: Create a new layer in the position you want it to be, e.g. above "main", with <a class="el" href="class_q_custom_plot.html#ad5255393df078448bb6ac83fa5db5f52">QCustomPlot::addLayer</a>. Then set the current layer with <a class="el" href="class_q_custom_plot.html#a73a6dc47c653bb6f8f030abca5a11852">QCustomPlot::setCurrentLayer</a> to that new layer and finally create the objects normally. They will be placed on the new layer automatically, due to the current layer setting. Alternatively you could have also ignored the current layer setting and just moved the objects with <a class="el" href="class_q_c_p_layerable.html#ab0d0da6d2de45a118886d2c8e16d5a54">QCPLayerable::setLayer</a> to the desired layer after creating them.</p>
- <p>It is also possible to move whole layers. For example, If you want the grid to be shown in front of all plottables/items on the "main" layer, just move it above "main" with <a class="el" href="class_q_custom_plot.html#ae896140beff19424e9e9e02d6e331104">QCustomPlot::moveLayer</a>.</p>
- <p>The rendering order within one layer is simply by order of creation or insertion. The item created last (or added last to the layer), is drawn on top of all other objects on that layer.</p>
- <p>When a layer is deleted, the objects on it are not deleted with it, but fall on the layer below the deleted layer, see <a class="el" href="class_q_custom_plot.html#a40f75e342c5eaab6a86066a42a0e2a94">QCustomPlot::removeLayer</a>. </p>
- </div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="a5d0657fc86d624e5efbe930ef21af718"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QCPLayer::QCPLayer </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="class_q_custom_plot.html">QCustomPlot</a> * </td>
- <td class="paramname"><em>parentPlot</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>layerName</em> </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="class_q_c_p_layer.html" title="A layer that may contain objects, to control the rendering order. ">QCPLayer</a> instance.</p>
- <p>Normally you shouldn't directly instantiate layers, use <a class="el" href="class_q_custom_plot.html#ad5255393df078448bb6ac83fa5db5f52">QCustomPlot::addLayer</a> instead.</p>
- <dl class="section warning"><dt>Warning</dt><dd>It is not checked that <em>layerName</em> is actually a unique layer name in <em>parentPlot</em>. This check is only performed by <a class="el" href="class_q_custom_plot.html#ad5255393df078448bb6ac83fa5db5f52">QCustomPlot::addLayer</a>. </dd></dl>
-
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a94c2f0100e48cefad2de8fe0fbb03c27"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QList< <a class="el" href="class_q_c_p_layerable.html">QCPLayerable</a> * > QCPLayer::children </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 a list of all layerables on this layer. The order corresponds to the rendering order: layerables with higher indices are drawn above layerables with lower indices. </p>
-
- </div>
- </div>
- <a class="anchor" id="ad5d7010829a6b99f326b07d7e37c8c99"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int QCPLayer::index </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 index this layer has in the <a class="el" href="class_q_custom_plot.html" title="The central class of the library. This is the QWidget which displays the plot and interacts with the ...">QCustomPlot</a>. The index is the integer number by which this layer can be accessed via <a class="el" href="class_q_custom_plot.html#aac492da01782820454e9136a8db28182">QCustomPlot::layer</a>.</p>
- <p>Layers with higher indices will be drawn above layers with lower indices. </p>
-
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li><a class="el" href="qcustomplot_8h_source.html">qcustomplot.h</a></li>
- <li><a class="el" href="qcustomplot_8cpp.html">qcustomplot.cpp</a></li>
- </ul>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Tue Aug 11 2015 13:04:52 for My Project by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.9.1
- </small></address>
- </body>
- </html>
|