123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545 |
- <!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>QCPBarsGroup 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-types">Public Types</a> |
- <a href="#pub-methods">Public Functions</a> |
- <a href="#pro-methods">Protected Functions</a> </div>
- <div class="headertitle">
- <div class="title">QCPBarsGroup Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Groups multiple <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> together so they appear side by side.
- <a href="classQCPBarsGroup.html#details">More...</a></p>
- <p>Inherits QObject.</p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
- Public Types</h2></td></tr>
- <tr class="memitem:a4c0521120a97e60bbca37677a37075b6"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">SpacingType</a> </td></tr>
- <tr class="separator:a4c0521120a97e60bbca37677a37075b6"><td class="memSeparator" colspan="2"> </td></tr>
- </table><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:aa4e043b9a22c6c5ea0f93740aca063e1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#aa4e043b9a22c6c5ea0f93740aca063e1">QCPBarsGroup</a> (<a class="el" href="classQCustomPlot.html">QCustomPlot</a> *parentPlot)</td></tr>
- <tr class="separator:aa4e043b9a22c6c5ea0f93740aca063e1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1bb562f669d47bd7d3cdd2da1f7d8f00"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1bb562f669d47bd7d3cdd2da1f7d8f00"></a>
- <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">SpacingType</a> </td><td class="memItemRight" valign="bottom"><b>spacingType</b> () const </td></tr>
- <tr class="separator:a1bb562f669d47bd7d3cdd2da1f7d8f00"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a730bffefcac6c97aaf60e6f64dd3bcd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a730bffefcac6c97aaf60e6f64dd3bcd9"></a>
- double </td><td class="memItemRight" valign="bottom"><b>spacing</b> () const </td></tr>
- <tr class="separator:a730bffefcac6c97aaf60e6f64dd3bcd9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2c7e2d61b10594a4555b615e1fcaf49e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a2c7e2d61b10594a4555b615e1fcaf49e">setSpacingType</a> (<a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">SpacingType</a> spacingType)</td></tr>
- <tr class="separator:a2c7e2d61b10594a4555b615e1fcaf49e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa553d327479d72a0c3dafcc724a190e2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#aa553d327479d72a0c3dafcc724a190e2">setSpacing</a> (double spacing)</td></tr>
- <tr class="separator:aa553d327479d72a0c3dafcc724a190e2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7c72ed1f8cd962c93b8c42ab96cd91ec"><td class="memItemLeft" align="right" valign="top">QList< <a class="el" href="classQCPBars.html">QCPBars</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a> () const </td></tr>
- <tr class="separator:a7c72ed1f8cd962c93b8c42ab96cd91ec"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a72d022790b7c93151c95c28eefaf51b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPBars.html">QCPBars</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a72d022790b7c93151c95c28eefaf51b4">bars</a> (int index) const </td></tr>
- <tr class="separator:a72d022790b7c93151c95c28eefaf51b4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af07364189c5717a158ec95b609687532"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#af07364189c5717a158ec95b609687532">size</a> () const </td></tr>
- <tr class="separator:af07364189c5717a158ec95b609687532"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1d89da4e9176f4f77105e9a4afd44e2b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a1d89da4e9176f4f77105e9a4afd44e2b">isEmpty</a> () const </td></tr>
- <tr class="separator:a1d89da4e9176f4f77105e9a4afd44e2b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3ddf23928c6cd89530bd34ab7ba7b177"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a3ddf23928c6cd89530bd34ab7ba7b177">clear</a> ()</td></tr>
- <tr class="separator:a3ddf23928c6cd89530bd34ab7ba7b177"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adb4837894167e629e42e200db056fac3"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#adb4837894167e629e42e200db056fac3">contains</a> (<a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>) const </td></tr>
- <tr class="separator:adb4837894167e629e42e200db056fac3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a809ed63cc4ff7cd5b0b8c96b470163d3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a809ed63cc4ff7cd5b0b8c96b470163d3">append</a> (<a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>)</td></tr>
- <tr class="separator:a809ed63cc4ff7cd5b0b8c96b470163d3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a309a5f7233db189f3ea9c2d04ece6c13"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a309a5f7233db189f3ea9c2d04ece6c13">insert</a> (int i, <a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>)</td></tr>
- <tr class="separator:a309a5f7233db189f3ea9c2d04ece6c13"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a215e28a5944f1159013a0e19169220e7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a215e28a5944f1159013a0e19169220e7">remove</a> (<a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>)</td></tr>
- <tr class="separator:a215e28a5944f1159013a0e19169220e7"><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:a7b00514f19ad58d0bb3fd5246a67fae2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a7b00514f19ad58d0bb3fd5246a67fae2">registerBars</a> (<a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>)</td></tr>
- <tr class="separator:a7b00514f19ad58d0bb3fd5246a67fae2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac7073cdd7b1a40c6cb4b5f908145f8c4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#ac7073cdd7b1a40c6cb4b5f908145f8c4">unregisterBars</a> (<a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>)</td></tr>
- <tr class="separator:ac7073cdd7b1a40c6cb4b5f908145f8c4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8e2ca6002e7bab49670144d048a2bcc9"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a8e2ca6002e7bab49670144d048a2bcc9">keyPixelOffset</a> (const <a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>, double keyCoord)</td></tr>
- <tr class="separator:a8e2ca6002e7bab49670144d048a2bcc9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0beccd41bc3841a4c5b284823bc7d2de"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPBarsGroup.html#a0beccd41bc3841a4c5b284823bc7d2de">getPixelSpacing</a> (const <a class="el" href="classQCPBars.html">QCPBars</a> *<a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a>, double keyCoord)</td></tr>
- <tr class="separator:a0beccd41bc3841a4c5b284823bc7d2de"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Groups multiple <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> together so they appear side by side. </p>
- <div class="image">
- <img src="QCPBarsGroup.png" alt="QCPBarsGroup.png"/>
- </div>
- <p>When showing multiple <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> in one plot which have bars at identical keys, it may be desirable to have them appearing next to each other at each key. This is what adding the respective <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> plottables to a <a class="el" href="classQCPBarsGroup.html" title="Groups multiple QCPBars together so they appear side by side. ">QCPBarsGroup</a> achieves. (An alternative approach is to stack them on top of each other, see <a class="el" href="classQCPBars.html#ac22e00a6a41509538c21b04f0a57318c">QCPBars::moveAbove</a>.)</p>
- <h1><a class="anchor" id="qcpbarsgroup-usage"></a>
- Usage</h1>
- <p>To add a <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> plottable to the group, create a new group and then add the respective bars intances: </p>
- <div class="fragment"><div class="line"> <a class="code" href="classQCPBarsGroup.html">QCPBarsGroup</a> *group = <span class="keyword">new</span> <a class="code" href="classQCPBarsGroup.html#aa4e043b9a22c6c5ea0f93740aca063e1">QCPBarsGroup</a>(customPlot);</div>
- <div class="line"> group-><a class="code" href="classQCPBarsGroup.html#a809ed63cc4ff7cd5b0b8c96b470163d3">append</a>(bars1);</div>
- <div class="line"> group-><a class="code" href="classQCPBarsGroup.html#a809ed63cc4ff7cd5b0b8c96b470163d3">append</a>(bars2);</div>
- </div><!-- fragment --><p>Alternatively to appending to the group like shown above, you can also set the group on the <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> plottable via <a class="el" href="classQCPBars.html#aedd1709061f0b307c47ddb45e172ef9a">QCPBars::setBarsGroup</a>.</p>
- <p>The spacing between the bars can be configured via <a class="el" href="classQCPBarsGroup.html#a2c7e2d61b10594a4555b615e1fcaf49e">setSpacingType</a> and <a class="el" href="classQCPBarsGroup.html#aa553d327479d72a0c3dafcc724a190e2">setSpacing</a>. The bars in this group appear in the plot in the order they were appended. To insert a bars plottable at a certain index position, or to reposition a bars plottable which is already in the group, use <a class="el" href="classQCPBarsGroup.html#a309a5f7233db189f3ea9c2d04ece6c13">insert</a>.</p>
- <p>To remove specific bars from the group, use either <a class="el" href="classQCPBarsGroup.html#a215e28a5944f1159013a0e19169220e7">remove</a> or call <a class="el" href="classQCPBars.html#aedd1709061f0b307c47ddb45e172ef9a">QCPBars::setBarsGroup(0)</a> on the respective bars plottable.</p>
- <p>To clear the entire group, call <a class="el" href="classQCPBarsGroup.html#a3ddf23928c6cd89530bd34ab7ba7b177">clear</a>, or simply delete the group.</p>
- <h1><a class="anchor" id="qcpbarsgroup-example"></a>
- Example</h1>
- <p>The image above is generated with the following code: </p>
- <div class="fragment"><div class="line"> QVector<double> datax = QVector<double>() << 1 << 2 << 3 << 4;</div>
- <div class="line"> QVector<double> datay1 = QVector<double>() << 0.6 << 0.5 << 0.3 << 0.15;</div>
- <div class="line"> QVector<double> datay2 = QVector<double>() << 0.3 << 0.28 << 0.2 << 0.1;</div>
- <div class="line"> QVector<double> datay3 = QVector<double>() << 0.33 << 0.31 << 0.27 << 0.13;</div>
- <div class="line"> </div>
- <div class="line"> <a class="code" href="classQCPBarsGroup.html">QCPBarsGroup</a> *group1 = <span class="keyword">new</span> <a class="code" href="classQCPBarsGroup.html#aa4e043b9a22c6c5ea0f93740aca063e1">QCPBarsGroup</a>(customPlot);</div>
- <div class="line"> <a class="code" href="classQCPBars.html">QCPBars</a> *<a class="code" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars</a> = <span class="keyword">new</span> <a class="code" href="classQCPBars.html">QCPBars</a>(customPlot->xAxis, customPlot->yAxis);</div>
- <div class="line"> customPlot->addPlottable(bars);</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#aa3435aab19e0a49e4e7b41bd36a8d96b">setData</a>(datax, datay1);</div>
- <div class="line"> bars-><a class="code" href="classQCPAbstractPlottable.html#a7a4b92144dca6453a1f0f210e27edc74">setBrush</a>(QColor(0, 0, 255, 50));</div>
- <div class="line"> bars-><a class="code" href="classQCPAbstractPlottable.html#ab74b09ae4c0e7e13142fe4b5bf46cac7">setPen</a>(QColor(0, 0, 255));</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#afec6116579d44d5b706e0fa5e5332507">setWidth</a>(0.15);</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#aedd1709061f0b307c47ddb45e172ef9a">setBarsGroup</a>(group1);</div>
- <div class="line"> bars = <span class="keyword">new</span> <a class="code" href="classQCPBars.html">QCPBars</a>(customPlot->xAxis, customPlot->yAxis);</div>
- <div class="line"> customPlot->addPlottable(bars);</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#aa3435aab19e0a49e4e7b41bd36a8d96b">setData</a>(datax, datay2);</div>
- <div class="line"> bars-><a class="code" href="classQCPAbstractPlottable.html#a7a4b92144dca6453a1f0f210e27edc74">setBrush</a>(QColor(180, 00, 120, 50));</div>
- <div class="line"> bars-><a class="code" href="classQCPAbstractPlottable.html#ab74b09ae4c0e7e13142fe4b5bf46cac7">setPen</a>(QColor(180, 00, 120));</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#afec6116579d44d5b706e0fa5e5332507">setWidth</a>(0.15);</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#aedd1709061f0b307c47ddb45e172ef9a">setBarsGroup</a>(group1);</div>
- <div class="line"> bars = <span class="keyword">new</span> <a class="code" href="classQCPBars.html">QCPBars</a>(customPlot->xAxis, customPlot->yAxis);</div>
- <div class="line"> customPlot->addPlottable(bars);</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#aa3435aab19e0a49e4e7b41bd36a8d96b">setData</a>(datax, datay3);</div>
- <div class="line"> bars-><a class="code" href="classQCPAbstractPlottable.html#a7a4b92144dca6453a1f0f210e27edc74">setBrush</a>(QColor(255, 154, 0, 50));</div>
- <div class="line"> bars-><a class="code" href="classQCPAbstractPlottable.html#ab74b09ae4c0e7e13142fe4b5bf46cac7">setPen</a>(QColor(255, 154, 0));</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#afec6116579d44d5b706e0fa5e5332507">setWidth</a>(0.15);</div>
- <div class="line"> bars-><a class="code" href="classQCPBars.html#aedd1709061f0b307c47ddb45e172ef9a">setBarsGroup</a>(group1);</div>
- <div class="line"></div>
- <div class="line"> customPlot->xAxis->setRange(0.1, 4.9);</div>
- <div class="line"> customPlot->yAxis->setRange(0, 0.7);</div>
- <div class="line"> customPlot->xAxis->setAutoTickStep(<span class="keyword">false</span>);</div>
- <div class="line"> customPlot->xAxis->setTickStep(1);</div>
- </div><!-- fragment --></div><h2 class="groupheader">Member Enumeration Documentation</h2>
- <a class="anchor" id="a4c0521120a97e60bbca37677a37075b6"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">QCPBarsGroup::SpacingType</a></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Defines the ways the spacing between bars in the group can be specified. Thus it defines what the number passed to <a class="el" href="classQCPBarsGroup.html#aa553d327479d72a0c3dafcc724a190e2">setSpacing</a> actually means.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a2c7e2d61b10594a4555b615e1fcaf49e">setSpacingType</a>, <a class="el" href="classQCPBarsGroup.html#aa553d327479d72a0c3dafcc724a190e2">setSpacing</a> </dd></dl>
- <table class="fieldtable">
- <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a4c0521120a97e60bbca37677a37075b6ab53fa3efaf14867dd0f14d41d64e42ac"></a>stAbsolute</em> </td><td class="fielddoc">
- <p>Bar spacing is in absolute pixels. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a4c0521120a97e60bbca37677a37075b6ae94b05c27bc985dcdd8b1e1b7f163d26"></a>stAxisRectRatio</em> </td><td class="fielddoc">
- <p>Bar spacing is given by a fraction of the axis rect size. </p>
- </td></tr>
- <tr><td class="fieldname"><em><a class="anchor" id="a4c0521120a97e60bbca37677a37075b6ad369cee6287e0a86e8c2b643a3168c54"></a>stPlotCoords</em> </td><td class="fielddoc">
- <p>Bar spacing is in key coordinates and thus scales with the key axis range. </p>
- </td></tr>
- </table>
- </div>
- </div>
- <h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="aa4e043b9a22c6c5ea0f93740aca063e1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QCPBarsGroup::QCPBarsGroup </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>
- </div><div class="memdoc">
- <p>Constructs a new bars group for the specified <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> instance. </p>
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a2c7e2d61b10594a4555b615e1fcaf49e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::setSpacingType </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">SpacingType</a> </td>
- <td class="paramname"><em>spacingType</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets how the spacing between adjacent bars is interpreted. See <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">SpacingType</a>.</p>
- <p>The actual spacing can then be specified with <a class="el" href="classQCPBarsGroup.html#aa553d327479d72a0c3dafcc724a190e2">setSpacing</a>.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#aa553d327479d72a0c3dafcc724a190e2">setSpacing</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="aa553d327479d72a0c3dafcc724a190e2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::setSpacing </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>spacing</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets the spacing between adjacent bars. What the number passed as <em>spacing</em> actually means, is defined by the current <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6">SpacingType</a>, which can be set with <a class="el" href="classQCPBarsGroup.html#a2c7e2d61b10594a4555b615e1fcaf49e">setSpacingType</a>.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a2c7e2d61b10594a4555b615e1fcaf49e">setSpacingType</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a7c72ed1f8cd962c93b8c42ab96cd91ec"></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="classQCPBars.html">QCPBars</a> * > QCPBarsGroup::bars </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 all bars currently in this group.</p>
- <dl class="section see"><dt>See Also</dt><dd>bars(int index) </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a72d022790b7c93151c95c28eefaf51b4"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="classQCPBars.html">QCPBars</a> * QCPBarsGroup::bars </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>index</em></td><td>)</td>
- <td> const</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Returns the <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> instance with the specified <em>index</em> in this group. If no such <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> exists, returns 0.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a7c72ed1f8cd962c93b8c42ab96cd91ec">bars()</a>, <a class="el" href="classQCPBarsGroup.html#af07364189c5717a158ec95b609687532">size</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="af07364189c5717a158ec95b609687532"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int QCPBarsGroup::size </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 number of <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> plottables that are part of this group. </p>
- </div>
- </div>
- <a class="anchor" id="a1d89da4e9176f4f77105e9a4afd44e2b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">bool QCPBarsGroup::isEmpty </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 whether this bars group is empty.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#af07364189c5717a158ec95b609687532">size</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a3ddf23928c6cd89530bd34ab7ba7b177"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::clear </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes all <a class="el" href="classQCPBars.html" title="A plottable representing a bar chart in a plot. ">QCPBars</a> plottables from this group.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a1d89da4e9176f4f77105e9a4afd44e2b">isEmpty</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="adb4837894167e629e42e200db056fac3"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">bool QCPBarsGroup::contains </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</em></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 whether the specified <em>bars</em> plottable is part of this group. </p>
- </div>
- </div>
- <a class="anchor" id="a809ed63cc4ff7cd5b0b8c96b470163d3"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::append </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Adds the specified <em>bars</em> plottable to this group. Alternatively, you can also use <a class="el" href="classQCPBars.html#aedd1709061f0b307c47ddb45e172ef9a">QCPBars::setBarsGroup</a> on the <em>bars</em> instance.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a309a5f7233db189f3ea9c2d04ece6c13">insert</a>, <a class="el" href="classQCPBarsGroup.html#a215e28a5944f1159013a0e19169220e7">remove</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a309a5f7233db189f3ea9c2d04ece6c13"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::insert </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>i</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Inserts the specified <em>bars</em> plottable into this group at the specified index position <em>i</em>. This gives you full control over the ordering of the bars.</p>
- <p><em>bars</em> may already be part of this group. In that case, <em>bars</em> is just moved to the new index position.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a809ed63cc4ff7cd5b0b8c96b470163d3">append</a>, <a class="el" href="classQCPBarsGroup.html#a215e28a5944f1159013a0e19169220e7">remove</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a215e28a5944f1159013a0e19169220e7"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::remove </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes the specified <em>bars</em> plottable from this group.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#adb4837894167e629e42e200db056fac3">contains</a>, <a class="el" href="classQCPBarsGroup.html#a3ddf23928c6cd89530bd34ab7ba7b177">clear</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a7b00514f19ad58d0bb3fd5246a67fae2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::registerBars </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</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>Adds the specified <em>bars</em> to the internal mBars list of bars. This method does not change the barsGroup property on <em>bars</em>.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#ac7073cdd7b1a40c6cb4b5f908145f8c4">unregisterBars</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="ac7073cdd7b1a40c6cb4b5f908145f8c4"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void QCPBarsGroup::unregisterBars </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</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>Removes the specified <em>bars</em> from the internal mBars list of bars. This method does not change the barsGroup property on <em>bars</em>.</p>
- <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPBarsGroup.html#a7b00514f19ad58d0bb3fd5246a67fae2">registerBars</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="a8e2ca6002e7bab49670144d048a2bcc9"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double QCPBarsGroup::keyPixelOffset </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>keyCoord</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>Returns the pixel offset in the key dimension the specified <em>bars</em> plottable should have at the given key coordinate <em>keyCoord</em>. The offset is relative to the pixel position of the key coordinate <em>keyCoord</em>. </p>
- </div>
- </div>
- <a class="anchor" id="a0beccd41bc3841a4c5b284823bc7d2de"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double QCPBarsGroup::getPixelSpacing </td>
- <td>(</td>
- <td class="paramtype">const <a class="el" href="classQCPBars.html">QCPBars</a> * </td>
- <td class="paramname"><em>bars</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>keyCoord</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>Returns the spacing in pixels which is between this <em>bars</em> and the following one, both at the key coordinate <em>keyCoord</em>.</p>
- <dl class="section note"><dt>Note</dt><dd>Typically the returned value doesn't depend on <em>bars</em> or <em>keyCoord</em>. <em>bars</em> is only needed to get acces to the key axis transformation and axis rect for the modes <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6ae94b05c27bc985dcdd8b1e1b7f163d26">stAxisRectRatio</a> and <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6ad369cee6287e0a86e8c2b643a3168c54">stPlotCoords</a>. The <em>keyCoord</em> is only relevant for spacings given in <a class="el" href="classQCPBarsGroup.html#a4c0521120a97e60bbca37677a37075b6ad369cee6287e0a86e8c2b643a3168c54">stPlotCoords</a> on a logarithmic axis. </dd></dl>
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>src/plottables/<a class="el" href="plottable-bars_8h.html">plottable-bars.h</a></li>
- <li>src/plottables/plottable-bars.cpp</li>
- </ul>
- </div><!-- contents -->
- </body>
- </html>
|