This file is indexed.

/usr/share/qt5/doc/qtquick/qml-qtquick-propertychanges.html is in qtdeclarative5-doc-html 5.2.1-3ubuntu15.

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
<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickpropertychanges.cpp -->
  <title>PropertyChanges | QtQuick 5.2</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.2</li>
<li><a href="qtquick-index.html">Qt Quick</a></li>
<li><a href="qtquick-qmltypereference.html">QML Types</a></li>
<li>PropertyChanges</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<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>
<li class="level2"><a href="#resetting-property-values">Resetting property values</a></li>
<li class="level2"><a href="#immediate-property-changes-in-transitions">Immediate property changes in transitions</a></li>
</ul>
</div>
<h1 class="title">PropertyChanges</h1>
<span class="subtitle"></span>
<!-- $$$PropertyChanges-brief -->
<p>Describes new property bindings or values for a state <a href="#details">More...</a></p>
<!-- @@@PropertyChanges -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtQuick 2.2</tt></td></tr></table><ul>
<li><a href="qml-qtquick-propertychanges-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-propertychanges.html#explicit-prop">explicit</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-propertychanges.html#restoreEntryValues-prop">restoreEntryValues</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-propertychanges.html#target-prop">target</a></b></b> : Object</li>
</ul>
<!-- $$$PropertyChanges-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>PropertyChanges is used to define the property values or bindings in a <a href="qml-qtquick-state.html">State</a>. This enables an item's property values to be changed when it <a href="qtquick-statesanimations-states.html">changes between states</a>.</p>
<p>To create a PropertyChanges object, specify the <a href="qml-qtquick-propertychanges.html#target-prop">target</a> item whose properties are to be modified, and define the new property values or bindings. For example:</p>
<pre class="qml">import QtQuick 2.0

<span class="type"><a href="qml-qtquick-item.html">Item</a></span> {
    <span class="name">id</span>: <span class="name">container</span>
    <span class="name">width</span>: <span class="number">300</span>; <span class="name">height</span>: <span class="number">300</span>

    <span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
        <span class="name">id</span>: <span class="name">rect</span>
        <span class="name">width</span>: <span class="number">100</span>; <span class="name">height</span>: <span class="number">100</span>
        <span class="name">color</span>: <span class="string">&quot;red&quot;</span>

        <span class="type"><a href="qml-qtquick-mousearea.html">MouseArea</a></span> {
           <span class="name">id</span>: <span class="name">mouseArea</span>
           <span class="name">anchors</span>.fill: <span class="name">parent</span>
        }

        <span class="name">states</span>: <span class="name">State</span> {
           <span class="name">name</span>: <span class="string">&quot;resized&quot;</span>; <span class="name">when</span>: <span class="name">mouseArea</span>.<span class="name">pressed</span>
           <span class="type">PropertyChanges</span> { <span class="name">target</span>: <span class="name">rect</span>; <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>; <span class="name">height</span>: <span class="name">container</span>.<span class="name">height</span> }
        }
    }
}</pre>
<p>When the mouse is pressed, the <a href="qml-qtquick-rectangle.html">Rectangle</a> changes to the <i>resized</i> state. In this state, the PropertyChanges object sets the rectangle's color to blue and the <tt>height</tt> value to that of <tt>container.height</tt>.</p>
<p>Note this automatically binds <tt>rect.height</tt> to <tt>container.height</tt> in the <i>resized</i> state. If a property binding should not be established, and the height should just be set to the value of <tt>container.height</tt> at the time of the state change, set the <a href="qml-qtquick-propertychanges.html#explicit-prop">explicit</a> property to <tt>true</tt>.</p>
<p>A PropertyChanges object can also override the default signal handler for an object to implement a signal handler specific to the new state:</p>
<pre class="qml"><span class="type">PropertyChanges</span> {
    <span class="name">target</span>: <span class="name">myMouseArea</span>
    <span class="name">onClicked</span>: <span class="name">doSomethingDifferent</span>()
}</pre>
<p><b>Note: </b>PropertyChanges can be used to change anchor margins, but not other anchor values; use <a href="qml-qtquick-anchorchanges.html">AnchorChanges</a> for this instead. Similarly, to change an <a href="qml-qtquick-item.html">Item</a>'s <a href="qml-qtquick-item.html#parent-prop">parent</a> value, use ParentChanges instead.</p><a name="resetting-property-values"></a>
<h3>Resetting property values</h3>
<p>The <tt>undefined</tt> value can be used to reset the property value for a state. In the following example, when <tt>myText</tt> changes to the <i>widerText</i> state, its <tt>width</tt> property is reset, giving the text its natural width and displaying the whole string on a single line.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-rectangle.html">Rectangle</a></span> {
    <span class="name">width</span>: <span class="number">300</span>; <span class="name">height</span>: <span class="number">200</span>

    <span class="type"><a href="qml-qtquick-text.html">Text</a></span> {
        <span class="name">id</span>: <span class="name">myText</span>
        <span class="name">width</span>: <span class="number">50</span>
        <span class="name">wrapMode</span>: <span class="name">Text</span>.<span class="name">WordWrap</span>
        <span class="name">text</span>: <span class="string">&quot;a text string that is longer than 50 pixels&quot;</span>

        <span class="name">states</span>: <span class="name">State</span> {
            <span class="name">name</span>: <span class="string">&quot;widerText&quot;</span>
            <span class="type">PropertyChanges</span> { <span class="name">target</span>: <span class="name">myText</span>; <span class="name">width</span>: <span class="name">undefined</span> }
        }
    }

    <span class="type"><a href="qml-qtquick-mousearea.html">MouseArea</a></span> {
        <span class="name">anchors</span>.fill: <span class="name">parent</span>
        <span class="name">onClicked</span>: <span class="name">myText</span>.<span class="name">state</span> <span class="operator">=</span> <span class="string">&quot;widerText&quot;</span>
    }
}</pre>
<a name="immediate-property-changes-in-transitions"></a>
<h3>Immediate property changes in transitions</h3>
<p>When <a href="qtquick-statesanimations-animations.html">Transitions</a> are used to animate state changes, they animate properties from their values in the current state to those defined in the new state (as defined by PropertyChanges objects). However, it is sometimes desirable to set a property value <i>immediately</i> during a <a href="qml-qtquick-transition.html">Transition</a>, without animation; in these cases, the <a href="qml-qtquick-propertyaction.html">PropertyAction</a> type can be used to force an immediate property change.</p>
<p>See the <a href="qml-qtquick-propertyaction.html">PropertyAction</a> documentation for more details.</p>
<p><b>See also </b>states example, <a href="qtquick-statesanimations-states.html">Qt Quick States</a>, and Qt QML.</p>
<!-- @@@PropertyChanges -->
<h2>Property Documentation</h2>
<!-- $$$explicit -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="explicit-prop"></a><span class="name">explicit</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>If explicit is set to true, any potential bindings will be interpreted as once-off assignments that occur when the state is entered.</p>
<p>In the following example, the addition of explicit prevents <tt>myItem.width</tt> from being bound to <tt>parent.width</tt>. Instead, it is assigned the value of <tt>parent.width</tt> at the time of the state change.</p>
<pre class="qml"><span class="type"><a href="qml-qtquick-propertychanges.html">PropertyChanges</a></span> {
    <span class="name">target</span>: <span class="name">myItem</span>
    <span class="name">explicit</span>: <span class="number">true</span>
    <span class="name">width</span>: <span class="name">parent</span>.<span class="name">width</span>
}</pre>
<p>By default, explicit is false.</p>
</div></div><!-- @@@explicit -->
<br/>
<!-- $$$restoreEntryValues -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="restoreEntryValues-prop"></a><span class="name">restoreEntryValues</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the previous values should be restored when leaving the state.</p>
<p>The default value is <tt>true</tt>. Setting this value to <tt>false</tt> creates a temporary state that has permanent effects on property values.</p>
</div></div><!-- @@@restoreEntryValues -->
<br/>
<!-- $$$target -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="target-prop"></a><span class="name">target</span> : <span class="type">Object</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the object which contains the properties to be changed.</p>
</div></div><!-- @@@target -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
   subsidiaries. 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>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>