Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5901

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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" />
<!-- qdeclarativepathview.cpp -->
  <title>Qt 4.8: QML PathView Element</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="qdeclarativeelements.html">QML Elements</a></li>
<li>QML PathView Element</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<p class="naviNextPrevious headerNavi">
</p><p/>
<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="#properties">Attached Properties</a></li>
<li class="level1"><a href="#signal-handlers">Signal Handlers</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QML PathView Element</h1>
<span class="subtitle"></span>
<!-- $$$PathView-brief -->
<p>The PathView element lays out model-provided items on a path. <a href="#details">More...</a></p>
<!-- @@@PathView -->
<p>Inherits <a href="qml-item.html">Item</a></p>
<p>This element was introduced in Qt 4.7.</p>
<ul>
<li><a href="qml-pathview-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-pathview.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-pathview.html#currentIndex-prop">currentIndex</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-pathview.html#delegate-prop">delegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-pathview.html#dragMargin-prop">dragMargin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-pathview.html#flickDeceleration-prop">flickDeceleration</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-pathview.html#flicking-prop">flicking</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-pathview.html#highlight-prop">highlight</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-pathview.html#highlightItem-prop">highlightItem</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-pathview.html#highlightMoveDuration-prop">highlightMoveDuration</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-pathview.html#interactive-prop">interactive</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-pathview.html#model-prop">model</a></b></b> : model</li>
<li class="fn"><b><b><a href="qml-pathview.html#moving-prop">moving</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-pathview.html#offset-prop">offset</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-pathview.html#path-prop">path</a></b></b> : Path</li>
<li class="fn"><b><b><a href="qml-pathview.html#pathItemCount-prop">pathItemCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-pathview.html#preferredHighlightBegin-prop">preferredHighlightBegin</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-pathview.html#preferredHighlightEnd-prop">preferredHighlightEnd</a></b></b> : real</li>
</ul>
<a name="attached-properties"></a>
<h2>Attached Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-pathview.html#isCurrentItem-prop">isCurrentItem</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-pathview.html#onPath-prop">onPath</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-pathview.html#view-prop">view</a></b></b> : PathView</li>
</ul>
<a name="signal-handlers"></a>
<h2>Signal Handlers</h2>
<ul>
<li class="fn"><b><b><a href="qml-pathview.html#onFlickEnded-signal">onFlickEnded</a></b></b></li>
<li class="fn"><b><b><a href="qml-pathview.html#onFlickStarted-signal">onFlickStarted</a></b></b></li>
<li class="fn"><b><b><a href="qml-pathview.html#onMovementEnded-signal">onMovementEnded</a></b></b></li>
<li class="fn"><b><b><a href="qml-pathview.html#onMovementStarted-signal">onMovementStarted</a></b></b></li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-pathview.html#decrementCurrentIndex-method">decrementCurrentIndex</a></b></b></li>
<li class="fn"><b><b><a href="qml-pathview.html#incrementCurrentIndex-method">incrementCurrentIndex</a></b></b></li>
</ul>
<!-- $$$PathView-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>A PathView displays data from models created from built-in QML elements like <a href="qml-listmodel.html">ListModel</a> and <a href="qml-xmllistmodel.html">XmlListModel</a>, or custom model classes defined in C++ that inherit from <a href="qabstractlistmodel.html">QAbstractListModel</a>.</p>
<p>The view has a <a href="qml-pathview.html#model-prop">model</a>, which defines the data to be displayed, and a <a href="qml-pathview.html#delegate-prop">delegate</a>, which defines how the data should be displayed. The <a href="qml-pathview.html#delegate-prop">delegate</a> is instantiated for each item on the <a href="qml-pathview.html#path-prop">path</a>. The items may be flicked to move them along the path.</p>
<p>For example, if there is a simple list model defined in a file <tt>ContactModel.qml</tt> like this:</p>
<pre class="qml"> import QtQuick 1.0

 <span class="type"><a href="qml-listmodel.html">ListModel</a></span> {
     <span class="type"><a href="qml-listelement.html">ListElement</a></span> {
         <span class="name">name</span>: <span class="string">&quot;Bill Jones&quot;</span>
         <span class="name">icon</span>: <span class="string">&quot;pics/qtlogo.png&quot;</span>
     }
     <span class="type"><a href="qml-listelement.html">ListElement</a></span> {
         <span class="name">name</span>: <span class="string">&quot;Jane Doe&quot;</span>
         <span class="name">icon</span>: <span class="string">&quot;pics/qtlogo.png&quot;</span>
     }
     <span class="type"><a href="qml-listelement.html">ListElement</a></span> {
         <span class="name">name</span>: <span class="string">&quot;John Smith&quot;</span>
         <span class="name">icon</span>: <span class="string">&quot;pics/qtlogo.png&quot;</span>
     }
 }</pre>
<p>This data can be represented as a PathView, like this:</p>
<pre class="qml"> import QtQuick 1.0

 <span class="type"><a href="qml-rectangle.html">Rectangle</a></span> {
     <span class="name">width</span>: <span class="number">240</span>; <span class="name">height</span>: <span class="number">200</span>

     <span class="type"><a href="qml-component.html">Component</a></span> {
         <span class="name">id</span>: <span class="name">delegate</span>
         <span class="type"><a href="qml-column.html">Column</a></span> {
             <span class="name">id</span>: <span class="name">wrapper</span>
             <span class="type"><a href="qml-image.html">Image</a></span> {
                 <span class="name">anchors</span>.horizontalCenter: <span class="name">nameText</span>.<span class="name">horizontalCenter</span>
                 <span class="name">width</span>: <span class="number">64</span>; <span class="name">height</span>: <span class="number">64</span>
                 <span class="name">source</span>: <span class="name">icon</span>
             }
             <span class="type"><a href="qml-text.html">Text</a></span> {
                 <span class="name">id</span>: <span class="name">nameText</span>
                 <span class="name">text</span>: <span class="name">name</span>
                 <span class="name">font</span>.pointSize: <span class="number">16</span>
                 <span class="name">color</span>: <span class="name">wrapper</span>.<span class="name">PathView</span>.<span class="name">isCurrentItem</span> ? <span class="string">&quot;red&quot;</span> : <span class="string">&quot;black&quot;</span>
             }
         }
     }

     <span class="type">PathView</span> {
         <span class="name">anchors</span>.fill: <span class="name">parent</span>
         <span class="name">model</span>: <span class="name">ContactModel</span> {}
         <span class="name">delegate</span>: <span class="name">delegate</span>
         <span class="name">path</span>: <span class="name">Path</span> {
             <span class="name">startX</span>: <span class="number">120</span>; <span class="name">startY</span>: <span class="number">100</span>
             <span class="type"><a href="qml-pathquad.html">PathQuad</a></span> { <span class="name">x</span>: <span class="number">120</span>; <span class="name">y</span>: <span class="number">25</span>; <span class="name">controlX</span>: <span class="number">260</span>; <span class="name">controlY</span>: <span class="number">75</span> }
             <span class="type"><a href="qml-pathquad.html">PathQuad</a></span> { <span class="name">x</span>: <span class="number">120</span>; <span class="name">y</span>: <span class="number">100</span>; <span class="name">controlX</span>: -<span class="number">20</span>; <span class="name">controlY</span>: <span class="number">75</span> }
         }
     }
 }</pre>
<p class="centerAlign"><img src="images/pathview.gif" alt="" /></p><p>(Note the above example uses <a href="qml-pathattribute.html">PathAttribute</a> to scale and modify the opacity of the items as they rotate. This additional code can be seen in the <a href="qml-pathattribute.html">PathAttribute</a> documentation.)</p>
<p>PathView does not automatically handle keyboard navigation. This is because the keys to use for navigation will depend upon the shape of the path. Navigation can be added quite simply by setting <tt>focus</tt> to <tt>true</tt> and calling <a href="qml-pathview.html#decrementCurrentIndex-method">decrementCurrentIndex()</a> or <a href="qml-pathview.html#incrementCurrentIndex-method">incrementCurrentIndex()</a>, for example to navigate using the left and right arrow keys:</p>
<pre class="qml"> <span class="type">PathView</span> {
     <span class="comment">// ...</span>
     <span class="name">focus</span>: <span class="number">true</span>
     <span class="name">Keys</span>.onLeftPressed: <span class="name">decrementCurrentIndex</span>()
     <span class="name">Keys</span>.onRightPressed: <span class="name">incrementCurrentIndex</span>()
 }</pre>
<p>The path view itself is a focus scope (see <a href="qdeclarativefocus.html#acquiring-focus-and-focus-scopes">the focus documentation page</a> for more details).</p>
<p>Delegates are instantiated as needed and may be destroyed at any time. State should <i>never</i> be stored in a delegate.</p>
<p>PathView attaches a number of properties to the root item of the delegate, for example <tt>PathView.isCurrentItem</tt>. In the following example, the root delegate item can access this attached property directly as <tt>PathView.isCurrentItem</tt>, while the child <tt>nameText</tt> object must refer to this property as <tt>wrapper.PathView.isCurrentItem</tt>.</p>
<pre class="qml">     <span class="type"><a href="qml-component.html">Component</a></span> {
         <span class="name">id</span>: <span class="name">delegate</span>
         <span class="type"><a href="qml-column.html">Column</a></span> {
             <span class="name">id</span>: <span class="name">wrapper</span>
             <span class="type"><a href="qml-image.html">Image</a></span> {
                 <span class="name">anchors</span>.horizontalCenter: <span class="name">nameText</span>.<span class="name">horizontalCenter</span>
                 <span class="name">width</span>: <span class="number">64</span>; <span class="name">height</span>: <span class="number">64</span>
                 <span class="name">source</span>: <span class="name">icon</span>
             }
             <span class="type"><a href="qml-text.html">Text</a></span> {
                 <span class="name">id</span>: <span class="name">nameText</span>
                 <span class="name">text</span>: <span class="name">name</span>
                 <span class="name">font</span>.pointSize: <span class="number">16</span>
                 <span class="name">color</span>: <span class="name">wrapper</span>.<span class="name">PathView</span>.<span class="name">isCurrentItem</span> ? <span class="string">&quot;red&quot;</span> : <span class="string">&quot;black&quot;</span>
             }
         }
     }</pre>
<p><b>Note</b> that views do not enable <i>clip</i> automatically. If the view is not clipped by another item or the screen, it will be necessary to set <i>clip: true</i> in order to have the out of view items clipped nicely.</p>
<p><b>See also </b><a href="qml-path.html">Path</a> and <a href="declarative-modelviews-pathview.html">PathView example</a>.</p>
<!-- @@@PathView -->
<h2>Property Documentation</h2>
<!-- $$$count -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="count-prop"></a><span class="qmlreadonly">read-only</span><span class="name">count</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the number of items in the model.</p>
</div></div><!-- @@@count -->
<br/>
<!-- $$$currentIndex -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="currentIndex-prop"></a><span class="name">currentIndex</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the index of the current item.</p>
</div></div><!-- @@@currentIndex -->
<br/>
<!-- $$$delegate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="delegate-prop"></a><span class="name">delegate</span> : <span class="type"><a href="qml-component.html">Component</a></span></p></td></tr></table></div><div class="qmldoc"><p>The delegate provides a template defining each item instantiated by the view. The index is exposed as an accessible <tt>index</tt> property. Properties of the model are also available depending upon the type of <a href="qdeclarativemodels.html#qmlmodels">Data Model</a>.</p>
<p>The number of elements in the delegate has a direct effect on the flicking performance of the view when <a href="qml-pathview.html#pathItemCount-prop">pathItemCount</a> is specified. If at all possible, place functionality that is not needed for the normal display of the delegate in a <a href="qml-loader.html">Loader</a> which can load additional elements when needed.</p>
<p>Note that the <a href="qml-pathview.html">PathView</a> will layout the items based on the size of the root item in the delegate.</p>
<p>Here is an example delegate:</p>
<pre class="qml">     <span class="type"><a href="qml-component.html">Component</a></span> {
         <span class="name">id</span>: <span class="name">delegate</span>
         <span class="type"><a href="qml-column.html">Column</a></span> {
             <span class="name">id</span>: <span class="name">wrapper</span>
             <span class="type"><a href="qml-image.html">Image</a></span> {
                 <span class="name">anchors</span>.horizontalCenter: <span class="name">nameText</span>.<span class="name">horizontalCenter</span>
                 <span class="name">width</span>: <span class="number">64</span>; <span class="name">height</span>: <span class="number">64</span>
                 <span class="name">source</span>: <span class="name">icon</span>
             }
             <span class="type"><a href="qml-text.html">Text</a></span> {
                 <span class="name">id</span>: <span class="name">nameText</span>
                 <span class="name">text</span>: <span class="name">name</span>
                 <span class="name">font</span>.pointSize: <span class="number">16</span>
                 <span class="name">color</span>: <span class="name">wrapper</span>.<span class="name">PathView</span>.<span class="name">isCurrentItem</span> ? <span class="string">&quot;red&quot;</span> : <span class="string">&quot;black&quot;</span>
             }
         }
     }</pre>
</div></div><!-- @@@delegate -->
<br/>
<!-- $$$dragMargin -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="dragMargin-prop"></a><span class="name">dragMargin</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the maximum distance from the path that initiate mouse dragging.</p>
<p>By default the path can only be dragged by clicking on an item. If dragMargin is greater than zero, a drag can be initiated by clicking within dragMargin pixels of the path.</p>
</div></div><!-- @@@dragMargin -->
<br/>
<!-- $$$flickDeceleration -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="flickDeceleration-prop"></a><span class="name">flickDeceleration</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the rate at which a flick will decelerate.</p>
<p>The default is 100.</p>
</div></div><!-- @@@flickDeceleration -->
<br/>
<!-- $$$flicking -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="flicking-prop"></a><span class="qmlreadonly">read-only</span><span class="name">flicking</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the view is currently moving due to the user flicking the view.</p>
</div></div><!-- @@@flicking -->
<br/>
<!-- $$$highlight -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="highlight-prop"></a><span class="name">highlight</span> : <span class="type"><a href="qml-component.html">Component</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the component to use as the highlight.</p>
<p>An instance of the highlight component will be created for each view. The geometry of the resultant component instance will be managed by the view so as to stay with the current item.</p>
<p>The below example demonstrates how to make a simple highlight. Note the use of the <a href="qml-pathview.html#onPath-prop">PathView.onPath</a> attached property to ensure that the highlight is hidden when flicked away from the path.</p>
<pre class="qml"> <span class="type"><a href="qml-component.html">Component</a></span> {
     <span class="type"><a href="qml-rectangle.html">Rectangle</a></span> {
         <span class="name">visible</span>: <span class="name">PathView</span>.<span class="name">onPath</span>
         <span class="comment">// ...</span>
     }
 }</pre>
<p><b>See also </b><a href="qml-pathview.html#highlightItem-prop">highlightItem</a> and <a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a>.</p>
</div></div><!-- @@@highlight -->
<br/>
<!-- $$$highlightItem -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="highlightItem-prop"></a><span class="qmlreadonly">read-only</span><span class="name">highlightItem</span> : <span class="type"><a href="qml-item.html">Item</a></span></p></td></tr></table></div><div class="qmldoc"><p><tt>highlightItem</tt> holds the highlight item, which was created from the <a href="qml-pathview.html#highlight-prop">highlight</a> component.</p>
<p><b>See also </b><a href="qml-pathview.html#highlight-prop">highlight</a>.</p>
</div></div><!-- @@@highlightItem -->
<br/>
<!-- $$$highlightMoveDuration -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="highlightMoveDuration-prop"></a><span class="name">highlightMoveDuration</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the move animation duration of the highlight delegate.</p>
<p>If the <a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> is StrictlyEnforceRange then this property determines the speed that the items move along the path.</p>
<p>The default value for the duration is 300ms.</p>
</div></div><!-- @@@highlightMoveDuration -->
<br/>
<!-- $$$interactive -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="interactive-prop"></a><span class="name">interactive</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>A user cannot drag or flick a <a href="qml-pathview.html">PathView</a> that is not interactive.</p>
<p>This property is useful for temporarily disabling flicking. This allows special interaction with <a href="qml-pathview.html">PathView</a>'s children.</p>
</div></div><!-- @@@interactive -->
<br/>
<!-- $$$model -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="model-prop"></a><span class="name">model</span> : <span class="type">model</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the model providing data for the view.</p>
<p>The model provides a set of data that is used to create the items for the view. For large or dynamic datasets the model is usually provided by a C++ model object. Models can also be created directly in QML, using the <a href="qml-listmodel.html">ListModel</a> element.</p>
<p><b>Note:</b> changing the model will reset the offset and <a href="qml-pathview.html#currentIndex-prop">currentIndex</a> to 0.</p>
<p><b>See also </b><a href="qdeclarativemodels.html#qmlmodels">Data Models</a>.</p>
</div></div><!-- @@@model -->
<br/>
<!-- $$$moving -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="moving-prop"></a><span class="qmlreadonly">read-only</span><span class="name">moving</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the view is currently moving due to the user either dragging or flicking the view.</p>
</div></div><!-- @@@moving -->
<br/>
<!-- $$$offset -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="offset-prop"></a><span class="name">offset</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>The offset specifies how far along the path the items are from their initial positions. This is a real number that ranges from 0.0 to the count of items in the model.</p>
</div></div><!-- @@@offset -->
<br/>
<!-- $$$path -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="path-prop"></a><span class="name">path</span> : <span class="type"><a href="qml-path.html">Path</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the path used to lay out the items. For more information see the <a href="qml-path.html">Path</a> documentation.</p>
</div></div><!-- @@@path -->
<br/>
<!-- $$$pathItemCount -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="pathItemCount-prop"></a><span class="name">pathItemCount</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the number of items visible on the path at any one time.</p>
</div></div><!-- @@@pathItemCount -->
<br/>
<!-- $$$preferredHighlightBegin -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="preferredHighlightBegin-prop"></a><span class="name">preferredHighlightBegin</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr><tr valign="top" class="even"><td class="tblQmlPropNode"><p><a name="preferredHighlightEnd-prop"></a><span class="name">preferredHighlightEnd</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="highlightRangeMode-prop"></a><span class="name">highlightRangeMode</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr></table></div><div class="qmldoc"><p>These properties set the preferred range of the highlight (current item) within the view. The preferred values must be in the range 0.0-1.0&#x2e;</p>
<p>If <a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> is set to <i>PathView.NoHighlightRange</i></p>
<p>If <a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> is set to <i>PathView.ApplyRange</i> the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the path or due to a mouse interaction.</p>
<p>If <a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> is set to <i>PathView.StrictlyEnforceRange</i> the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range.</p>
<p>Note that this is the correct way to influence where the current item ends up when the view moves. For example, if you want the currently selected item to be in the middle of the path, then set the highlight range to be 0.5,0.5 and <a href="qml-pathview.html#highlightRangeMode-prop">highlightRangeMode</a> to <a href="qml-pathview.html">PathView</a>.StrictlyEnforceRange. Then, when the path scrolls, the currently selected item will be the item at that position. This also applies to when the currently selected item changes - it will scroll to within the preferred highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists.</p>
<p>The default value is <i>PathView.StrictlyEnforceRange</i>.</p>
<p>Note that a valid range requires <a href="qml-pathview.html#preferredHighlightEnd-prop">preferredHighlightEnd</a> to be greater than or equal to preferredHighlightBegin.</p>
</div></div><!-- @@@preferredHighlightBegin -->
<br/>
<h2>Attached Property Documentation</h2>
<!-- $$$isCurrentItem -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="isCurrentItem-prop"></a><span class="qmlreadonly">read-only</span><span class="name">PathView.isCurrentItem</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This attached property is true if this delegate is the current item; otherwise false.</p>
<p>It is attached to each instance of the delegate.</p>
<p>This property may be used to adjust the appearance of the current item.</p>
<pre class="qml">     <span class="type"><a href="qml-component.html">Component</a></span> {
         <span class="name">id</span>: <span class="name">delegate</span>
         <span class="type"><a href="qml-column.html">Column</a></span> {
             <span class="name">id</span>: <span class="name">wrapper</span>
             <span class="type"><a href="qml-image.html">Image</a></span> {
                 <span class="name">anchors</span>.horizontalCenter: <span class="name">nameText</span>.<span class="name">horizontalCenter</span>
                 <span class="name">width</span>: <span class="number">64</span>; <span class="name">height</span>: <span class="number">64</span>
                 <span class="name">source</span>: <span class="name">icon</span>
             }
             <span class="type"><a href="qml-text.html">Text</a></span> {
                 <span class="name">id</span>: <span class="name">nameText</span>
                 <span class="name">text</span>: <span class="name">name</span>
                 <span class="name">font</span>.pointSize: <span class="number">16</span>
                 <span class="name">color</span>: <span class="name">wrapper</span>.<span class="name">PathView</span>.<span class="name">isCurrentItem</span> ? <span class="string">&quot;red&quot;</span> : <span class="string">&quot;black&quot;</span>
             }
         }
     }</pre>
</div></div><!-- @@@isCurrentItem -->
<br/>
<!-- $$$onPath -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="onPath-prop"></a><span class="name">PathView.onPath</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This attached property holds whether the item is currently on the path.</p>
<p>If a <a href="qml-pathview.html#pathItemCount-prop">pathItemCount</a> has been set, it is possible that some items may be instantiated, but not considered to be currently on the path. Usually, these items would be set invisible, for example:</p>
<pre class="qml"> <span class="type"><a href="qml-component.html">Component</a></span> {
     <span class="type"><a href="qml-rectangle.html">Rectangle</a></span> {
         <span class="name">visible</span>: <span class="name">PathView</span>.<span class="name">onPath</span>
         <span class="comment">// ...</span>
     }
 }</pre>
<p>It is attached to each instance of the delegate.</p>
</div></div><!-- @@@onPath -->
<br/>
<!-- $$$view -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="view-prop"></a><span class="name">PathView.view</span> : <span class="type">PathView</span></p></td></tr></table></div><div class="qmldoc"><p>This attached property holds the view that manages this delegate instance.</p>
<p>It is attached to each instance of the delegate.</p>
</div></div><!-- @@@view -->
<br/>
<h2>Signal Handler Documentation</h2>
<!-- $$$onFlickEnded -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onFlickEnded-signal"></a>PathView::<span class="name">onFlickEnded</span> ()</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the view stops moving due to a flick.</p>
</div></div><!-- @@@onFlickEnded -->
<br/>
<!-- $$$onFlickStarted -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onFlickStarted-signal"></a>PathView::<span class="name">onFlickStarted</span> ()</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the view is flicked. A flick starts from the point that the mouse or touch is released, while still in motion.</p>
</div></div><!-- @@@onFlickStarted -->
<br/>
<!-- $$$onMovementEnded -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onMovementEnded-signal"></a>PathView::<span class="name">onMovementEnded</span> ()</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the view stops moving due to user interaction. If a flick was generated, this handler will be triggered once the flick stops. If a flick was not generated, the handler will be triggered when the user stops dragging - i.e&#x2e; a mouse or touch release.</p>
</div></div><!-- @@@onMovementEnded -->
<br/>
<!-- $$$onMovementStarted -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onMovementStarted-signal"></a>PathView::<span class="name">onMovementStarted</span> ()</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the view begins moving due to user interaction.</p>
</div></div><!-- @@@onMovementStarted -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$decrementCurrentIndex -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="decrementCurrentIndex-method"></a>PathView::<span class="name">decrementCurrentIndex</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Decrements the current index.</p>
<p><b>Note</b>: methods should only be called after the Component has completed.</p>
</div></div><!-- @@@decrementCurrentIndex -->
<br/>
<!-- $$$incrementCurrentIndex -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="incrementCurrentIndex-method"></a>PathView::<span class="name">incrementCurrentIndex</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Increments the current index.</p>
<p><b>Note</b>: methods should only be called after the Component has completed.</p>
</div></div><!-- @@@incrementCurrentIndex -->
<br/>
<p class="naviNextPrevious footerNavi">
</p>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>