Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 19952c5e751bf7e3108c3c59625b0f35 > files > 214

qtcharts5-doc-5.9.4-1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qpieslice.cpp -->
  <title>PieSlice QML Type | Qt Charts 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcharts-index.html">Qt Charts</a></td><td ><a href="qtcharts-qmlmodule.html">QML Types</a></td><td >PieSlice QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">PieSlice QML Type</h1>
<span class="subtitle"></span>
<!-- $$$PieSlice-brief -->
<p>Represents a single slice in a pie series. <a href="#details">More...</a></p>
<!-- @@@PieSlice -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtCharts 2.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="qml-qtcharts-pieslice.html"><a href="qpieslice.html">QPieSlice</a></td></tr></table></div><ul>
<li><a href="qml-qtcharts-pieslice-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#angleSpan-prop">angleSpan</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#borderColor-prop">borderColor</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#borderWidth-prop">borderWidth</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#brushFilename-prop">brushFilename</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#color-prop">color</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#explodeDistanceFactor-prop">explodeDistanceFactor</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#exploded-prop">exploded</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#label-prop">label</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#labelArmLengthFactor-prop">labelArmLengthFactor</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#labelColor-prop">labelColor</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#labelFont-prop">labelFont</a></b></b> : font</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#labelPosition-prop">labelPosition</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#labelVisible-prop">labelVisible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#percentage-prop">percentage</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#startAngle-prop">startAngle</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#value-prop">value</a></b></b> : real</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#clicked-signal">clicked</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#doubleClicked-signal">doubleClicked</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#hovered-signal">hovered</a></b></b>(bool <i>state</i>)</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#pressed-signal">pressed</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtcharts-pieslice.html#released-signal">released</a></b></b>()</li>
</ul>
<!-- $$$PieSlice-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>A pie slice has a value and a label. When the slice is added to a pie series, the <a href="qml-qtcharts-pieseries.html">PieSeries</a> type calculates the percentage of the slice compared with the sum of all slices in the series to determine the actual size of the slice in the chart.</p>
<p>By default, the label is hidden. If it is visible, it can be either located outside the slice and connected to it with an arm or centered inside the slice either horizontally or in parallel with the tangential or normal of the slice's arc.</p>
<p>By default, the visual appearance of the slice is set by a theme, but the theme can be overridden by specifying slice properties. However, if the theme is changed after the slices are customized, all customization will be lost.</p>
<p>The <a href="qml-qtcharts-pieslice.html">PieSlice</a> type should be used as a child of a <a href="qml-qtcharts-pieseries.html">PieSeries</a> type. For example:</p>
<pre class="qml">

      <span class="type"><a href="qml-qtcharts-pieseries.html">PieSeries</a></span> {
          <span class="name">id</span>: <span class="name">pieSeries</span>
          <span class="type"><a href="qml-qtcharts-pieslice.html">PieSlice</a></span> { <span class="name">label</span>: <span class="string">&quot;eaten&quot;</span>; <span class="name">value</span>: <span class="number">94.9</span> }
          <span class="type"><a href="qml-qtcharts-pieslice.html">PieSlice</a></span> { <span class="name">label</span>: <span class="string">&quot;not yet eaten&quot;</span>; <span class="name">value</span>: <span class="number">5.1</span> }
      }

</pre>
<p>Alternatively, slices can be added to a pie series by using the <a href="qml-qtcharts-pieseries.html#append-method">PieSeries.append()</a> method.</p>
<pre class="qml">

  <span class="name">pieSeries</span>.<span class="name">append</span>(<span class="string">&quot;don't care&quot;</span>, <span class="number">1.1</span>);

</pre>
<p>In that case, <a href="qml-qtcharts-pieseries.html#at-method">PieSeries.at()</a> or <a href="qml-qtcharts-pieseries.html#find-method">PieSeries.find</a> can be used to access the properties of an individual <a href="qml-qtcharts-pieslice.html">PieSlice</a> instance.</p>
<pre class="qml">

  <span class="name">pieSeries</span>.<span class="name">at</span>(<span class="number">0</span>).<span class="name">exploded</span> <span class="operator">=</span> <span class="number">true</span>;

</pre>
<p><b>See also </b><a href="qml-qtcharts-pieseries.html">PieSeries</a>.</p>
<!-- @@@PieSlice -->
<h2>Property Documentation</h2>
<!-- $$$angleSpan -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="angleSpan-prop">
<td class="tblQmlPropNode"><p>
<a name="angleSpan-prop"></a><span class="name">angleSpan</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The span of the slice in degrees. A full pie is 360 degrees, where 0 degrees is at 12 a'clock. Updated automatically once the slice is added to the series.</p>
</div></div><!-- @@@angleSpan -->
<br/>
<!-- $$$borderColor -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="borderColor-prop">
<td class="tblQmlPropNode"><p>
<a name="borderColor-prop"></a><span class="name">borderColor</span> : <span class="type">color</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The color used to draw the slice border (pen color).</p>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#borderWidth-prop">borderWidth</a>.</p>
</div></div><!-- @@@borderColor -->
<br/>
<!-- $$$borderWidth -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="borderWidth-prop">
<td class="tblQmlPropNode"><p>
<a name="borderWidth-prop"></a><span class="name">borderWidth</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The width of the slice border. This is a convenience property for modifying the slice pen.</p>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#borderColor-prop">borderColor</a>.</p>
</div></div><!-- @@@borderWidth -->
<br/>
<!-- $$$brushFilename -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="brushFilename-prop">
<td class="tblQmlPropNode"><p>
<a name="brushFilename-prop"></a><span class="name">brushFilename</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The name of the file used as a brush for the slice.</p>
</div></div><!-- @@@brushFilename -->
<br/>
<!-- $$$color -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="color-prop">
<td class="tblQmlPropNode"><p>
<a name="color-prop"></a><span class="name">color</span> : <span class="type">color</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The fill (brush) color of the slice.</p>
</div></div><!-- @@@color -->
<br/>
<!-- $$$explodeDistanceFactor -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="explodeDistanceFactor-prop">
<td class="tblQmlPropNode"><p>
<a name="explodeDistanceFactor-prop"></a><span class="name">explodeDistanceFactor</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Determines how far away from the pie the slice is exploded.</p>
<ul>
<li>1.0 means that the distance is the same as the radius.</li>
<li>0.5 means that the distance is half of the radius.</li>
</ul>
<p>By default, the distance is 0.15</p>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#exploded-prop">exploded</a>.</p>
</div></div><!-- @@@explodeDistanceFactor -->
<br/>
<!-- $$$exploded -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="exploded-prop">
<td class="tblQmlPropNode"><p>
<a name="exploded-prop"></a><span class="name">exploded</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Whether the slice is separated from the pie.</p>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#explodeDistanceFactor-prop">explodeDistanceFactor</a>.</p>
</div></div><!-- @@@exploded -->
<br/>
<!-- $$$label -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="label-prop">
<td class="tblQmlPropNode"><p>
<a name="label-prop"></a><span class="name">label</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The label of the slice.</p>
</div></div><!-- @@@label -->
<br/>
<!-- $$$labelArmLengthFactor -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="labelArmLengthFactor-prop">
<td class="tblQmlPropNode"><p>
<a name="labelArmLengthFactor-prop"></a><span class="name">labelArmLengthFactor</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The length of the label arm. The factor is relative to the pie radius. For example:</p>
<ul>
<li>1.0 means that the length is the same as the radius.</li>
<li>0.5 means that the length is half of the radius.</li>
</ul>
<p>By default, the arm length is 0.15</p>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#labelVisible-prop">labelVisible</a>.</p>
</div></div><!-- @@@labelArmLengthFactor -->
<br/>
<!-- $$$labelColor -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="labelColor-prop">
<td class="tblQmlPropNode"><p>
<a name="labelColor-prop"></a><span class="name">labelColor</span> : <span class="type">color</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The color used to draw the slice label.</p>
</div></div><!-- @@@labelColor -->
<br/>
<!-- $$$labelFont -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="labelFont-prop">
<td class="tblQmlPropNode"><p>
<a name="labelFont-prop"></a><span class="name">labelFont</span> : <span class="type">font</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The font used for the slice label.</p>
<p>For more information, see font.</p>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#labelVisible-prop">labelVisible</a> and <a href="qml-qtcharts-pieslice.html#labelPosition-prop">labelPosition</a>.</p>
</div></div><!-- @@@labelFont -->
<br/>
<!-- $$$labelPosition -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="labelPosition-prop">
<td class="tblQmlPropNode"><p>
<a name="labelPosition-prop"></a><span class="name">labelPosition</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Describes the position of the slice label.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>PieSlice.LabelOutside</code></td><td class="topAlign">The label is located outside the slice connected to it with an arm. This is the default value.</td></tr>
<tr><td class="topAlign"><code>PieSlice.LabelInsideHorizontal</code></td><td class="topAlign">The label is centered within the slice and laid out horizontally.</td></tr>
<tr><td class="topAlign"><code>PieSlice.LabelInsideTangential</code></td><td class="topAlign">The label is centered within the slice and rotated to be parallel with the tangential of the slice's arc.</td></tr>
<tr><td class="topAlign"><code>PieSlice.LabelInsideNormal</code></td><td class="topAlign">The label is centered within the slice and rotated to be parallel with the normal of the slice's arc.</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtcharts-pieslice.html#labelVisible-prop">labelVisible</a>.</p>
</div></div><!-- @@@labelPosition -->
<br/>
<!-- $$$labelVisible -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="labelVisible-prop">
<td class="tblQmlPropNode"><p>
<a name="labelVisible-prop"></a><span class="name">labelVisible</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The visibility of the slice label. By default, the label is not visible.</p>
</div></div><!-- @@@labelVisible -->
<br/>
<!-- $$$percentage -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="percentage-prop">
<td class="tblQmlPropNode"><p>
<a name="percentage-prop"></a><span class="name">percentage</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The percentage of the slice compared to the sum of all slices in the series. The actual value ranges from 0.0 to 1.0&#x2e; Updated automatically once the slice is added to the series.</p>
</div></div><!-- @@@percentage -->
<br/>
<!-- $$$startAngle -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="startAngle-prop">
<td class="tblQmlPropNode"><p>
<a name="startAngle-prop"></a><span class="name">startAngle</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The starting angle of this slice in the series it belongs to. A full pie is 360 degrees, where 0 degrees is at 12 a'clock. Updated automatically once the slice is added to the series.</p>
</div></div><!-- @@@startAngle -->
<br/>
<!-- $$$value -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="value-prop">
<td class="tblQmlPropNode"><p>
<a name="value-prop"></a><span class="name">value</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>The value of the slice.</p>
<p><b>Note: </b>A negative value is converted to a positive value.</p></div></div><!-- @@@value -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$clicked -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="clicked-signal">
<td class="tblQmlFuncNode"><p>
<a name="clicked-signal"></a><span class="name">clicked</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the slice is clicked.</p>
<p>The corresponding signal handler is <code>onClicked()</code>.</p>
</div></div><!-- @@@clicked -->
<br/>
<!-- $$$doubleClicked -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="doubleClicked-signal">
<td class="tblQmlFuncNode"><p>
<a name="doubleClicked-signal"></a><span class="name">doubleClicked</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when user double-clicks the slice.</p>
<p>The corresponding signal handler is <code>onDoubleClicked()</code>.</p>
</div></div><!-- @@@doubleClicked -->
<br/>
<!-- $$$hovered -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="hovered-signal">
<td class="tblQmlFuncNode"><p>
<a name="hovered-signal"></a><span class="name">hovered</span>(<span class="type">bool</span> <i>state</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when a mouse is hovered over the slice. When the mouse moves over the slice, <i>state</i> turns <code>true</code>, and when the mouse moves away again, it turns <code>false</code>.</p>
<p>The corresponding signal handler is <code>onHovered()</code>.</p>
</div></div><!-- @@@hovered -->
<br/>
<!-- $$$pressed -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="pressed-signal">
<td class="tblQmlFuncNode"><p>
<a name="pressed-signal"></a><span class="name">pressed</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when user clicks the slice and holds down the mouse button.</p>
<p>The corresponding signal handler is <code>onPressed()</code>.</p>
</div></div><!-- @@@pressed -->
<br/>
<!-- $$$released -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="released-signal">
<td class="tblQmlFuncNode"><p>
<a name="released-signal"></a><span class="name">released</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the user releases the mouse press on the slice.</p>
<p>The corresponding signal handler is <code>onReleased()</code>.</p>
</div></div><!-- @@@released -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>