Qt Contacts C++ API
Main Classes
Represents an addressbook contact | |
Mechanism for asynchronous requests to be made of a manager if it supports them | |
Interface for performing an action on a QContact or QContactDetail | |
Represents a single, complete detail about a contact | |
Used to select contacts made available through a QContactManager | |
Interface which allows clients with access to contact information stored in a particular backend | |
Simple class that emits a signal when a single particular contact is updated or deleted | |
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.
Contains an address of a contact | |
Contains a displayLabel of a contact | |
Contains an email address of a contact | |
Indicates if a contact is a favorite contact as well as the position it should appear in an ordered list of favorites | |
Aggregated presence information for a contact, synthesized or supplied by the backend | |
Contains a name of a contact | |
Phone number of a contact | |
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:
Allows a client to asynchronously request contacts from a contacts store manager, given a list of contact IDs | |
Allows a client to asynchronously request contacts from a contacts store manager | |
Allows a client to asynchronously request a list of contact ids from a contacts store manager | |
Allows a client to asynchronously request relationships from a contacts store manager | |
Allows a client to asynchronously request that certain relationships be removed from a contacts store | |
Allows a client to asynchronously request that certain groups be saved to a contacts store | |
Allows a client to asynchronously request that certain contacts be removed from a contacts store | |
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:
Filter based around an action availability criterion | |
Filter based around a contact timestamp criterion | |
Filter based around a detail value criterion | |
Filter based around a detail value range criterion | |
Filter based around a list of contact ids | |
Filter which intersects the results of other filters | |
Matches no contacts | |
Filter based around relationship criteria | |
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.
Interface for performing an action on a QContact or QContactDetail | |
Information that uniquely identifies a specific implementation of an action | |
Interface for clients to retrieve instances of action implementations | |
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.