/usr/share/qt5/doc/qtquickcontrols/qml-qtquick-controls-styles-gaugestyle.html is in qtquickcontrols5-doc-html 5.5.1-1ubuntu1.
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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- GaugeStyle.qml -->
<title>GaugeStyle QML Type | Qt Quick Controls 5.5</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.5</li>
<li><a href="qtquickcontrols-index.html">Qt Quick Controls</a></li>
<li><a href="qtquick-controls-qmlmodule.html">QML Types</a></li>
<li>GaugeStyle QML Type</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
</ul>
</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="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">GaugeStyle QML Type</h1>
<span class="subtitle"></span>
<!-- $$$GaugeStyle-brief -->
<p>Provides custom styling for Gauge. <a href="#details">More...</a></p>
<!-- @@@GaugeStyle -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick.Controls.Styles 1.4</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.5</td></tr></table></div><ul>
<li><a href="qml-qtquick-controls-styles-gaugestyle-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-qtquick-controls-styles-gaugestyle.html#background-prop">background</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#control-prop">control</a></b></b> : Gauge</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#foreground-prop">foreground</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#minorTickmark-prop">minorTickmark</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#tickmark-prop">tickmark</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#tickmarkLabel-prop">tickmarkLabel</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#valueBar-prop">valueBar</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-styles-gaugestyle.html#valuePosition-prop">valuePosition</a></b></b> : real</li>
</ul>
<!-- $$$GaugeStyle-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>You can create a custom gauge by replacing the following delegates:</p>
<ul>
<li><a href="qml-qtquick-controls-styles-gaugestyle.html#background-prop">background</a></li>
<li><a href="qml-qtquick-controls-styles-gaugestyle.html#valueBar-prop">valueBar</a></li>
<li><a href="qml-qtquick-controls-styles-gaugestyle.html#tickmarkLabel-prop">tickmarkLabel</a></li>
</ul>
<p>Below, you'll find an example of how to create a temperature gauge that changes color as its value increases:</p>
<pre class="cpp">import <span class="type"><a href="../qtqml/qtquick-qmlmodule.html">QtQuick</a></span> <span class="number">2.2</span>
import <span class="type"><a href="../qtqml/qtquick-qmlmodule.html">QtQuick</a></span><span class="operator">.</span>Controls <span class="number">1.4</span>
import <span class="type"><a href="../qtqml/qtquick-qmlmodule.html">QtQuick</a></span><span class="operator">.</span>Controls<span class="operator">.</span>Styles <span class="number">1.4</span>
import <span class="type"><a href="../qtqml/qtquick-qmlmodule.html">QtQuick</a></span><span class="operator">.</span>Extras <span class="number">1.4</span>
Rectangle {
width: <span class="number">80</span>
height: <span class="number">200</span>
Timer {
running: <span class="keyword">true</span>
repeat: <span class="keyword">true</span>
interval: <span class="number">2000</span>
onTriggered: gauge<span class="operator">.</span>value <span class="operator">=</span> gauge<span class="operator">.</span>value <span class="operator">=</span><span class="operator">=</span> gauge<span class="operator">.</span>maximumValue <span class="operator">?</span> <span class="number">5</span> : gauge<span class="operator">.</span>maximumValue
}
Gauge {
id: gauge
anchors<span class="operator">.</span>fill: parent
anchors<span class="operator">.</span>margins: <span class="number">10</span>
value: <span class="number">5</span>
Behavior on value {
NumberAnimation {
duration: <span class="number">1000</span>
}
}
style: GaugeStyle {
valueBar: Rectangle {
implicitWidth: <span class="number">16</span>
color: <span class="type"><a href="../qtcore/qt.html">Qt</a></span><span class="operator">.</span>rgba(gauge<span class="operator">.</span>value <span class="operator">/</span> gauge<span class="operator">.</span>maximumValue<span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">1</span> <span class="operator">-</span> gauge<span class="operator">.</span>value <span class="operator">/</span> gauge<span class="operator">.</span>maximumValue<span class="operator">,</span> <span class="number">1</span>)
}
}
}
}</pre>
<p class="centerAlign"><img src="images/gauge-temperature.png" alt="" /></p><p>The gauge displaying values at various points during the animation.</p>
<p><b>See also </b><a href="styling-gauge.html">Styling Gauge</a>.</p>
<!-- @@@GaugeStyle -->
<h2>Property Documentation</h2>
<!-- $$$background -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="background-prop"><td class="tblQmlPropNode"><p><a name="background-prop"></a><span class="name">background</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>The background of the gauge, displayed behind the <a href="qml-qtquick-controls-styles-gaugestyle.html#valueBar-prop">valueBar</a>.</p>
<p>By default, no background is defined.</p>
</div></div><!-- @@@background -->
<br/>
<!-- $$$control -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="control-prop"><td class="tblQmlPropNode"><p><a name="control-prop"></a><span class="qmlreadonly">read-only</span><span class="name">control</span> : <span class="type">Gauge</span></p></td></tr></table></div></div><div class="qmldoc"><p>The Gauge that this style is attached to.</p>
</div></div><!-- @@@control -->
<br/>
<!-- $$$foreground -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="foreground-prop"><td class="tblQmlPropNode"><p><a name="foreground-prop"></a><span class="name">foreground</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>The bar that represents the foreground of the gauge.</p>
<p>This component is drawn above every other component.</p>
</div></div><!-- @@@foreground -->
<br/>
<!-- $$$minorTickmark -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="minorTickmark-prop"><td class="tblQmlPropNode"><p><a name="minorTickmark-prop"></a><span class="name">minorTickmark</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>Each minor tickmark displayed by the gauge.</p>
<p>To set the size of the minor tickmarks, specify an <a href="../qtquick/qml-qtquick-item.html#implicitWidth-prop">implicitWidth</a> and <a href="../qtquick/qml-qtquick-item.html#implicitHeight-prop">implicitHeight</a>.</p>
<p>For layouting reasons, each minor tickmark should have the same <code>implicitHeight</code>. If different heights are needed for individual tickmarks, specify those heights in a child item of the component.</p>
<p>In the example below, we decrease the width of the minor tickmarks:</p>
<pre class="cpp">minorTickmark: Item {
implicitWidth: <span class="number">8</span>
implicitHeight: <span class="number">1</span>
Rectangle {
color: <span class="string">"#cccccc"</span>
anchors<span class="operator">.</span>fill: parent
anchors<span class="operator">.</span>leftMargin: <span class="number">2</span>
anchors<span class="operator">.</span>rightMargin: <span class="number">4</span>
}
}</pre>
<p class="centerAlign"><img src="images/gauge-minorTickmark-example.png" alt="Gauge minorTickmark example" /></p><p>Each instance of this component has access to the following property:</p>
<div class="table"><table class="generic">
<tr valign="top" class="odd"><td ><code>readonly property int</code> <b>styleData.index</b></td><td >The index of this minor tickmark.</td></tr>
<tr valign="top" class="even"><td ><code>readonly property real</code> <b>styleData.value</b></td><td >The value that this minor tickmark represents.</td></tr>
<tr valign="top" class="odd"><td ><code>readonly property real</code> <b>styleData.valuePosition</b></td><td >The value that this minor tickmark represents as a position in pixels, with 0 being at the bottom of the gauge.</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-controls-styles-gaugestyle.html#tickmark-prop">tickmark</a>.</p>
</div></div><!-- @@@minorTickmark -->
<br/>
<!-- $$$tickmark -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="tickmark-prop"><td class="tblQmlPropNode"><p><a name="tickmark-prop"></a><span class="name">tickmark</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>Each tickmark displayed by the gauge.</p>
<p>To set the size of the tickmarks, specify an <a href="../qtquick/qml-qtquick-item.html#implicitWidth-prop">implicitWidth</a> and <a href="../qtquick/qml-qtquick-item.html#implicitHeight-prop">implicitHeight</a>.</p>
<p>The widest tickmark will determine the space set aside for all tickmarks. For this reason, the <code>implicitWidth</code> of each tickmark should be greater than or equal to that of each minor tickmark. If you need minor tickmarks to have greater widths than the major tickmarks, set the larger width in a child item of the <a href="qml-qtquick-controls-styles-gaugestyle.html#minorTickmark-prop">minorTickmark</a> component.</p>
<p>For layouting reasons, each tickmark should have the same <code>implicitHeight</code>. If different heights are needed for individual tickmarks, specify those heights in a child item of the component.</p>
<p>In the example below, we decrease the height of the tickmarks:</p>
<pre class="cpp">tickmark: Item {
implicitWidth: <span class="number">18</span>
implicitHeight: <span class="number">1</span>
Rectangle {
color: <span class="string">"#c8c8c8"</span>
anchors<span class="operator">.</span>fill: parent
anchors<span class="operator">.</span>leftMargin: <span class="number">3</span>
anchors<span class="operator">.</span>rightMargin: <span class="number">3</span>
}
}</pre>
<p class="centerAlign"><img src="images/gauge-tickmark-example.png" alt="Gauge tickmark example" /></p><p>Each instance of this component has access to the following properties:</p>
<div class="table"><table class="generic">
<tr valign="top" class="odd"><td ><code>readonly property int</code> <b>styleData.index</b></td><td >The index of this tickmark.</td></tr>
<tr valign="top" class="even"><td ><code>readonly property real</code> <b>styleData.value</b></td><td >The value that this tickmark represents.</td></tr>
<tr valign="top" class="odd"><td ><code>readonly property real</code> <b>styleData.valuePosition</b></td><td >The value that this tickmark represents as a position in pixels, with 0 being at the bottom of the gauge.</td></tr>
</table></div>
<p><b>See also </b><a href="qml-qtquick-controls-styles-gaugestyle.html#minorTickmark-prop">minorTickmark</a>.</p>
</div></div><!-- @@@tickmark -->
<br/>
<!-- $$$tickmarkLabel -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="tickmarkLabel-prop"><td class="tblQmlPropNode"><p><a name="tickmarkLabel-prop"></a><span class="name">tickmarkLabel</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This defines the text of each tickmark label on the gauge.</p>
<p>Each instance of this component has access to the following properties:</p>
<div class="table"><table class="generic">
<tr valign="top" class="odd"><td ><code>readonly property int</code> <b>styleData.index</b></td><td >The index of this label.</td></tr>
<tr valign="top" class="even"><td ><code>readonly property real</code> <b>styleData.value</b></td><td >The value that this label represents.</td></tr>
</table></div>
</div></div><!-- @@@tickmarkLabel -->
<br/>
<!-- $$$valueBar -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="valueBar-prop"><td class="tblQmlPropNode"><p><a name="valueBar-prop"></a><span class="name">valueBar</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>The bar that represents the value of the gauge.</p>
<p>To height of the value bar is automatically resized according to value, and does not need to be specified.</p>
<p>When a custom valueBar is defined, its <a href="../qtquick/qml-qtquick-item.html#implicitWidth-prop">implicitWidth</a> property must be set.</p>
</div></div><!-- @@@valueBar -->
<br/>
<!-- $$$valuePosition -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="valuePosition-prop"><td class="tblQmlPropNode"><p><a name="valuePosition-prop"></a><span class="qmlreadonly">read-only</span><span class="name">valuePosition</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the value displayed by the gauge as a position in pixels.</p>
<p>It is useful for custom styling.</p>
</div></div><!-- @@@valuePosition -->
<br/>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2015 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>
|