![]() |
Home · All Classes · All Functions · | ![]() |
The QContact class provides an addressbook contact. More...
#include <QContact>
QContact () | |
QContact ( const QContact & other ) | |
~QContact () | |
QList<QContactActionDescriptor> | availableActions ( const QString & vendorName = QString(), int implementationVersion = -1 ) const |
void | clearDetails () |
QContactDetail | detail ( const QString & definitionName ) const |
T | detail () const |
QContactDetail | detailWithAction ( const QString & actionName ) const |
QList<QContactDetail> | details ( const QString & definitionName = QString() ) const |
QList<T> | details () const |
QList<T> | details ( const QString & fieldName, const QString & value ) const |
QList<QContactDetail> | details ( const QString & definitionName, const QString & fieldName, const QString & value ) const |
QList<QContactDetail> | detailsWithAction ( const QString & actionName ) const |
QString | displayLabel () const |
QContactId | id () const |
bool | isEmpty () const |
bool | isPreferredDetail ( const QString & actionName, const QContactDetail & detail ) const (preliminary) |
QContactLocalId | localId () const |
QContactDetail | preferredDetail ( const QString & actionName ) const (preliminary) |
QList<QContactId> | relatedContacts ( const QString & relationshipType = QString(), QContactRelationshipFilter::Role role = QContactRelationshipFilter::Either ) const (preliminary) |
QList<QContactRelationship> | relationshipOrder () const (preliminary) |
QList<QContactRelationship> | relationships ( const QString & relationshipType = QString() ) const (preliminary) |
bool | removeDetail ( QContactDetail * detail ) |
bool | saveDetail ( QContactDetail * detail ) |
void | setId ( const QContactId & id ) |
bool | setPreferredDetail ( const QString & actionName, const QContactDetail & preferredDetail ) (preliminary) |
void | setRelationshipOrder ( const QList<QContactRelationship> & reordered ) (preliminary) |
void | setType ( const QString & type ) |
void | setType ( const QContactType & type ) |
QString | type () const |
bool | operator!= ( const QContact & other ) const |
QContact & | operator= ( const QContact & other ) |
bool | operator== ( const QContact & other ) const |
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).
See also QContactManager and QContactDetail.
Construct an empty contact.
Initializes this QContact from other
Frees the memory used by this QContact
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.
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 the first detail stored in the contact which is of the given definitionName
Returns the first detail of the template type
Retrieve the first detail for which the given actionName is available
Returns a list of details of the given definitionName
Returns a list of details of the template type
Returns a list of details of the template type which match the fieldName and value criteria
Returns a list of details of the given definitionName, fieldName and field value
Retrieve any details for which the given actionName is available
Returns the read-only display label of this contact. A contact which has been retrieved from a manager will have a display label synthesized for it.
Returns the QContactId that identifies this contact
See also setId().
Returns true if this QContact is empty, false if not.
An empty QContact has an empty label and no extra details. The type of the contact is irrelevant.
This function is under development and is subject to change.
Returns true if the given detail is a preferred detail for the given actionName, or for any action if the actionName is empty
Returns the QContactLocalId that identifies this contact within its manager
This function is under development and is subject to change.
Returns the preferred detail for a given actionName
See also setPreferredDetail().
This function is under development and is subject to change.
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
This function is under development and is subject to change.
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().
See also setRelationshipOrder().
This function is under development and is subject to change.
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
Removes the detail from the contact.
The detail in the contact which has the same key as that of the given detail will be removed if it exists. That is, the information in the detail may be different. Any preference for the given field is also removed.
If the detail's access constraint includes QContactDetail::Irremovable, this function will return false.
Returns true if the detail was removed successfully, false if an error occurred.
Note that the caller retains ownership of the detail.
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 the detail's access constraint includes QContactDetail::ReadOnly, this function will return false.
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. The supplied detail will have its accessConstraint set to QContactDetail::Irremovable.
If detail is a display label, the supplied detail will have its accessConstraint set to QContactDetail::Irremovable | QContactDetail::ReadOnly, and the function will return false.
Returns true if the detail was saved successfully, otherwise returns false.
Note that the caller retains ownership of the detail.
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.
See also id().
This function is under development and is subject to change.
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
See also preferredDetail().
This function is under development and is subject to change.
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.
See also relationships() and relationshipOrder().
Sets the type of the contact to the given type.
See also type().
Sets the type of the contact to the given type.
Returns the type of the contact. Every contact has exactly one type which is either set manually (by saving a modified copy of the QContactType in the contact, or by calling setType()) or synthesized automatically.
See also setType().
Returns true if this contacts Id or details are different to those of the other contact
Replace the contents of this QContact with other
Returns true if this contact is equal to the other contact, false if either the id or stored details are not the same
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 |