The QContact class provides an addressbook contact.
A QContact consists of zero or more details.
An instance of the QContact class represents an in-memory contact, and may not reflect the state of that contact found in persistent storage until the appropriate synchronisation method is called on the QContactManager (i.e., saveContact, removeContact).
Return a list of actions available to be performed on this contact which are offered by the vendor whose name is the given vendorName, where the action instance has the implementation version given by implementationVersion. If vendorName is empty, actions from any vendor are supplied; if implementationVersion is -1, action implementations of any version will be returned.
void QContact::clearDetails ()
Removes all details of the contact. This function does not modify the id or type of the contact. Calling isEmpty() after calling this function will return true.
Returns a list of ids of contacts which are related to this contact in a relationship of the given relationshipType, where those other contacts participate in the relationship in the given role
Returns the ordered list of relationships in which the contact is involved. By default, this list is equal to the cached list of relationships which is available by calling relationships().
Returns a list of relationships of the given relationshipType in which the contact was a participant at the time that it was retrieved from the manager
Saves the given detail in the list of stored details, and sets its Id. If another detail of the same type and Id has been previously saved in this contact, that detail is overwritten. Otherwise, a new Id is generated and set in the detail, and the detail is added to the list.
If detail is a contact type, the existing contact type will be overwritten with detail. There is never more than one contact type in a contact.
If detail is a display label, the operation will fail. The display label can never be updated manually and must be synthesized by the backend.
Returns true if the detail was saved successfully, otherwise returns false
Sets the id of this contact to id. Note that this only affects this structure, not any corresponding structures stored by a QContactManager.
If you change the id of a contact and save the contact in a manager, the previously existing contact will still exist. You can do this to create copies (possibly modified) of an existing contact.
Returns true if the id was set successfully, otherwise returns false.
Set a particular detail as the preferredDetail for a given actionName. Returns true if the detail was successfully set as the preferred detail for the action identified by actionName, otherwise returns false
Sets the order of importance of the relationships for this contact by saving a reordered list of relationships which involve the contact. The list must include all of the relationships in which the contact is involved, and must not include any relationships which do not involve the contact. In order for the ordering preference to be persisted, the contact must be saved in its manager.
It is possible that relationships will have been added or removed from the contact stored in the manager, thus rendering the relationship cache of the contact in memory stale. If this happens, attempting to save the contact after reordering its relationships will result in an error occurring. The updated relationships list must be retrieved from the manager, reordered and set in the contact before the contact can be saved successfully.
Returns the type of the contact. Every contact has exactly one type which is either set manually (by saving a modified copy of the QCotnactType in the contact, or by calling setType()) or synthesized automatically.
bool QContact::operator== ( const QContact & other ) const
Returns true if this contact is equal to the other contact, false if either the id or stored details are not the same
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.
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 !