doc: Regenerate the doc

This commit is contained in:
Grecko 2017-09-26 22:34:19 +02:00
parent 2a439497ae
commit 15ccba1f14
26 changed files with 435 additions and 15 deletions

View File

@ -24,6 +24,10 @@
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-regexpfilter.html">RegExpFilter</a></p></td><td class="tblDescr"><p>Filters rows matching a regular expression</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qml-rolefilter.html">RoleFilter</a></p></td><td class="tblDescr"><p>Base type for filters based on a source model role</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-valuefilter.html">ValueFilter</a></p></td><td class="tblDescr"><p>Filters rows matching exactly a value</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qml-expressionrole.html">ExpressionRole</a></p></td><td class="tblDescr"><p>A custom role computed from a javascrip expression</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-joinrole.html">JoinRole</a></p></td><td class="tblDescr"><p>Role made from concatenating other roles</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qml-proxyrole.html">ProxyRole</a></p></td><td class="tblDescr"><p>Base type for the SortFilterProxyModel proxy roles</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-switchrole.html">SwitchRole</a></p></td><td class="tblDescr"><p>Role using Filter to conditionnaly compute its data</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qml-sortfilterproxymodel.html">SortFilterProxyModel</a></p></td><td class="tblDescr"><p>Filters and sorts data coming from a source QAbstractItemModel</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-expressionsorter.html">ExpressionSorter</a></p></td><td class="tblDescr"><p>Sorts row with a custom sorting</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="qml-rolesorter.html">RoleSorter</a></p></td><td class="tblDescr"><p>Sorts rows based on a source model role</p></td></tr>

View File

@ -29,7 +29,6 @@
<!-- $$$AllOf-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The <a href="qml-allof.html">AllOf</a> type is a <a href="qml-filter.html">Filter</a> container that accepts rows if all of its contained (and enabled) filters accept them, or if it has no filter.</p>
<p>Using it as a top level filter has the same effect as putting all its child filters as top level filters. It can however be usefull to use an <a href="qml-allof.html">AllOf</a> filter when nested in an <a href="qml-anyof.html">AnyOf</a> filter.</p>
<!-- @@@AllOf -->

View File

@ -29,7 +29,6 @@
<!-- $$$AnyOf-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The <a href="qml-anyof.html">AnyOf</a> type is a <a href="qml-filter.html">Filter</a> container that accepts rows if any of its contained (and enabled) filters accept them.</p>
<p>In the following example, only the rows where the <code>firstName</code> role or the <code>lastName</code> role match the text entered in the <code>nameTextField</code> will be accepted :</p>
<pre class="cpp">TextField {

View File

@ -35,7 +35,6 @@
<!-- $$$ExpressionFilter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>An <a href="qml-expressionfilter.html">ExpressionFilter</a> is a <a href="qml-filter.html">Filter</a> allowing to implement custom filtering based on a javascript expression.</p>
<!-- @@@ExpressionFilter -->
<h2>Property Documentation</h2>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>List of All Members for ExpressionRole | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for ExpressionRole</h1>
<p>This is the complete list of members for <a href="qml-expressionrole.html">ExpressionRole</a>, including inherited members.</p>
<ul>
<li class="fn"><b><b><a href="qml-expressionrole.html#expression-prop">expression</a></b></b> : expression</li>
</ul>
<p>The following members are inherited from <a href="qml-proxyrole.html">ProxyRole</a>.</p>
<ul>
<li class="fn"><b><b><a href="qml-proxyrole.html#name-prop">name</a></b></b> : string</li>
</ul>
</body>
</html>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>ExpressionRole QML Type | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<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">ExpressionRole QML Type</h1>
<span class="subtitle"></span>
<!-- $$$ExpressionRole-brief -->
<p>A custom role computed from a javascrip expression <a href="#details">More...</a></p>
<!-- @@@ExpressionRole -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-proxyrole.html">ProxyRole</a></p>
</td></tr></table></div><ul>
<li><a href="qml-expressionrole-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-expressionrole.html#expression-prop">expression</a></b></b> : expression</li>
</ul>
<!-- $$$ExpressionRole-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>An <a href="qml-expressionrole.html">ExpressionRole</a> is a <a href="qml-proxyrole.html">ProxyRole</a> allowing to implement a custom role based on a javascript expression.</p>
<p>In the following example, the <code>c</code> role is computed by adding the <code>a</code> role and <code>b</code> role of the model :</p>
<pre class="cpp">SortFilterProxyModel {
sourceModel: numberModel
proxyRoles: ExpressionRole {
name: <span class="string">&quot;c&quot;</span>
expression: model<span class="operator">.</span>a <span class="operator">+</span> model<span class="operator">.</span>b
}
}</pre>
<!-- @@@ExpressionRole -->
<h2>Property Documentation</h2>
<!-- $$$expression -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="expression-prop">
<td class="tblQmlPropNode"><p>
<a name="expression-prop"></a><span class="name">expression</span> : <span class="type"><a href="qml-expressionrole.html#expression-prop">expression</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>An expression to implement a custom role. It has the same syntax has a <a href="http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html">Property Binding</a> except it will be evaluated for each of the source model's rows. The data for this role will be the retuned valued of the expression. Data for each row is exposed like for a delegate of a QML View.</p>
<p>This expression is reevaluated for a row every time its model data changes. When an external property (not <code>index</code> or in <code>model</code>) the expression depends on changes, the expression is reevaluated for every row of the source model. To capture the properties the expression depends on, the expression is first executed with invalid data and each property access is detected by the QML engine. This means that if a property is not accessed because of a conditional, it won't be captured and the expression won't be reevaluted when this property changes.</p>
<p>A workaround to this problem is to access all the properties the expressions depends unconditionally at the beggining of the expression.</p>
</div></div><!-- @@@expression -->
<br/>
</body>
</html>

View File

@ -35,7 +35,6 @@
<!-- $$$ExpressionSorter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>An <a href="qml-expressionsorter.html">ExpressionSorter</a> is a <a href="qml-sorter.html">Sorter</a> allowing to implement custom sorting based on a javascript expression.</p>
<!-- @@@ExpressionSorter -->
<h2>Property Documentation</h2>

View File

@ -36,7 +36,6 @@
<!-- $$$Filter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The Filter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other filter types that inherit from it. Attempting to use the Filter type directly will result in an error.</p>
<!-- @@@Filter -->
<h2>Property Documentation</h2>

View File

@ -36,7 +36,6 @@
<!-- $$$IndexFilter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>An <a href="qml-indexfilter.html">IndexFilter</a> is a filter allowing contents to be filtered based on their source model index.</p>
<p>In the following example, only the first row of the source model will be accepted:</p>
<pre class="cpp">SortFilterProxyModel {

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>List of All Members for JoinRole | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for JoinRole</h1>
<p>This is the complete list of members for <a href="qml-joinrole.html">JoinRole</a>, including inherited members.</p>
<ul>
<li class="fn"><b><b><a href="qml-joinrole.html#roleNames-prop">roleNames</a></b></b> : list&lt;string&gt;</li>
<li class="fn"><b><b><a href="qml-joinrole.html#separator-prop">separator</a></b></b> : string</li>
</ul>
<p>The following members are inherited from <a href="qml-proxyrole.html">ProxyRole</a>.</p>
<ul>
<li class="fn"><b><b><a href="qml-proxyrole.html#name-prop">name</a></b></b> : string</li>
</ul>
</body>
</html>

72
docs/qml-joinrole.html Normal file
View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>JoinRole QML Type | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<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">JoinRole QML Type</h1>
<span class="subtitle"></span>
<!-- $$$JoinRole-brief -->
<p>a role made from concatenating other roles <a href="#details">More...</a></p>
<!-- @@@JoinRole -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-proxyrole.html">ProxyRole</a></p>
</td></tr></table></div><ul>
<li><a href="qml-joinrole-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-joinrole.html#roleNames-prop">roleNames</a></b></b> : list&lt;string&gt;</li>
<li class="fn"><b><b><a href="qml-joinrole.html#separator-prop">separator</a></b></b> : string</li>
</ul>
<!-- $$$JoinRole-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>A <a href="qml-joinrole.html">JoinRole</a> is a simple <a href="qml-proxyrole.html">ProxyRole</a> that concatenates other roles.</p>
<p>In the following example, the <code>fullName</code> role is computed by the concatenation of the <code>firstName</code> role and the <code>lastName</code> role separated by a space :</p>
<pre class="cpp">SortFilterProxyModel {
sourceModel: contactModel
proxyRoles: JoinRole {
name: <span class="string">&quot;fullName&quot;</span>
roleNames: <span class="operator">[</span><span class="string">&quot;firstName&quot;</span><span class="operator">,</span> <span class="string">&quot;lastName&quot;</span><span class="operator">]</span>
}
}</pre>
<!-- @@@JoinRole -->
<h2>Property Documentation</h2>
<!-- $$$roleNames -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="roleNames-prop">
<td class="tblQmlPropNode"><p>
<a name="roleNames-prop"></a><span class="name">roleNames</span> : <span class="type">list</span>&lt;<span class="type">string</span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the role names that are joined by this role.</p>
</div></div><!-- @@@roleNames -->
<br/>
<!-- $$$separator -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="separator-prop">
<td class="tblQmlPropNode"><p>
<a name="separator-prop"></a><span class="name">separator</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the separator that is used to join the roles specified in <a href="qml-joinrole.html#roleNames-prop">roleNames</a>.</p>
<p>By default, it's a space.</p>
</div></div><!-- @@@separator -->
<br/>
</body>
</html>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>List of All Members for ProxyRole | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for ProxyRole</h1>
<p>This is the complete list of members for <a href="qml-proxyrole.html">ProxyRole</a>, including inherited members.</p>
<ul>
<li class="fn"><b><b><a href="qml-proxyrole.html#name-prop">name</a></b></b> : string</li>
</ul>
</body>
</html>

52
docs/qml-proxyrole.html Normal file
View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>ProxyRole QML Type | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<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">ProxyRole QML Type</h1>
<span class="subtitle"></span>
<!-- $$$ProxyRole-brief -->
<p>Base type for the <a href="qml-sortfilterproxymodel.html">SortFilterProxyModel</a> proxy roles <a href="#details">More...</a></p>
<!-- @@@ProxyRole -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qml-expressionrole.html">ExpressionRole</a>, <a href="qml-joinrole.html">JoinRole</a>, and <a href="qml-switchrole.html">SwitchRole</a></p>
</td></tr></table></div><ul>
<li><a href="qml-proxyrole-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-proxyrole.html#name-prop">name</a></b></b> : string</li>
</ul>
<!-- $$$ProxyRole-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>The <a href="qml-proxyrole.html">ProxyRole</a> type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other proxy role types that inherit from it. Attempting to use the <a href="qml-proxyrole.html">ProxyRole</a> type directly will result in an error.</p>
<!-- @@@ProxyRole -->
<h2>Property Documentation</h2>
<!-- $$$name -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="name-prop">
<td class="tblQmlPropNode"><p>
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the role name of the proxy role.</p>
</div></div><!-- @@@name -->
<br/>
</body>
</html>

View File

@ -39,7 +39,6 @@
<!-- $$$RangeFilter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>A <a href="qml-rangefilter.html">RangeFilter</a> is a <a href="qml-rolefilter.html">RoleFilter</a> that accepts rows if their data is between the filter's minimum and maximum value.</p>
<p>In the following example, only rows with their <code>price</code> role set to a value between the tow boundary of the slider will be accepted :</p>
<pre class="cpp">RangeSlider {

View File

@ -38,7 +38,6 @@
<!-- $$$RegExpFilter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>A <a href="qml-regexpfilter.html">RegExpFilter</a> is a <a href="qml-rolefilter.html">RoleFilter</a> that accepts rows matching a regular rexpression.</p>
<p>In the following example, only rows with their <code>lastName</code> role beggining with the content of textfield the will be accepted:</p>
<pre class="cpp">TextField {

View File

@ -36,7 +36,6 @@
<!-- $$$RoleFilter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The <a href="qml-rolefilter.html">RoleFilter</a> type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other filter types that inherit from it. Attempting to use the <a href="qml-rolefilter.html">RoleFilter</a> type directly will result in an error.</p>
<!-- @@@RoleFilter -->
<h2>Property Documentation</h2>

View File

@ -36,7 +36,6 @@
<!-- $$$RoleSorter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>A <a href="qml-rolesorter.html">RoleSorter</a> is a simple <a href="qml-sorter.html">Sorter</a> that sorts rows based on a source model role.</p>
<p>In the following example, rows with be sorted by their <code>lastName</code> role :</p>
<pre class="cpp">SortFilterProxyModel {

View File

@ -36,7 +36,6 @@
<!-- $$$Sorter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The Sorter type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other sorters types that inherit from it. Attempting to use the Sorter type directly will result in an error.</p>
<!-- @@@Sorter -->
<h2>Property Documentation</h2>

View File

@ -14,6 +14,7 @@
<ul>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#filters-prop">filters</a></b></b> : list&lt;Filter&gt;</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#proxyRoles-prop">proxyRoles</a></b></b> : list&lt;ProxyRole&gt;</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#sortRoleName-prop">sortRoleName</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#sorters-prop">sorters</a></b></b> : list&lt;Sorter&gt;</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#sourceModel-prop">sourceModel</a></b></b> : QAbstractItemModel*</li>

View File

@ -32,6 +32,7 @@
<ul>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#filters-prop">filters</a></b></b> : list&lt;Filter&gt;</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#proxyRoles-prop">proxyRoles</a></b></b> : list&lt;ProxyRole&gt;</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#sortRoleName-prop">sortRoleName</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#sorters-prop">sorters</a></b></b> : list&lt;Sorter&gt;</li>
<li class="fn"><b><b><a href="qml-sortfilterproxymodel.html#sourceModel-prop">sourceModel</a></b></b> : QAbstractItemModel*</li>
@ -50,7 +51,6 @@
<!-- $$$SortFilterProxyModel-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The <a href="qml-sortfilterproxymodel.html">SortFilterProxyModel</a> type provides support for filtering and sorting data coming from a source model.</p>
<!-- @@@SortFilterProxyModel -->
<h2>Property Documentation</h2>
@ -75,6 +75,17 @@
<p><b>See also </b><a href="qml-filter.html">Filter</a>.</p>
</div></div><!-- @@@filters -->
<br/>
<!-- $$$proxyRoles -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="proxyRoles-prop">
<td class="tblQmlPropNode"><p>
<a name="proxyRoles-prop"></a><span class="name">proxyRoles</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-proxyrole.html">ProxyRole</a></span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the list of proxy roles for this proxy model. Each proxy role adds a new custom role to the model.</p>
<p><b>See also </b><a href="qml-proxyrole.html">ProxyRole</a>.</p>
</div></div><!-- @@@proxyRoles -->
<br/>
<!-- $$$sortRoleName -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">

View File

@ -38,7 +38,6 @@
<!-- $$$StringSorter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p><a href="qml-stringsorter.html">StringSorter</a> is a specialized <a href="qml-rolesorter.html">RoleSorter</a> that sorts rows based on a source model string role. <a href="qml-stringsorter.html">StringSorter</a> compares strings according to a localized collation algorithm.</p>
<p>In the following example, rows with be sorted by their <code>lastName</code> role :</p>
<pre class="cpp">SortFilterProxyModel {

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>List of All Members for SwitchRole | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for SwitchRole</h1>
<p>This is the complete list of members for <a href="qml-switchrole.html">SwitchRole</a>, including inherited members.</p>
<ul>
<li class="fn"><b><b><a href="qml-switchrole.html#defaultRoleName-prop">defaultRoleName</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-switchrole.html#defaultValue-prop">defaultValue</a></b></b> : var</li>
<li class="fn"><b><b><a href="qml-switchrole.html#filters-prop">filters</a></b></b> : list&lt;Filter&gt;</li>
<li class="fn"><b><b><a href="qml-switchrole.html#value-attached-prop">value</a></b></b> : var [attached]</li>
</ul>
<p>The following members are inherited from <a href="qml-proxyrole.html">ProxyRole</a>.</p>
<ul>
<li class="fn"><b><b><a href="qml-proxyrole.html#name-prop">name</a></b></b> : string</li>
</ul>
</body>
</html>

105
docs/qml-switchrole.html Normal file
View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- proxyrole.cpp -->
<title>SwitchRole QML Type | SortFilterProxyModel</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<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="#attached-properties">Attached 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">SwitchRole QML Type</h1>
<span class="subtitle"></span>
<!-- $$$SwitchRole-brief -->
<p>a role using <a href="qml-filter.html">Filter</a> to conditionnaly compute its data <a href="#details">More...</a></p>
<!-- @@@SwitchRole -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import .</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-proxyrole.html">ProxyRole</a></p>
</td></tr></table></div><ul>
<li><a href="qml-switchrole-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-switchrole.html#defaultRoleName-prop">defaultRoleName</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-switchrole.html#defaultValue-prop">defaultValue</a></b></b> : var</li>
<li class="fn"><b><b><a href="qml-switchrole.html#filters-prop">filters</a></b></b> : list&lt;Filter&gt;</li>
</ul>
<a name="attached-properties"></a>
<h2 id="attached-properties">Attached Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-switchrole.html#value-attached-prop">value</a></b></b> : var</li>
</ul>
<!-- $$$SwitchRole-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>A <a href="qml-switchrole.html">SwitchRole</a> is a <a href="qml-proxyrole.html">ProxyRole</a> that computes its data with the help of <a href="qml-filter.html">Filter</a>. Each top level filters specified in the <a href="qml-switchrole.html">SwitchRole</a> is evaluated on the rows of the model, if a <a href="qml-filter.html">Filter</a> evaluates to true, the data of the <a href="qml-switchrole.html">SwitchRole</a> for this row will be the one of the attached <a href="qml-switchrole.html#value-attached-prop">SwitchRole.value</a> property. If no top level filters evaluate to true, the data will default to the one of the <a href="qml-switchrole.html#defaultRoleName-prop">defaultRoleName</a> (or the <a href="qml-switchrole.html#defaultValue-prop">defaultValue</a> if no <a href="qml-switchrole.html#defaultRoleName-prop">defaultRoleName</a> is specified).</p>
<p>In the following example, the <code>favoriteOrFirstNameSection</code> role is equal to <code>*</code> if the <code>favorite</code> role of a row is true, otherwise it's the same as the <code>firstName</code> role :</p>
<pre class="cpp">SortFilterProxyModel {
sourceModel: contactModel
proxyRoles: SwitchRole {
name: <span class="string">&quot;favoriteOrFirstNameSection&quot;</span>
filters: ValueFilter {
roleName: <span class="string">&quot;favorite&quot;</span>
value: <span class="keyword">true</span>
SwitchRole<span class="operator">.</span>value: <span class="string">&quot;*&quot;</span>
}
defaultRoleName: <span class="string">&quot;firstName&quot;</span>
}
}</pre>
<!-- @@@SwitchRole -->
<h2>Property Documentation</h2>
<!-- $$$defaultRoleName -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="defaultRoleName-prop">
<td class="tblQmlPropNode"><p>
<a name="defaultRoleName-prop"></a><span class="name">defaultRoleName</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the default role name of the role. If no filter match a row, the data of this role will be the data of the role whose name is <code>defaultRoleName</code>.</p>
</div></div><!-- @@@defaultRoleName -->
<br/>
<!-- $$$defaultValue -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="defaultValue-prop">
<td class="tblQmlPropNode"><p>
<a name="defaultValue-prop"></a><span class="name">defaultValue</span> : <span class="type">var</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the default value of the role. If no filter match a row, and no <a href="qml-switchrole.html#defaultRoleName-prop">defaultRoleName</a> is set, the data of this role will be <code>defaultValue</code>.</p>
</div></div><!-- @@@defaultValue -->
<br/>
<!-- $$$filters -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="filters-prop">
<td class="tblQmlPropNode"><p>
<a name="filters-prop"></a><span class="name">filters</span> : <span class="type">list</span>&lt;<span class="type"><a href="qml-filter.html">Filter</a></span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the list of filters for this proxy role. The data of this role will be equal to the attached <a href="qml-switchrole.html#value-attached-prop">SwitchRole.value</a> property of the first filter that matches the model row.</p>
<p><b>See also </b><a href="qml-filter.html">Filter</a>.</p>
</div></div><!-- @@@filters -->
<br/>
<h2>Attached Property Documentation</h2>
<!-- $$$value -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="value-attached-prop">
<td class="tblQmlPropNode"><p>
<a name="value-attached-prop"></a><span class="name">SwitchRole.value</span> : <span class="type">var</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property attaches a value to a <a href="qml-filter.html">Filter</a>.</p>
</div></div><!-- @@@value -->
<br/>
</body>
</html>

View File

@ -36,7 +36,6 @@
<!-- $$$ValueFilter-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>A <a href="qml-valuefilter.html">ValueFilter</a> is a simple <a href="qml-rolefilter.html">RoleFilter</a> that accepts rows matching exactly the filter's value</p>
<p>In the following example, only rows with their <code>favorite</code> role set to <code>true</code> will be accepted when the checkbox is checked :</p>
<pre class="cpp">CheckBox {

View File

@ -32,10 +32,27 @@
<qmlclass threadsafety="unspecified" name="ValueFilter" qml-module-name="ValueFilter" qml-base-type="::RoleFilter" href="qml-valuefilter.html" status="active" access="public" title="ValueFilter" fulltitle="ValueFilter" subtitle="" brief="Filters rows matching exactly a value">
<qmlproperty threadsafety="unspecified" name="value" fullname="ValueFilter::value" href="qml-valuefilter.html#value-prop" status="active" access="public" type="variant" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="ExpressionRole" qml-module-name="ExpressionRole" qml-base-type="::ProxyRole" href="qml-expressionrole.html" status="active" access="public" title="ExpressionRole" fulltitle="ExpressionRole" subtitle="" brief="A custom role computed from a javascrip expression">
<qmlproperty threadsafety="unspecified" name="expression" fullname="ExpressionRole::expression" href="qml-expressionrole.html#expression-prop" status="active" access="public" type="expression" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="JoinRole" qml-module-name="JoinRole" qml-base-type="::ProxyRole" href="qml-joinrole.html" status="active" access="public" title="JoinRole" fulltitle="JoinRole" subtitle="" brief="Role made from concatenating other roles">
<qmlproperty threadsafety="unspecified" name="roleNames" fullname="JoinRole::roleNames" href="qml-joinrole.html#roleNames-prop" status="active" access="public" type="list&lt;string&gt;" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="separator" fullname="JoinRole::separator" href="qml-joinrole.html#separator-prop" status="active" access="public" type="string" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="ProxyRole" qml-module-name="ProxyRole" href="qml-proxyrole.html" status="active" access="public" title="ProxyRole" fulltitle="ProxyRole" subtitle="" brief="Base type for the SortFilterProxyModel proxy roles">
<qmlproperty threadsafety="unspecified" name="name" fullname="ProxyRole::name" href="qml-proxyrole.html#name-prop" status="active" access="public" type="string" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="SwitchRole" qml-module-name="SwitchRole" qml-base-type="::ProxyRole" href="qml-switchrole.html" status="active" access="public" title="SwitchRole" fulltitle="SwitchRole" subtitle="" brief="Role using Filter to conditionnaly compute its data">
<qmlproperty threadsafety="unspecified" name="defaultRoleName" fullname="SwitchRole::defaultRoleName" href="qml-switchrole.html#defaultRoleName-prop" status="active" access="public" type="string" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="defaultValue" fullname="SwitchRole::defaultValue" href="qml-switchrole.html#defaultValue-prop" status="active" access="public" type="var" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="filters" fullname="SwitchRole::filters" href="qml-switchrole.html#filters-prop" status="active" access="public" type="list&lt;Filter&gt;" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="value" fullname="SwitchRole::value" href="qml-switchrole.html#value-attached-prop" status="active" access="public" type="var" attached="true" writable="true"/>
</qmlclass>
<page name="index.html" href="index.html" status="active" subtype="page" title="SortFilterProxyModel QML Module" fulltitle="SortFilterProxyModel QML Module" subtitle="" module="SortFilterProxyModel"/>
<qmlclass threadsafety="unspecified" name="SortFilterProxyModel" qml-module-name="SortFilterProxyModel" href="qml-sortfilterproxymodel.html" status="active" access="public" title="SortFilterProxyModel" fulltitle="SortFilterProxyModel" subtitle="" brief="Filters and sorts data coming from a source QAbstractItemModel">
<qmlproperty threadsafety="unspecified" name="count" fullname="SortFilterProxyModel::count" href="qml-sortfilterproxymodel.html#count-prop" status="active" access="public" type="int" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="filters" fullname="SortFilterProxyModel::filters" href="qml-sortfilterproxymodel.html#filters-prop" status="active" access="public" type="list&lt;Filter&gt;" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="proxyRoles" fullname="SortFilterProxyModel::proxyRoles" href="qml-sortfilterproxymodel.html#proxyRoles-prop" status="active" access="public" type="list&lt;ProxyRole&gt;" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="sortRoleName" fullname="SortFilterProxyModel::sortRoleName" href="qml-sortfilterproxymodel.html#sortRoleName-prop" status="active" access="public" type="string" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="sorters" fullname="SortFilterProxyModel::sorters" href="qml-sortfilterproxymodel.html#sorters-prop" status="active" access="public" type="list&lt;Sorter&gt;" attached="false" writable="true"/>
<qmlproperty threadsafety="unspecified" name="sourceModel" fullname="SortFilterProxyModel::sourceModel" href="qml-sortfilterproxymodel.html#sourceModel-prop" status="active" access="public" type="QAbstractItemModel*" attached="false" writable="true"/>
@ -64,10 +81,15 @@
<qmlproperty threadsafety="unspecified" name="numericMode" fullname="StringSorter::numericMode" href="qml-stringsorter.html#numericMode-prop" status="active" access="public" type="bool" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="tst_builtins" qml-module-name="tst_builtins" href="qml-tst-builtins.html" status="internal" access="private" location="tst_builtins.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_builtins.qml" lineno="6" title="tst_builtins" fulltitle="tst_builtins" subtitle=""/>
<qmlclass threadsafety="unspecified" name="tst_expressionrole" qml-module-name="tst_expressionrole" href="qml-tst-expressionrole.html" status="internal" access="private" location="tst_expressionrole.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_expressionrole.qml" lineno="7" title="tst_expressionrole" fulltitle="tst_expressionrole" subtitle="">
<qmlproperty threadsafety="unspecified" name="c" fullname="tst_expressionrole::c" href="qml-tst-expressionrole.html#c-prop" status="active" access="public" location="tst_expressionrole.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_expressionrole.qml" lineno="8" type="int" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="tst_helpers" qml-module-name="tst_helpers" href="qml-tst-helpers.html" status="internal" access="private" location="tst_helpers.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_helpers.qml" lineno="7" title="tst_helpers" fulltitle="tst_helpers" subtitle=""/>
<qmlclass threadsafety="unspecified" name="tst_indexfilter" qml-module-name="tst_indexfilter" href="qml-tst-indexfilter.html" status="internal" access="private" location="tst_indexfilter.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_indexfilter.qml" lineno="6" title="tst_indexfilter" fulltitle="tst_indexfilter" subtitle="">
<qmlproperty threadsafety="unspecified" name="filters" fullname="tst_indexfilter::filters" href="qml-tst-indexfilter.html#filters-prop" status="active" access="public" location="tst_indexfilter.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_indexfilter.qml" lineno="7" type="IndexFilter" attached="false" writable="true"/>
</qmlclass>
<qmlclass threadsafety="unspecified" name="tst_joinrole" qml-module-name="tst_joinrole" href="qml-tst-joinrole.html" status="internal" access="private" location="tst_joinrole.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_joinrole.qml" lineno="7" title="tst_joinrole" fulltitle="tst_joinrole" subtitle=""/>
<qmlclass threadsafety="unspecified" name="tst_proxyroles" qml-module-name="tst_proxyroles" href="qml-tst-proxyroles.html" status="internal" access="private" location="tst_proxyroles.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_proxyroles.qml" lineno="8" title="tst_proxyroles" fulltitle="tst_proxyroles" subtitle=""/>
<qmlclass threadsafety="unspecified" name="tst_rangefilter" qml-module-name="tst_rangefilter" href="qml-tst-rangefilter.html" status="internal" access="private" location="tst_rangefilter.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_rangefilter.qml" lineno="6" title="tst_rangefilter" fulltitle="tst_rangefilter" subtitle="">
<qmlproperty threadsafety="unspecified" name="filters" fullname="tst_rangefilter::filters" href="qml-tst-rangefilter.html#filters-prop" status="active" access="public" location="tst_rangefilter.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_rangefilter.qml" lineno="7" type="RangeFilter" attached="false" writable="true"/>
</qmlclass>
@ -82,6 +104,7 @@
<qmlclass threadsafety="unspecified" name="tst_stringsorter" qml-module-name="tst_stringsorter" href="qml-tst-stringsorter.html" status="internal" access="private" location="tst_stringsorter.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_stringsorter.qml" lineno="6" title="tst_stringsorter" fulltitle="tst_stringsorter" subtitle="">
<qmlproperty threadsafety="unspecified" name="sorters" fullname="tst_stringsorter::sorters" href="qml-tst-stringsorter.html#sorters-prop" status="active" access="public" location="tst_stringsorter.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_stringsorter.qml" lineno="7" type="StringSorter" attached="false" writable="true"/>
</qmlclass>
<qmlmodule name="SortFilterProxyModel" qml-module-name="SortFilterProxyModel" qml-module-version="." href="sortfilterproxymodel-qmlmodule.html" status="internal" seen="false" title="" members="Filter,RoleFilter,ValueFilter,IndexFilter,RegExpFilter,RangeFilter,ExpressionFilter,AnyOf,AllOf,SortFilterProxyModel,Sorter,RoleSorter,StringSorter,ExpressionSorter"/>
<qmlclass threadsafety="unspecified" name="tst_switchrole" qml-module-name="tst_switchrole" href="qml-tst-switchrole.html" status="internal" access="private" location="tst_switchrole.qml" filepath="D:/coding/SortFilterProxyModel/tests/tst_switchrole.qml" lineno="7" title="tst_switchrole" fulltitle="tst_switchrole" subtitle=""/>
<qmlmodule name="SortFilterProxyModel" qml-module-name="SortFilterProxyModel" qml-module-version="." href="sortfilterproxymodel-qmlmodule.html" status="internal" seen="false" title="" members="Filter,RoleFilter,ValueFilter,IndexFilter,RegExpFilter,RangeFilter,ExpressionFilter,AnyOf,AllOf,ProxyRole,JoinRole,SwitchRole,ExpressionRole,SortFilterProxyModel,Sorter,RoleSorter,StringSorter,ExpressionSorter"/>
</namespace>
</INDEX>

View File

@ -0,0 +1,15 @@
project = SortFilterProxyModel
description = lol
sourcedirs = .
sources.fileextensions = "*.cpp *.qdoc *.qml"
headers.fileextensions = "*.h"
outputdir = docs/
HTML.templatedir = .
HTML.stylesheets = "D:\\coding\\Qt\\Docs\\Qt-5.8\\global\\template\\style\\offline.css"
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"