Qt Contacts C++ API

Main Classes

QContact

Represents an addressbook contact

QContactAbstractRequest

Mechanism for asynchronous requests to be made of a manager if it supports them

QContactAction

Interface for performing an action on a QContact or QContactDetail

QContactDetail

Represents a single, complete detail about a contact

QContactFilter

Used to select contacts made available through a QContactManager

QContactManager

Interface which allows clients with access to contact information stored in a particular backend

QContactObserver

Simple class that emits a signal when a single particular contact is updated or deleted

QContactRelationship

Describes a one-to-one relationship between a locally-stored contact and another (possibly remote) contact

Contact Details Leaf Classes

Several subclasses of QContactDetail are provided as part of the Qt Contacts API. They are general in design but are intended to fulfill specific use-cases. Please note that certain backends may choose not to support one or more of these subclasses as they appear here; they may offer their own which provide similar functionality.

QContactAddress

Contains an address of a contact

QContactDisplayLabel

Contains a displayLabel of a contact

QContactEmailAddress

Contains an email address of a contact

QContactFavorite

Indicates if a contact is a favorite contact as well as the position it should appear in an ordered list of favorites

QContactGlobalPresence

Aggregated presence information for a contact, synthesized or supplied by the backend

QContactName

Contains a name of a contact

QContactPhoneNumber

Phone number of a contact

QContactTag

Contains a tag associated with a contact

Each of these subclasses provide access to information stored in fields which may have certain constraints, documented in each subclass documentation.

Asynchronous Requests

Clients may use either the synchronous or asynchronous API to access functionality provided by a manager backend. The Qt Contacts Asynchronous API is offered through subclasses of the QContactAbstractRequest class:

QContactFetchByIdRequest

Allows a client to asynchronously request contacts from a contacts store manager, given a list of contact IDs

QContactFetchRequest

Allows a client to asynchronously request contacts from a contacts store manager

QContactIdFetchRequest

Allows a client to asynchronously request a list of contact ids from a contacts store manager

QContactRelationshipFetchRequest

Allows a client to asynchronously request relationships from a contacts store manager

QContactRelationshipRemoveRequest

Allows a client to asynchronously request that certain relationships be removed from a contacts store

QContactRelationshipSaveRequest

Allows a client to asynchronously request that certain groups be saved to a contacts store

QContactRemoveRequest

Allows a client to asynchronously request that certain contacts be removed from a contacts store

QContactSaveRequest

Allows a client to asynchronously request that certain contacts be saved to a contacts store

Contact Selection

Clients may select a contact by specifying a unique contact id, or by supplying a QContactFilter which matches the contact or contacts they wish to select. The various derivatives of QContactFilter allow for fine-grained and flexible selection of contacts according to various criteria:

QContactActionFilter

Filter based around an action availability criterion

QContactChangeLogFilter

Filter based around a contact timestamp criterion

QContactDetailFilter

Filter based around a detail value criterion

QContactDetailRangeFilter

Filter based around a detail value range criterion

QContactIdFilter

Filter based around a list of contact ids

QContactIntersectionFilter

Filter which intersects the results of other filters

QContactInvalidFilter

Matches no contacts

QContactRelationshipFilter

Filter based around relationship criteria

QContactUnionFilter

Filter which unions the results of other filters

A client can also request that the results of such a selection be sorted, by passing a QContactSortOrder (or list of sort orders) to the manager.

Actions

Actions are described by descriptors and are instantiated by factories.

QContactAction

Interface for performing an action on a QContact or QContactDetail

QContactActionDescriptor

Information that uniquely identifies a specific implementation of an action

QContactActionFactory

Interface for clients to retrieve instances of action implementations

QContactActionTarget

Information about the target of an action. It may be either a contact, a contact and a detail of that contact, or a contact and a list of the details of the contact, which together should be used by the action

Backends

A backend implementor must implement the following interfaces:

For more information, see Qt Contacts Manager Engines.

Synchronization and Serialization

The Qt Contacts API is used by the Qt Versit module. It allows serialization of a QContact into a vCard document, and vice versa.