Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QML ContactModel Element

The ContactModel element provides access to contacts from the contacts store. More...

  • List of all members, including inherited members
  • Properties

    Methods

    Detailed Description

    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.

    Property Documentation

    autoUpdate : bool

    This property indicates whether or not the contact model should be updated automatically, default value is true.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlyavailableManagers : list<string>

    This property holds the list of available manager names. This property is read only.

    This documentation was introduced in Qt Mobility Mobility 1.1.


    read-onlycontacts : list<Contact>

    This property holds a list of contacts.

    This documentation was introduced in Qt Mobility 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 documentation was introduced in Qt Mobility Mobility 1.1.


    fetchHint : FetchHint

    This property holds the fetch hint instance used by the contact model.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also FetchHint.


    filter : Filter

    This property holds the filter instance used by the contact model.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also Filter.


    manager : string

    This property holds the manager uri of the contact backend engine.


    read-onlysortOrders : list<SortOrder>

    This property holds a list of sort orders used by the organizer model.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also SortOrder.


    Method Documentation

    ContactModel::exportContacts ( url url, list<string> profiles )

    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:

    • "Sync" exports contacts in sync mode, currently, this is the same as passing in an empty list, and is generally what you want.
    • "Backup" 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.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also QVersitContactHandlerFactory, QVersitContactHandlerFactory::ProfileSync, and QVersitContactHandlerFactory::ProfileBackup.


    ContactModel::fetchContacts ( list<int> contactIds )

    Fetch a list of contacts from the contacts store by given contactIds.

    This documentation was introduced in Qt Mobility Mobility 1.1.

    See also Contact::contactId.


    ContactModel::importContacts ( url url, list<string> profiles )

    Import contacts from a vcard by the given url and optional profiles. Supported profiles are:

    • "Sync" Imports contacts in sync mode, currently, this is the same as passing in an empty list, and is generally what you want.
    • "Backup" imports contacts in backup mode, use this mode if the vCard was generated by exporting in backup mode.

    This documentation was introduced in Qt Mobility 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 Qt Mobility Mobility 1.1.

    See also Contact::contactId.


    ContactModel::removeContacts ( list<int> contactIds )

    Remove the list of contacts from the contacts store by given contactIds.

    This documentation was introduced in Qt Mobility 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 Qt Mobility Mobility 1.1.

    See also Contact::modified.


    Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.2
    Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
    Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
     
     
     
     
    Partenaires

    Hébergement Web