/usr/share/qt5/doc/qtcharts/qml-qtcharts-pieslice.html is in qtcharts5-doc-html 5.9.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | <?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.5 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">"eaten"</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">"not yet eaten"</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">"don't care"</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. 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">©</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>
|