KPeople 5.109.0
abstractcontact.h
1/*
2 SPDX-FileCopyrightText: 2014 Aleix Pol i Gonzalez <aleixpol@blue-systems.com>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef KPEOPLE_ABSTRACT_CONTACT_H
8#define KPEOPLE_ABSTRACT_CONTACT_H
9
10#include <QSharedData>
11#include <QVariant>
12#include <kpeoplebackend/kpeoplebackend_export.h>
13
14namespace KPeople
15{
27class KPEOPLEBACKEND_EXPORT AbstractContact : public QSharedData
28{
29public:
30 typedef QExplicitlySharedDataPointer<AbstractContact> Ptr;
31 typedef QList<AbstractContact::Ptr> List;
33 virtual ~AbstractContact();
34
35 // well-known properties
37 static const QString NameProperty;
38
40 static const QString EmailProperty;
41
43 static const QString PhoneNumberProperty;
44
46 static const QString AllPhoneNumbersProperty;
47
52 static const QString PresenceProperty;
53
57 static const QString PictureProperty;
58
60 static const QString GroupsProperty;
61
63 static const QString AllEmailsProperty;
64
66 static const QString VCardProperty;
67
73 virtual QVariant customProperty(const QString &key) const = 0;
74
75private:
76 Q_DISABLE_COPY(AbstractContact)
77};
78
79}
80
81Q_DECLARE_METATYPE(KPeople::AbstractContact::List)
82Q_DECLARE_METATYPE(KPeople::AbstractContact::Ptr)
83
84#endif
KPeople::AbstractContact is the class to provide the data from a given contact by the backends.
Definition abstractcontact.h:28
static const QString PictureProperty
QUrl or QPixmap property representing the contacts' avatar.
Definition abstractcontact.h:57
static const QString PresenceProperty
String property representing the IM presence of the contact.
Definition abstractcontact.h:52
static const QString NameProperty
String property representing the display name of the contact.
Definition abstractcontact.h:37
static const QString AllEmailsProperty
QVariantList property that lists the emails the contact has.
Definition abstractcontact.h:63
static const QString PhoneNumberProperty
String property representing the preferred phone number of the contact.
Definition abstractcontact.h:43
static const QString EmailProperty
String property representing the preferred name of the contact.
Definition abstractcontact.h:40
static const QString VCardProperty
QByteArray with the raw vcard information.
Definition abstractcontact.h:66
static const QString GroupsProperty
QVariantList property that lists the groups the contacts belongs to.
Definition abstractcontact.h:60
static const QString AllPhoneNumbersProperty
QVariantList property that lists all phone numbers the contact has.
Definition abstractcontact.h:46
virtual QVariant customProperty(const QString &key) const =0
Generic method to access a random contact property.