KPeople 5.109.0
|
Allows to query the information about a given person. More...
#include <persondata.h>
Properties | |
bool | isEditable |
QString | name |
QPixmap | photo |
QString | presenceIconName |
Signals | |
void | dataChanged () |
One of the contact sources has changed. | |
Public Member Functions | |
PersonData (const QString &id, QObject *parent=nullptr) | |
Creates a Person object from a given ID. | |
QStringList | allEmails () const |
Returns all e-mail addresses from the person. | |
QVariant | contactCustomProperty (const QString &key) const |
QStringList | contactUris () const |
Returns a list of contact ids that identify the PersonData instance. | |
QString | email () const |
Returns the contact's preferred email address. | |
QStringList | groups () const |
Returns all groups the person is in. | |
bool | isEditable () const |
bool | isValid () const |
Returns true if this PersonData is mapped to some existing contact. | |
QString | name () const |
QString | personUri () const |
Returns the person's id. | |
QPixmap | photo () const |
QUrl | pictureUrl () const |
Returns a the url of the picture that represents the contact. | |
QString | presence () const |
Returns the contact's online presence. | |
QString | presenceIconName () const |
bool | setContactCustomProperty (const QString &key, const QVariant &value) |
Sends a desired value for the contact according to the key . | |
Allows to query the information about a given person.
PersonData exposes the information of a given person (in contrast to everyone available, which is done by PersonsModel). This class will provide comfortable interfaces so it can be easily adopted in any application.
|
read |
KPeople::PersonData::PersonData | ( | const QString & | id, |
QObject * | parent = nullptr |
||
) |
Creates a Person object from a given ID.
The ID can be either a local application specific ID (such as akonadi://?item=15) or a kpeople ID in the form kpeople://15
QStringList KPeople::PersonData::allEmails | ( | ) | const |
Returns all e-mail addresses from the person.
QVariant KPeople::PersonData::contactCustomProperty | ( | const QString & | key | ) | const |
key
. QStringList KPeople::PersonData::contactUris | ( | ) | const |
Returns a list of contact ids that identify the PersonData instance.
|
signal |
One of the contact sources has changed.
QString KPeople::PersonData::email | ( | ) | const |
Returns the contact's preferred email address.
QStringList KPeople::PersonData::groups | ( | ) | const |
Returns all groups the person is in.
bool KPeople::PersonData::isEditable | ( | ) | const |
bool KPeople::PersonData::isValid | ( | ) | const |
Returns true if this PersonData is mapped to some existing contact.
QString KPeople::PersonData::name | ( | ) | const |
QString KPeople::PersonData::personUri | ( | ) | const |
Returns the person's id.
QPixmap KPeople::PersonData::photo | ( | ) | const |
QUrl KPeople::PersonData::pictureUrl | ( | ) | const |
Returns a the url of the picture that represents the contact.
QString KPeople::PersonData::presence | ( | ) | const |
Returns the contact's online presence.
QString KPeople::PersonData::presenceIconName | ( | ) | const |
bool KPeople::PersonData::setContactCustomProperty | ( | const QString & | key, |
const QVariant & | value | ||
) |
Sends a desired value
for the contact according to the key
.
It's not necessarily implemented. The back-end gets to decide whether a property can be set or not.