KPeople 5.109.0
|
Provides access to all contacts and aggregates them by person.
KPeople offers unified access to our contacts from different sources, grouping them by person while still exposing all the data.
Furthermore, KPeople will also provide facilities to integrate the data provided in user interfaces by providing QML and Qt Widgets components.
The sources are plugin-based, allowing to easily extend the contacts collection.
To use KPeople, you'll want to look for it using
Or its qmake counterpart. Then you'll have available 3 different libraries to depend on:
This will allow access to the KPeople data from QML code-bases.
KPeople provides Qt models for accessing different person related data. KPeople::PersonsModel lists all available contacts. Actions for each contact can be accessed by providing KPeople::PersonActions with a KPeople::PersonsModel::personUri.
KPeople::PersonsModel and KPeople::PersonData also provide raw access to the VCard of a contact.
VCard is a standard that is supported on many platforms and supports storing all kind of information about a person, including instant messenger contacts, phone number, names etc. It can be processed using a KContacts::VCardConverter.
To make changes to a contact, its vcard can be edited by setting the custom property vcard of KPeople::PersonData to the new raw vcard data. New vcard data can be created using the KPeople::Addressee class, from which the KPeople::VCardConverter can create a vcard.
KPeople::PersonPluginManager provides static functions for adding and removing contacts.
KPeople::PersonPluginManager::addContact() can be fed with a QVariantMap, which has to contain the key “vcard” with vcard data.
KPeople::PersonPluginManager::deleteContact() deletes the contact with the specified uri.