The ContactModel element provides access to contacts from the contacts store. More...
This element was introduced in Mobility 1.1.
This element is part of the QtMobility.contacts 1.1 module.
ContactModel provides a model of contacts from the contacts store. The contents of the model can be specified with filter, sortOrders and fetchHint properties. Whether the model is automatically updated when the store or contacts changes, can be controlled with ContactModel::autoUpdate property.
There are two ways of accessing the contact data: via model by using views and delegates, or alternatively via contacts list property. Of the two, the model access is preferred. Direct list access (i.e. non-model) is not guaranteed to be in order set by sortOrder.
At the moment the model roles provided by ContactModel are display, decoration and contact. Through the contact role can access any data provided by the Contact element.
See also RelationshipModel, Contact, and QContactManager.
autoUpdate : bool |
This property indicates whether or not the contact model should be updated automatically, default value is true.
This property group was introduced in Mobility 1.1.
This property holds the list of available manager names. This property is read only.
This property group was introduced in Mobility 1.1.
This property holds a list of contacts.
This property group was introduced in Mobility 1.1.
See also Contact.
read-onlyerror : string |
This property holds the latest error code returned by the contact manager.
This property is read only.
This property group was introduced in Mobility 1.1.
fetchHint : FetchHint |
This property holds the fetch hint instance used by the contact model.
This property group was introduced in Mobility 1.1.
See also FetchHint.
filter : Filter |
This property holds the filter instance used by the contact model.
This property group was introduced in Mobility 1.1.
See also Filter.
manager : string |
This property holds the manager uri of the contact backend engine.
This property holds a list of sort orders used by the organizer model.
This property group was introduced in Mobility 1.1.
See also SortOrder.
Export contacts into a vcard file to the given url by optional profiles. At the moment only the local file url is supported in export method. Supported profiles are:
This documentation was introduced in Mobility 1.1.
See also QVersitContactHandlerFactory, QVersitContactHandlerFactory::ProfileSync, and QVersitContactHandlerFactory::ProfileBackup.
Fetch a list of contacts from the contacts store by given contactIds.
This documentation was introduced in Mobility 1.1.
See also Contact::contactId.
Import contacts from a vcard by the given url and optional profiles. Supported profiles are:
This documentation was introduced in Mobility 1.1.
See also QVersitContactHandlerFactory, QVersitContactHandlerFactory::ProfileSync, and QVersitContactHandlerFactory::ProfileBackup.
ContactModel::removeContact ( int contactId ) |
Remove the contact from the contacts store by given contactId.
This documentation was introduced in Mobility 1.1.
See also Contact::contactId.
Remove the list of contacts from the contacts store by given contactIds.
This documentation was introduced in Mobility 1.1.
See also Contact::contactId.
ContactModel::saveContact ( Contact contact ) |
Save the given contact into the contacts store. Once saved successfully, the dirty flags of this contact will be reset.
This documentation was introduced in Mobility 1.1.
See also Contact::modified.
© 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.
All other trademarks are property of their respective owners. Privacy Policy
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.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.