15#include "agerangetype.h"
18#include "braggingrights.h"
19#include "calendarurl.h"
20#include "clientdata.h"
21#include "coverphoto.h"
22#include "emailaddress.h"
24#include "externalid.h"
30#include "membership.h"
31#include "misckeyword.h"
34#include "occupation.h"
35#include "organization.h"
36#include "personlocale.h"
37#include "personmetadata.h"
38#include "phonenumber.h"
41#include "relationshipinterest.h"
42#include "relationshipstatus.h"
44#include "sipaddress.h"
48#include "userdefined.h"
54#include <KContacts/Addressee>
56namespace KGAPI2::People
61 explicit Private() =
default;
62 Private(
const Private &) =
default;
63 Private(Private &&) noexcept = delete;
64 Private &operator=(const Private &) = delete;
65 Private &operator=(Private &&) noexcept = delete;
68 bool operator==(const Private &other)
const
70 return nicknames == other.nicknames &&
71 emailAddresses == other.emailAddresses &&
72 clientData == other.clientData &&
73 braggingRights == other.braggingRights &&
74 relationshipStatuses == other.relationshipStatuses &&
75 birthdays == other.birthdays &&
76 relations == other.relations &&
77 locales == other.locales &&
78 locations == other.locations &&
79 externalIds == other.externalIds &&
80 ageRanges == other.ageRanges &&
81 taglines == other.taglines &&
82 userDefined == other.userDefined &&
83 biographies == other.biographies &&
84 sipAddresses == other.sipAddresses &&
85 memberships == other.memberships &&
86 skills == other.skills &&
87 residences == other.residences &&
88 names == other.names &&
89 calendarUrls == other.calendarUrls &&
90 coverPhotos == other.coverPhotos &&
91 addresses == other.addresses &&
93 phoneNumbers == other.phoneNumbers &&
94 imClients == other.imClients &&
95 events == other.events &&
96 photos == other.photos &&
97 occupations == other.occupations &&
98 miscKeywords == other.miscKeywords &&
99 relationshipInterests == other.relationshipInterests &&
100 resourceName == other.resourceName &&
101 interests == other.interests &&
102 organizations == other.organizations &&
103 urls == other.urls &&
104 genders == other.genders &&
105 fileAses == other.fileAses &&
106 ageRange == other.ageRange &&
107 metadata == other.metadata;
110 bool operator!=(
const Private &other)
const
112 return !(*
this == other);
119 setKContactAddresseeNameFields(addressee);
120 setKContactAddresseeNicknameFields(addressee);
121 setKContactAddresseeBirthdayFields(addressee);
122 setKContactAddresseeEmailFields(addressee);
123 setKContactAddresseePhoneFields(addressee);
124 setKContactAddresseeUrlFields(addressee);
125 setKContactAddresseeOrganizationFields(addressee);
126 setKContactAddresseeProfessionFields(addressee);
127 setKContactAddresseePhoto(addressee);
139 names = {Name::fromKContactsAddressee(addressee)};
142 const auto addresseeNickName = addressee.
nickName();
143 if (!addresseeNickName.isEmpty()) {
145 nickname.setValue(addresseeNickName);
146 nicknames = {nickname};
149 const auto addresseeBirthday = addressee.
birthday();
150 if (addresseeBirthday.isValid()) {
152 birthday.setDate(addresseeBirthday.date());
153 birthdays = {birthday};
156 const auto addresseeEmailList = addressee.emailList();
157 if (!addresseeEmailList.isEmpty()) {
158 emailAddresses = EmailAddress::fromKContactsEmailList(addresseeEmailList);
161 const auto addresseePhoneNumbers = addressee.
phoneNumbers();
162 if (!addresseePhoneNumbers.isEmpty()) {
163 phoneNumbers = PhoneNumber::fromKContactsPhoneNumberList(addressee.
phoneNumbers());
166 const auto addresseeProfession = addressee.
profession();
167 if (!addresseeProfession.isEmpty()) {
168 Occupation occupation;
169 occupation.setValue(addresseeProfession);
170 occupations = {occupation};
173 const auto addresseeOrganization = addressee.
organization();
174 const auto addresseeDepartment = addressee.
department();
175 if (!addresseeOrganization.isEmpty() || !addresseeDepartment.isEmpty()) {
177 organization.setName(addresseeOrganization);
178 organization.setDepartment(addresseeDepartment);
179 organizations = {organization};
182 const auto addresseePhoto = addressee.
photo();
183 if (!addresseePhoto.isEmpty()) {
185 photo.setUrl(addressee.
photo().
url());
189 const auto blogFeed = addressee.
blogFeed();
190 if (!blogFeed.isEmpty()) {
192 url.setValue(blogFeed.toString());
193 url.setType(QStringLiteral(
"blog"));
197 const auto addresseeUrls = addressee.extraUrlList();
198 for (
const auto &addresseeUrl : addresseeUrls) {
200 url.setValue(addresseeUrl.toString());
202 switch (addresseeUrl.type()) {
204 url.setType(QStringLiteral(
"home"));
207 url.setType(QStringLiteral(
"profile"));
210 url.setType(QStringLiteral(
"work"));
213 url.setType(QStringLiteral(
"ftp"));
216 url.setType(QStringLiteral(
"appInstallPage"));
219 url.setType(QStringLiteral(
"reservations"));
222 url.setType(QStringLiteral(
"other"));
228 const auto addressessCalendarUrls = addressee.calendarUrlList();
229 for (
const auto &calendarUrl : addressessCalendarUrls) {
230 CalendarUrl gCalendarUrl;
232 gCalendarUrl.setType(QStringLiteral(
"freeBusy"));
234 gCalendarUrl.setType(QStringLiteral(
"CALUri"));
236 gCalendarUrl.setType(QStringLiteral(
"CALADRUri"));
238 gCalendarUrl.setType(QStringLiteral(
"other"));
240 gCalendarUrl.setUrl(calendarUrl.url().toString());
241 calendarUrls.append(gCalendarUrl);
282 PersonMetadata metadata{};
287 if (names.isEmpty()) {
291 const auto nameToUse = names.first();
292 nameToUse.applyToKContactsAddressee(addressee);
297 if(nicknames.isEmpty()) {
302 const auto nicknameToUse = nicknames.first();
308 if(birthdays.isEmpty()) {
313 const auto birthdayToUse = birthdays.first();
319 KContacts::Email::List convertedEmails;
321 std::transform(emailAddresses.cbegin(),
322 emailAddresses.cend(),
323 std::back_inserter(convertedEmails),
324 [](
const EmailAddress &emailAddress) {
325 return emailAddress.toKContactsEmail();
328 addressee.setEmailList(convertedEmails);
335 std::transform(phoneNumbers.cbegin(),
337 std::back_inserter(convertedPhoneNumbers),
338 [](
const People::PhoneNumber &phoneNumber) {
339 return phoneNumber.toKContactsPhoneNumber();
342 addressee.setPhoneNumbers(convertedPhoneNumbers);
347 if (organizations.isEmpty()) {
353 const auto organizationToUse = organizations.first();
360 if (occupations.isEmpty()) {
365 const auto occupationToUse = occupations.first();
371 if (photos.isEmpty()) {
376 const auto photoToUse = photos.first();
383 if (urls.isEmpty()) {
386 addressee.setExtraUrlList({});
388 for (
const auto &url : std::as_const(urls)) {
411 resourceUrl.setUrl(
QUrl(url.value()));
413 addressee.insertExtraUrl(resourceUrl);
419 for (
const auto &calendarUrl : std::as_const(calendarUrls)) {
430 kCalendarUrl.setUrl(
QUrl(calendarUrl.url()));
431 addressee.insertCalendarUrl(kCalendarUrl);
451 d->nicknames = value;
456 d->nicknames.push_back(value);
461 d->nicknames.removeOne(value);
466 d->nicknames.clear();
471 return d->emailAddresses;
476 d->emailAddresses = value;
481 d->emailAddresses.push_back(value);
486 d->emailAddresses.removeOne(value);
491 d->emailAddresses.clear();
496 return d->clientData;
501 d->clientData = value;
506 d->clientData.push_back(value);
511 d->clientData.removeOne(value);
516 d->clientData.clear();
521 return d->braggingRights;
526 d->braggingRights = value;
531 d->braggingRights.push_back(value);
536 d->braggingRights.removeOne(value);
541 d->braggingRights.clear();
546 return d->relationshipStatuses;
555 d->birthdays = value;
560 d->birthdays.push_back(value);
565 d->birthdays.removeOne(value);
570 d->birthdays.clear();
580 d->relations = value;
585 d->relations.push_back(value);
590 d->relations.removeOne(value);
595 d->relations.clear();
610 d->locales.push_back(value);
615 d->locales.removeOne(value);
630 d->locations = value;
635 d->locations.push_back(value);
640 d->locations.removeOne(value);
645 d->locations.clear();
650 return d->externalIds;
655 d->externalIds = value;
660 d->externalIds.push_back(value);
665 d->externalIds.removeOne(value);
670 d->externalIds.clear();
683 return d->userDefined;
688 d->userDefined = value;
693 d->userDefined.push_back(value);
698 d->userDefined.removeOne(value);
703 d->userDefined.clear();
708 return d->biographies;
713 d->biographies = value;
718 d->biographies.push_back(value);
723 d->biographies.removeOne(value);
728 d->biographies.clear();
733 return d->sipAddresses;
738 d->sipAddresses = value;
743 d->sipAddresses.push_back(value);
748 d->sipAddresses.removeOne(value);
753 d->sipAddresses.clear();
758 return d->memberships;
763 d->memberships = value;
768 d->memberships.push_back(value);
773 d->memberships.removeOne(value);
778 d->memberships.clear();
793 d->skills.push_back(value);
798 d->skills.removeOne(value);
808 return d->residences;
813 d->residences = value;
818 d->residences.push_back(value);
823 d->residences.removeOne(value);
828 d->residences.clear();
843 d->names.push_back(value);
848 d->names.removeOne(value);
858 return d->calendarUrls;
863 d->calendarUrls = value;
868 d->calendarUrls.push_back(value);
873 d->calendarUrls.removeOne(value);
878 d->calendarUrls.clear();
883 return d->coverPhotos;
892 d->addresses = value;
897 d->addresses.push_back(value);
902 d->addresses.removeOne(value);
907 d->addresses.clear();
921 return d->phoneNumbers;
926 d->phoneNumbers = value;
931 d->phoneNumbers.push_back(value);
936 d->phoneNumbers.removeOne(value);
941 d->phoneNumbers.clear();
951 d->imClients = value;
956 d->imClients.push_back(value);
961 d->imClients.removeOne(value);
966 d->imClients.clear();
981 d->events.push_back(value);
986 d->events.removeOne(value);
1000 return d->occupations;
1005 d->occupations = value;
1010 d->occupations.push_back(value);
1015 d->occupations.removeOne(value);
1020 d->occupations.clear();
1025 return d->miscKeywords;
1030 d->miscKeywords = value;
1035 d->miscKeywords.push_back(value);
1040 d->miscKeywords.removeOne(value);
1045 d->miscKeywords.clear();
1050 return d->relationshipInterests;
1054 return d->resourceName;
1059 d->resourceName = value;
1063 return d->interests;
1068 d->interests = value;
1073 d->interests.push_back(value);
1078 d->interests.removeOne(value);
1083 d->interests.clear();
1088 return d->organizations;
1093 d->organizations = value;
1098 d->organizations.push_back(value);
1103 d->organizations.removeOne(value);
1108 d->organizations.clear();
1123 d->urls.push_back(value);
1128 d->urls.removeOne(value);
1148 d->genders.push_back(value);
1153 d->genders.removeOne(value);
1168 d->fileAses = value;
1173 d->fileAses.push_back(value);
1178 d->fileAses.removeOne(value);
1183 d->fileAses.clear();
1197 auto person =
new Person;
1200 person->d->resourceName = obj.
value(QStringLiteral(
"resourceName")).
toString();
1201 person->d->etag = obj.
value(QStringLiteral(
"etag")).
toString();
1204 person->d->metadata = PersonMetadata::fromJSON(
metadata);
1207 person->d->addresses = Address::fromJSONArray(
addresses);
1210 person->d->ageRanges = AgeRangeType::fromJSONArray(
ageRanges);
1213 person->d->biographies = Biography::fromJSONArray(
biographies);
1216 person->d->birthdays = Birthday::fromJSONArray(
birthdays);
1221 person->d->calendarUrls = CalendarUrl::fromJSONArray(
calendarUrls);
1224 person->d->clientData = ClientData::fromJSONArray(
clientData);
1227 person->d->coverPhotos = CoverPhoto::fromJSONArray(
coverPhotos);
1230 person->d->emailAddresses = EmailAddress::fromJSONArray(
emailAddresses);
1233 person->d->events = Event::fromJSONArray(
events);
1236 person->d->externalIds = ExternalId::fromJSONArray(
externalIds);
1239 person->d->fileAses = FileAs::fromJSONArray(
fileAses);
1242 person->d->genders = Gender::fromJSONArray(
genders);
1245 person->d->imClients = ImClient::fromJSONArray(
imClients);
1248 person->d->interests = Interest::fromJSONArray(
interests);
1251 person->d->locales = PersonLocale::fromJSONArray(
locales);
1254 person->d->locations = Location::fromJSONArray(
locations);
1257 person->d->memberships = Membership::fromJSONArray(
memberships);
1260 person->d->miscKeywords = MiscKeyword::fromJSONArray(
miscKeywords);
1263 person->d->names = Name::fromJSONArray(
names);
1266 person->d->nicknames = Nickname::fromJSONArray(
nicknames);
1269 person->d->occupations = Occupation::fromJSONArray(
occupations);
1272 person->d->organizations = Organization::fromJSONArray(
organizations);
1275 person->d->phoneNumbers = PhoneNumber::fromJSONArray(
phoneNumbers);
1278 person->d->photos = Photo::fromJSONArray(
photos);
1281 person->d->relations = Relation::fromJSONArray(
relations);
1288 person->d->sipAddresses = SipAddress::fromJSONArray(
sipAddresses);
1291 person->d->skills = Skill::fromJSONArray(
skills);
1296 person->d->urls = Url::fromJSONArray(
urls);
1299 person->d->userDefined = UserDefined::fromJSONArray(
userDefined);
1308 returnObject.
insert(QStringLiteral(
"resourceName"), d->resourceName);
1309 returnObject.
insert(QStringLiteral(
"etag"), d->etag);
1311 returnObject.
insert(QStringLiteral(
"metadata"), d->metadata.toJSON());
1314 for (
const auto &address : std::as_const(d->addresses)) {
1315 addressesArray.
append(address.toJSON());
1317 if (!addressesArray.
isEmpty()) {
1318 returnObject.
insert(QStringLiteral(
"addresses"), addressesArray);
1332 for (
const auto &biography : std::as_const(d->biographies)) {
1333 biographiesArray.
append(biography.toJSON());
1335 if (!biographiesArray.
isEmpty()) {
1336 returnObject.
insert(QStringLiteral(
"biographies"), biographiesArray);
1340 for (
const auto &birthday : std::as_const(d->birthdays)) {
1341 birthdaysArray.
append(birthday.toJSON());
1343 if (!birthdaysArray.
isEmpty()) {
1344 returnObject.
insert(QStringLiteral(
"birthdays"), birthdaysArray);
1348 for (
const auto &calendarUrl : std::as_const(d->calendarUrls)) {
1349 calendarUrlsArray.
append(calendarUrl.toJSON());
1351 if (!calendarUrlsArray.
isEmpty()) {
1352 returnObject.
insert(QStringLiteral(
"calendarUrls"), calendarUrlsArray);
1356 for (
const auto &
clientData : std::as_const(d->clientData)) {
1359 if (!clientDataArray.
isEmpty()) {
1360 returnObject.
insert(QStringLiteral(
"clientData"), clientDataArray);
1374 for (
const auto &emailAddress : std::as_const(d->emailAddresses)) {
1375 emailAddressesArray.
append(emailAddress.toJSON());
1377 if (!emailAddressesArray.
isEmpty()) {
1378 returnObject.
insert(QStringLiteral(
"emailAddresses"), emailAddressesArray);
1382 for (
const auto &event : std::as_const(d->events)) {
1386 returnObject.
insert(QStringLiteral(
"events"), eventsArray);
1390 for (
const auto &externalId : std::as_const(d->externalIds)) {
1391 externalIdsArray.
append(externalId.toJSON());
1393 if (!externalIdsArray.
isEmpty()) {
1394 returnObject.
insert(QStringLiteral(
"externalIds"), externalIdsArray);
1398 for (
const auto &fileAs : std::as_const(d->fileAses)) {
1399 fileAsesArray.
append(fileAs.toJSON());
1401 if (!fileAsesArray.
isEmpty()) {
1402 returnObject.
insert(QStringLiteral(
"fileAses"), fileAsesArray);
1406 for (
const auto &gender : std::as_const(d->genders)) {
1407 gendersArray.
append(gender.toJSON());
1409 if (!gendersArray.
isEmpty()) {
1410 returnObject.
insert(QStringLiteral(
"genders"), gendersArray);
1414 for (
const auto &imClient : std::as_const(d->imClients)) {
1415 imClientsArray.
append(imClient.toJSON());
1417 if (!imClientsArray.
isEmpty()) {
1418 returnObject.
insert(QStringLiteral(
"imClients"), imClientsArray);
1422 for (
const auto &interest : std::as_const(d->interests)) {
1423 interestsArray.
append(interest.toJSON());
1425 if (!interestsArray.
isEmpty()) {
1426 returnObject.
insert(QStringLiteral(
"interests"), interestsArray);
1430 for (
const auto &locale : std::as_const(d->locales)) {
1431 localesArray.
append(locale.toJSON());
1433 if (!localesArray.
isEmpty()) {
1434 returnObject.
insert(QStringLiteral(
"locales"), localesArray);
1438 for (
const auto &location : std::as_const(d->locations)) {
1441 if (!locationsArray.
isEmpty()) {
1442 returnObject.
insert(QStringLiteral(
"locations"), locationsArray);
1446 for (
const auto &membership : std::as_const(d->memberships)) {
1447 membershipsArray.
append(membership.toJSON());
1449 if (!membershipsArray.
isEmpty()) {
1450 returnObject.
insert(QStringLiteral(
"memberships"), membershipsArray);
1454 for (
const auto &miscKeyword : std::as_const(d->miscKeywords)) {
1455 miscKeywordsArray.
append(miscKeyword.toJSON());
1457 if (!miscKeywordsArray.
isEmpty()) {
1458 returnObject.
insert(QStringLiteral(
"miscKeywords"), miscKeywordsArray);
1462 for (
const auto &name : std::as_const(d->names)) {
1466 returnObject.
insert(QStringLiteral(
"names"), namesArray);
1470 for (
const auto &nickname : std::as_const(d->nicknames)) {
1471 nicknamesArray.
append(nickname.toJSON());
1473 if (!nicknamesArray.
isEmpty()) {
1474 returnObject.
insert(QStringLiteral(
"nicknames"), nicknamesArray);
1478 for (
const auto &occupation : std::as_const(d->occupations)) {
1479 occupationsArray.
append(occupation.toJSON());
1481 if (!occupationsArray.
isEmpty()) {
1482 returnObject.
insert(QStringLiteral(
"occupations"), occupationsArray);
1486 for (
const auto &organization : std::as_const(d->organizations)) {
1487 organizationsArray.
append(organization.toJSON());
1489 if (!organizationsArray.
isEmpty()) {
1490 returnObject.
insert(QStringLiteral(
"organizations"), organizationsArray);
1494 for (
const auto &phoneNumber : std::as_const(d->phoneNumbers)) {
1495 phoneNumbersArray.
append(phoneNumber.toJSON());
1497 if (!phoneNumbersArray.
isEmpty()) {
1498 returnObject.
insert(QStringLiteral(
"phoneNumbers"), phoneNumbersArray);
1512 for (
const auto &relation : std::as_const(d->relations)) {
1513 relationsArray.
append(relation.toJSON());
1515 if (!relationsArray.
isEmpty()) {
1516 returnObject.
insert(QStringLiteral(
"relations"), relationsArray);
1524 for (
const auto &sipAddress : std::as_const(d->sipAddresses)) {
1525 sipAddressesArray.
append(sipAddress.toJSON());
1527 if (!sipAddressesArray.
isEmpty()) {
1528 returnObject.
insert(QStringLiteral(
"sipAddresses"), sipAddressesArray);
1532 for (
const auto &skill : std::as_const(d->skills)) {
1533 skillsArray.
append(skill.toJSON());
1536 returnObject.
insert(QStringLiteral(
"skills"), skillsArray);
1540 for (
const auto &url : std::as_const(d->urls)) {
1541 urlsArray.
append(url.toJSON());
1544 returnObject.
insert(QStringLiteral(
"urls"), urlsArray);
1548 for (
const auto &
userDefined : std::as_const(d->userDefined)) {
1551 if (!userDefinedArray.
isEmpty()) {
1552 returnObject.
insert(QStringLiteral(
"userDefined"), userDefinedArray);
1555 return returnObject;
1560 return d->toKContactsAddressee();
1565 auto person =
new Person;
1566 person->d->setFromKContactsAddressee(addressee);
1567 return PersonPtr(person);
1570bool Person::operator==(
const Person &other)
const
1572 if (!Object::operator==(other)) {
1576 if (d->resourceName != other.d->resourceName) {
1577 qCDebug(KGAPIDebug) <<
"Resource name does not match"
1579 << other.d->resourceName;
1582 if (d->etag != other.d->etag) {
1583 qCDebug(KGAPIDebug) <<
"Etag does not match"
1588 if (d->metadata != other.d->metadata) {
1589 qCDebug(KGAPIDebug) <<
"Metadata does not match"
1590 << d->metadata.deleted() << other.d->metadata.deleted()
1591 << d->metadata.linkedPeopleResourceNames() << other.d->metadata.linkedPeopleResourceNames()
1592 << d->metadata.previousResourceNames() << other.d->metadata.previousResourceNames();
1596 return *d.get() == *d.get();
Base class for all objects.
A person's physical address.
A person's short biography.
DEPRECATED: No data will be returned A person's bragging rights.
Arbitrary client data that is populated by clients.
A person's email address.
An event related to the person.
An identifier from an external entity related to the person.
The name that should be used to sort the person in a list.
A person's instant messaging client.
One of the person's interests.
A person's membership in a group.
A person's miscellaneous keyword.
A person's past or current organization.
A person's locale preference.
QString etag() const
The HTTP entity tag of the resource.
void clearExternalIds()
Clears the list of externalIds.
void removeAddress(const Address &value)
Removes the given value from the list of addresses if it exists.
QList< Url > urls() const
The person's associated URLs.
QList< ClientData > clientData() const
The person's client data.
QList< Tagline > taglines() const
Output only.
QList< SipAddress > sipAddresses() const
The person's SIP addresses.
QList< PhoneNumber > phoneNumbers() const
The person's phone numbers.
void clearLocales()
Clears the list of locales.
void setInterests(const QList< Interest > &value)
Sets value of the interests property.
QList< BraggingRights > braggingRights() const
DEPRECATED: No data will be returned The person's bragging rights.
void setSipAddresses(const QList< SipAddress > &value)
Sets value of the sipAddresses property.
QList< RelationshipInterest > relationshipInterests() const
Output only.
void addMembership(const Membership &value)
Appends the given value to the list of memberships.
QList< Residence > residences() const
DEPRECATED: (Please use person.locations instead) The person's residences.
void clearGenders()
Clears the list of genders.
void addLocation(const Location &value)
Appends the given value to the list of locations.
QList< RelationshipStatus > relationshipStatuses() const
Output only.
QList< Organization > organizations() const
The person's past or current organizations.
QList< MiscKeyword > miscKeywords() const
The person's miscellaneous keywords.
QList< Interest > interests() const
The person's interests.
void clearBraggingRights()
Clears the list of braggingRights.
void addUserDefined(const UserDefined &value)
Appends the given value to the list of userDefined.
void setBirthdays(const QList< Birthday > &value)
Sets value of the birthdays property.
void removeClientData(const ClientData &value)
Removes the given value from the list of clientData if it exists.
void removeBiography(const Biography &value)
Removes the given value from the list of biographies if it exists.
void addRelation(const Relation &value)
Appends the given value to the list of relations.
void clearFileAses()
Clears the list of fileAses.
void addFileAs(const FileAs &value)
Appends the given value to the list of fileAses.
void clearSkills()
Clears the list of skills.
void removeOccupation(const Occupation &value)
Removes the given value from the list of occupations if it exists.
void addEmailAddress(const EmailAddress &value)
Appends the given value to the list of emailAddresses.
QList< ImClient > imClients() const
The person's instant messaging clients.
void setResidences(const QList< Residence > &value)
Sets value of the residences property.
void setEtag(const QString &value)
Sets value of the etag property.
QString resourceName() const
The resource name for the person, assigned by the server.
void addBraggingRights(const BraggingRights &value)
Appends the given value to the list of braggingRights.
void setUrls(const QList< Url > &value)
Sets value of the urls property.
QList< Photo > photos() const
Output only.
void setImClients(const QList< ImClient > &value)
Sets value of the imClients property.
Person::AgeRange ageRange() const
Output only.
PersonMetadata metadata() const
Output only.
void removeMiscKeyword(const MiscKeyword &value)
Removes the given value from the list of miscKeywords if it exists.
void setLocations(const QList< Location > &value)
Sets value of the locations property.
void setResourceName(const QString &value)
Sets value of the resourceName property.
QList< Gender > genders() const
The person's genders.
QList< EmailAddress > emailAddresses() const
The person's email addresses.
void setOccupations(const QList< Occupation > &value)
Sets value of the occupations property.
void addName(const Name &value)
Appends the given value to the list of names.
void addOrganization(const Organization &value)
Appends the given value to the list of organizations.
void setEvents(const QList< Event > &value)
Sets value of the events property.
QList< Biography > biographies() const
The person's biographies.
void setExternalIds(const QList< ExternalId > &value)
Sets value of the externalIds property.
void clearOrganizations()
Clears the list of organizations.
void removeName(const Name &value)
Removes the given value from the list of names if it exists.
void removeEmailAddress(const EmailAddress &value)
Removes the given value from the list of emailAddresses if it exists.
void removeExternalId(const ExternalId &value)
Removes the given value from the list of externalIds if it exists.
void removeFileAs(const FileAs &value)
Removes the given value from the list of fileAses if it exists.
void setNames(const QList< Name > &value)
Sets value of the names property.
void setOrganizations(const QList< Organization > &value)
Sets value of the organizations property.
void clearEvents()
Clears the list of events.
void removeSkill(const Skill &value)
Removes the given value from the list of skills if it exists.
void clearCalendarUrls()
Clears the list of calendarUrls.
QList< FileAs > fileAses() const
The person's file-ases.
void addUrl(const Url &value)
Appends the given value to the list of urls.
void clearMemberships()
Clears the list of memberships.
void clearNicknames()
Clears the list of nicknames.
QList< ExternalId > externalIds() const
The person's external IDs.
void addEvent(const Event &value)
Appends the given value to the list of events.
void removeEvent(const Event &value)
Removes the given value from the list of events if it exists.
void removePhoneNumber(const PhoneNumber &value)
Removes the given value from the list of phoneNumbers if it exists.
void setClientData(const QList< ClientData > &value)
Sets value of the clientData property.
void clearRelations()
Clears the list of relations.
void setBraggingRights(const QList< BraggingRights > &value)
Sets value of the braggingRights property.
QList< PersonLocale > locales() const
The person's locale preferences.
void addMiscKeyword(const MiscKeyword &value)
Appends the given value to the list of miscKeywords.
QList< Relation > relations() const
The person's relations.
void removeSipAddress(const SipAddress &value)
Removes the given value from the list of sipAddresses if it exists.
void clearUrls()
Clears the list of urls.
void removeLocation(const Location &value)
Removes the given value from the list of locations if it exists.
QList< CoverPhoto > coverPhotos() const
Output only.
QList< Nickname > nicknames() const
The person's nicknames.
void removeImClient(const ImClient &value)
Removes the given value from the list of imClients if it exists.
void clearOccupations()
Clears the list of occupations.
QList< Membership > memberships() const
The person's group memberships.
void addInterest(const Interest &value)
Appends the given value to the list of interests.
void setEmailAddresses(const QList< EmailAddress > &value)
Sets value of the emailAddresses property.
void addPersonLocale(const PersonLocale &value)
Appends the given value to the list of locales.
void addSkill(const Skill &value)
Appends the given value to the list of skills.
void clearImClients()
Clears the list of imClients.
QList< Location > locations() const
The person's locations.
void setAddresses(const QList< Address > &value)
Sets value of the addresses property.
QList< AgeRangeType > ageRanges() const
Output only.
QList< Event > events() const
The person's events.
void clearNames()
Clears the list of names.
void setPhoneNumbers(const QList< PhoneNumber > &value)
Sets value of the phoneNumbers property.
void clearEmailAddresses()
Clears the list of emailAddresses.
QList< CalendarUrl > calendarUrls() const
The person's calendar URLs.
void clearMiscKeywords()
Clears the list of miscKeywords.
void clearLocations()
Clears the list of locations.
void removeNickname(const Nickname &value)
Removes the given value from the list of nicknames if it exists.
void removeRelation(const Relation &value)
Removes the given value from the list of relations if it exists.
void setRelations(const QList< Relation > &value)
Sets value of the relations property.
void clearResidences()
Clears the list of residences.
void addExternalId(const ExternalId &value)
Appends the given value to the list of externalIds.
void removeUrl(const Url &value)
Removes the given value from the list of urls if it exists.
void addResidence(const Residence &value)
Appends the given value to the list of residences.
void setCalendarUrls(const QList< CalendarUrl > &value)
Sets value of the calendarUrls property.
void removeBirthday(const Birthday &value)
Removes the given value from the list of birthdays if it exists.
void addPhoneNumber(const PhoneNumber &value)
Appends the given value to the list of phoneNumbers.
void setMiscKeywords(const QList< MiscKeyword > &value)
Sets value of the miscKeywords property.
void addGender(const Gender &value)
Appends the given value to the list of genders.
void addOccupation(const Occupation &value)
Appends the given value to the list of occupations.
void removeInterest(const Interest &value)
Removes the given value from the list of interests if it exists.
void clearPhoneNumbers()
Clears the list of phoneNumbers.
void removeCalendarUrl(const CalendarUrl &value)
Removes the given value from the list of calendarUrls if it exists.
QList< Occupation > occupations() const
The person's occupations.
void addBirthday(const Birthday &value)
Appends the given value to the list of birthdays.
void setMemberships(const QList< Membership > &value)
Sets value of the memberships property.
void removeUserDefined(const UserDefined &value)
Removes the given value from the list of userDefined if it exists.
QList< Skill > skills() const
The person's skills.
QList< Name > names() const
The person's names.
void setNicknames(const QList< Nickname > &value)
Sets value of the nicknames property.
void addSipAddress(const SipAddress &value)
Appends the given value to the list of sipAddresses.
void clearBiographies()
Clears the list of biographies.
void removePersonLocale(const PersonLocale &value)
Removes the given value from the list of locales if it exists.
void removeMembership(const Membership &value)
Removes the given value from the list of memberships if it exists.
void addAddress(const Address &value)
Appends the given value to the list of addresses.
void setBiographies(const QList< Biography > &value)
Sets value of the biographies property.
QList< Birthday > birthdays() const
The person's birthdays.
void clearAddresses()
Clears the list of addresses.
void setUserDefined(const QList< UserDefined > &value)
Sets value of the userDefined property.
void setSkills(const QList< Skill > &value)
Sets value of the skills property.
void setFileAses(const QList< FileAs > &value)
Sets value of the fileAses property.
QList< Address > addresses() const
The person's street addresses.
void clearBirthdays()
Clears the list of birthdays.
void removeGender(const Gender &value)
Removes the given value from the list of genders if it exists.
void addCalendarUrl(const CalendarUrl &value)
Appends the given value to the list of calendarUrls.
void clearSipAddresses()
Clears the list of sipAddresses.
void clearUserDefined()
Clears the list of userDefined.
void addImClient(const ImClient &value)
Appends the given value to the list of imClients.
void addNickname(const Nickname &value)
Appends the given value to the list of nicknames.
QList< UserDefined > userDefined() const
The person's user defined data.
void clearClientData()
Clears the list of clientData.
Person()
Construcuts a new Person.
void removeResidence(const Residence &value)
Removes the given value from the list of residences if it exists.
void clearInterests()
Clears the list of interests.
void setGenders(const QList< Gender > &value)
Sets value of the genders property.
void setLocales(const QList< PersonLocale > &value)
Sets value of the locales property.
void addClientData(const ClientData &value)
Appends the given value to the list of clientData.
void addBiography(const Biography &value)
Appends the given value to the list of biographies.
void removeOrganization(const Organization &value)
Removes the given value from the list of organizations if it exists.
void removeBraggingRights(const BraggingRights &value)
Removes the given value from the list of braggingRights if it exists.
A person's relation to another person.
DEPRECATED: Please use person.locations instead.
A skill that the person has.
A person's associated URLs.
Arbitrary user data that is populated by the end users.
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
A job to fetch a single map tile described by a StaticMapUrl.
QVariant location(const QVariant &res)
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
QString name(StandardAction id)
void append(const QJsonValue &value)
bool isEmpty() const const
iterator insert(QLatin1StringView key, const QJsonValue &value)
bool isEmpty() const const
QJsonValue value(QLatin1StringView key) const const
QJsonArray toArray() const const
QJsonObject toObject() const const
QString toString() const const
bool isEmpty() const const