Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 1192

qt-mobility-doc-1.2.0-13.mga5.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" />
<!-- qdeclarativecontactmodel.cpp -->
  <title>Qt Mobility 1.2: QML ContactModel Element</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="http://qt.nokia.com/doc/4.7/qdeclarativeelements.html">QML Elements</a></li>
<li>QML ContactModel Element</li>
    </ul>
  </div>
</div>
<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="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QML ContactModel Element</h1>
<span class="subtitle"></span>
<!-- $$$ContactModel-brief -->
<p>The ContactModel element provides access to contacts from the contacts store. <a href="#details">More...</a></p>
<!-- @@@ContactModel -->
<p>This element was introduced in  Mobility 1.1.</p>
<ul>
<li><a href="qml-contactmodel-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-contactmodel.html#autoUpdate-prop">autoUpdate</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#availableManagers-prop">availableManagers</a></b></b> : list&lt;string&gt;</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#contacts-prop">contacts</a></b></b> : list&lt;Contact&gt;</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#error-prop">error</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#fetchHint-prop">fetchHint</a></b></b> : FetchHint</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#filter-prop">filter</a></b></b> : Filter</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#manager-prop">manager</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-contactmodel.html#sortOrders-prop">sortOrders</a></b></b> : list&lt;SortOrder&gt;</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-contactmodel.html#exportContacts-method">exportContacts</a></b></b></li>
<li class="fn"><b><b><a href="qml-contactmodel.html#fetchContacts-method">fetchContacts</a></b></b></li>
<li class="fn"><b><b><a href="qml-contactmodel.html#importContacts-method">importContacts</a></b></b></li>
<li class="fn"><b><b><a href="qml-contactmodel.html#removeContact-method">removeContact</a></b></b></li>
<li class="fn"><b><b><a href="qml-contactmodel.html#removeContacts-method">removeContacts</a></b></b></li>
<li class="fn"><b><b><a href="qml-contactmodel.html#saveContact-method">saveContact</a></b></b></li>
</ul>
<!-- $$$ContactModel-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>This element is part of the <b>QtMobility.contacts 1.1</b> module.</p>
<p>ContactModel provides a model of contacts from the contacts store. The contents of the model can be specified with <a href="qml-contactmodel.html#filter-prop">filter</a>, <a href="qml-contactmodel.html#sortOrders-prop">sortOrders</a> and <a href="qml-contactmodel.html#fetchHint-prop">fetchHint</a> properties. Whether the model is automatically updated when the store or <a href="qml-contactmodel.html#contacts-prop">contacts</a> changes, can be controlled with <a href="qml-contactmodel.html#autoUpdate-prop">ContactModel::autoUpdate</a> property.</p>
<p>There are two ways of accessing the contact data: via model by using views and delegates, or alternatively via <a href="qml-contactmodel.html#contacts-prop">contacts</a> list property. Of the two, the model access is preferred. Direct list access (i.e&#x2e; non-model) is not guaranteed to be in order set by <a href="location-overview.html#sortorders">sortOrder</a>.</p>
<p>At the moment the model roles provided by ContactModel are display, decoration and <tt>contact</tt>. Through the <tt>contact</tt> role can access any data provided by the Contact element.</p>
<p><b>See also </b><a href="qml-relationshipmodel.html">RelationshipModel</a>, <a href="qml-contact.html">Contact</a>, and <a href="qcontactmanager.html">QContactManager</a>.</p>
<!-- @@@ContactModel -->
<h2>Property Documentation</h2>
<!-- $$$autoUpdate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="autoUpdate-prop"></a><span class="name">autoUpdate</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property indicates whether or not the contact model should be updated automatically, default value is true.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
</div></div><!-- @@@autoUpdate -->
<br/>
<!-- $$$availableManagers -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="availableManagers-prop"></a><span class="qmlreadonly">read-only</span><span class="name">availableManagers</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-string.html">string</a></span>&gt;</p></td></tr></table></div><div class="qmldoc"><p>This property holds the list of available manager names. This property is read only.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
</div></div><!-- @@@availableManagers -->
<br/>
<!-- $$$contacts -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="contacts-prop"></a><span class="qmlreadonly">read-only</span><span class="name">contacts</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="qml-contact.html">Contact</a></span>&gt;</p></td></tr></table></div><div class="qmldoc"><p>This property holds a list of contacts.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-contact.html">Contact</a>.</p>
</div></div><!-- @@@contacts -->
<br/>
<!-- $$$error -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="error-prop"></a><span class="qmlreadonly">read-only</span><span class="name">error</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-string.html">string</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the latest error code returned by the contact manager.</p>
<p>This property is read only.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
</div></div><!-- @@@error -->
<br/>
<!-- $$$fetchHint -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="fetchHint-prop"></a><span class="name">fetchHint</span> : <span class="type"><a href="qml-fetchhint.html">FetchHint</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the fetch hint instance used by the contact model.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-fetchhint.html">FetchHint</a>.</p>
</div></div><!-- @@@fetchHint -->
<br/>
<!-- $$$filter -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="filter-prop"></a><span class="name">filter</span> : <span class="type"><a href="qml-filter.html">Filter</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the filter instance used by the contact model.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-filter.html">Filter</a>.</p>
</div></div><!-- @@@filter -->
<br/>
<!-- $$$manager -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="manager-prop"></a><span class="name">manager</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-string.html">string</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the manager uri of the contact backend engine.</p>
</div></div><!-- @@@manager -->
<br/>
<!-- $$$sortOrders -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="sortOrders-prop"></a><span class="qmlreadonly">read-only</span><span class="name">sortOrders</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="qml-sortorder.html">SortOrder</a></span>&gt;</p></td></tr></table></div><div class="qmldoc"><p>This property holds a list of sort orders used by the organizer model.</p>
<p>This property group was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-sortorder.html">SortOrder</a>.</p>
</div></div><!-- @@@sortOrders -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$exportContacts -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="exportContacts-method"></a>ContactModel::<span class="name">exportContacts</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-url.html">url</a></span> <i>url</i>, <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-string.html">string</a></span>&gt; <i>profiles</i> )</p></td></tr></table></div><div class="qmldoc"><p>Export contacts into a vcard file to the given <i>url</i> by optional <i>profiles</i>. At the moment only the local file url is supported in export method. Supported profiles are:</p>
<ul>
<li>&quot;Sync&quot; exports contacts in sync mode, currently, this is the same as passing in an empty list, and is generally what you want.</li>
<li>&quot;Backup&quot; exports contacts in backup mode, this will add non-standard properties to the generated vCard to try to save every detail of the contacts. Only use this if the vCard is going to be imported using the backup profile.</li>
</ul>
<p>This documentation was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qversitcontacthandlerfactory.html">QVersitContactHandlerFactory</a>, <a href="qversitcontacthandlerfactory.html#ProfileSync-var">QVersitContactHandlerFactory::ProfileSync</a>, and <a href="qversitcontacthandlerfactory.html#ProfileBackup-var">QVersitContactHandlerFactory::ProfileBackup</a>.</p>
</div></div><!-- @@@exportContacts -->
<br/>
<!-- $$$fetchContacts -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="fetchContacts-method"></a>ContactModel::<span class="name">fetchContacts</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-int.html">int</a></span>&gt; <i>contactIds</i> )</p></td></tr></table></div><div class="qmldoc"><p>Fetch a list of contacts from the contacts store by given <i>contactIds</i>.</p>
<p>This documentation was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-contact.html#contactId-prop">Contact::contactId</a>.</p>
</div></div><!-- @@@fetchContacts -->
<br/>
<!-- $$$importContacts -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="importContacts-method"></a>ContactModel::<span class="name">importContacts</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-url.html">url</a></span> <i>url</i>, <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-string.html">string</a></span>&gt; <i>profiles</i> )</p></td></tr></table></div><div class="qmldoc"><p>Import contacts from a vcard by the given <i>url</i> and optional <i>profiles</i>. Supported profiles are:</p>
<ul>
<li>&quot;Sync&quot; Imports contacts in sync mode, currently, this is the same as passing in an empty list, and is generally what you want.</li>
<li>&quot;Backup&quot; imports contacts in backup mode, use this mode if the vCard was generated by exporting in backup mode.</li>
</ul>
<p>This documentation was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qversitcontacthandlerfactory.html">QVersitContactHandlerFactory</a>, <a href="qversitcontacthandlerfactory.html#ProfileSync-var">QVersitContactHandlerFactory::ProfileSync</a>, and <a href="qversitcontacthandlerfactory.html#ProfileBackup-var">QVersitContactHandlerFactory::ProfileBackup</a>.</p>
</div></div><!-- @@@importContacts -->
<br/>
<!-- $$$removeContact -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="removeContact-method"></a>ContactModel::<span class="name">removeContact</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-int.html">int</a></span> <i>contactId</i> )</p></td></tr></table></div><div class="qmldoc"><p>Remove the contact from the contacts store by given <i>contactId</i>.</p>
<p>This documentation was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-contact.html#contactId-prop">Contact::contactId</a>.</p>
</div></div><!-- @@@removeContact -->
<br/>
<!-- $$$removeContacts -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="removeContacts-method"></a>ContactModel::<span class="name">removeContacts</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-int.html">int</a></span>&gt; <i>contactIds</i> )</p></td></tr></table></div><div class="qmldoc"><p>Remove the list of contacts from the contacts store by given <i>contactIds</i>.</p>
<p>This documentation was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-contact.html#contactId-prop">Contact::contactId</a>.</p>
</div></div><!-- @@@removeContacts -->
<br/>
<!-- $$$saveContact -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="saveContact-method"></a>ContactModel::<span class="name">saveContact</span> ( <span class="type"><a href="qml-contact.html">Contact</a></span> <i>contact</i> )</p></td></tr></table></div><div class="qmldoc"><p>Save the given <i>contact</i> into the contacts store. Once saved successfully, the dirty flags of this contact will be reset.</p>
<p>This documentation was introduced in  Mobility 1.1.</p>
<p><b>See also </b><a href="qml-contact.html#modified-prop">Contact::modified</a>.</p>
</div></div><!-- @@@saveContact -->
<br/>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used 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>
</div>
</body>
</html>