1/****************************************************************************
2**
3** Copyright (C) 2015 The Qt Company Ltd.
4** Contact: http://www.qt.io/licensing/
5**
6** This file is part of the QtQml module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL21$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see http://www.qt.io/terms-conditions. For further
15** information use the contact form at http://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 2.1 or version 3 as published by the Free
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the
22** following information to ensure the GNU Lesser General Public License
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25**
26** As a special exception, The Qt Company gives you certain additional
27** rights. These rights are described in The Qt Company LGPL Exception
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29**
30** $QT_END_LICENSE$
31**
32****************************************************************************/
33
34#include "qdeclarativecontactdetail_p.h"
35
36#include "qdeclarativecontactdetails_p.h"
37#include "qdeclarativecontact_p.h"
38
39#include <QtQml/QJSValue>
40
41QTCONTACTS_USE_NAMESPACE
42
43QT_BEGIN_NAMESPACE
44
45/* ==================== QDeclarativeContactDetail ======================= */
46
47/*!
48 \qmltype ContactDetail
49 \instantiates QDeclarativeContactDetail
50 \brief The ContactDetail element represents a single, complete detail about a contact.
51 \ingroup qml-contacts-main
52 \inqmlmodule QtContacts
53
54 \sa QContactDetail
55
56 The ContactDetail element is part of the \b{QtContacts} module.
57*/
58
59QDeclarativeContactDetail::QDeclarativeContactDetail(QObject* parent)
60 :QObject(parent)
61{
62 QDeclarativeContact* c = qobject_cast<QDeclarativeContact*>(object: parent);
63 if (c)
64 connect(sender: this, SIGNAL(detailChanged()), receiver: c, SIGNAL(contactChanged()));
65}
66
67QDeclarativeContactDetail::~QDeclarativeContactDetail()
68{
69}
70
71QContactDetail& QDeclarativeContactDetail::detail()
72{
73 return m_detail;
74}
75
76const QContactDetail& QDeclarativeContactDetail::detail() const
77{
78 return m_detail;
79}
80
81void QDeclarativeContactDetail::setDetail(const QContactDetail& detail)
82{
83 m_detail = detail;
84 emit detailChanged();
85}
86
87/*!
88 \qmlproperty list<int> ContactDetail::contexts
89 This property holds one or more contexts that this detail is associated with.
90*/
91QList<int> QDeclarativeContactDetail::contexts() const
92{
93 return m_detail.contexts();
94}
95void QDeclarativeContactDetail::setContexts(const QList<int>& contexts)
96{
97 m_detail.setContexts(contexts);
98}
99
100/*!
101 \qmlproperty bool ContactDetail::readOnly
102
103 This property indicates whether or not this detail is writable.
104 This property is read only.
105*/
106bool QDeclarativeContactDetail::readOnly() const
107{
108 return m_detail.accessConstraints().testFlag(flag: QContactDetail::ReadOnly);
109}
110
111/*!
112 \qmlproperty bool ContactDetail::removable
113
114 This property indicates whether or not this detail is removale.
115 This property is read only.
116*/
117bool QDeclarativeContactDetail::removable() const
118{
119 return !m_detail.accessConstraints().testFlag(flag: QContactDetail::Irremovable);
120}
121
122/*!
123 \qmlproperty string ContactDetail::detailUri
124
125 This property holds the unique URI of the detail if one exists.
126*/
127QString QDeclarativeContactDetail::detailUri() const
128{
129 return m_detail.detailUri();
130}
131void QDeclarativeContactDetail::setDetailUri(const QString& detailUri)
132{
133 m_detail.setDetailUri(detailUri);
134}
135
136/*!
137 \qmlproperty list<string> ContactDetail::linkedDetailUris
138
139 This property holds a list of detail URIs to which this detail is linked.
140*/
141QStringList QDeclarativeContactDetail::linkedDetailUris() const
142{
143 return m_detail.linkedDetailUris();
144}
145void QDeclarativeContactDetail::setLinkedDetailUris(const QStringList& linkedDetailUris)
146{
147 m_detail.setLinkedDetailUris(linkedDetailUris);
148}
149
150/*!
151 \qmlproperty enumeration ContactDetail::type
152
153 This property holds the type of the detail.
154
155 \list
156 \li ContactDetail.Address
157 \li ContactDetail.Anniversary
158 \li ContactDetail.Avatar
159 \li ContactDetail.Birthday
160 \li ContactDetail.DisplayLabel
161 \li ContactDetail.Email
162 \li ContactDetail.ExtendedDetail
163 \li ContactDetail.Family
164 \li ContactDetail.Favorite
165 \li ContactDetail.Gender
166 \li ContactDetail.Geolocation
167 \li ContactDetail.GlobalPresence
168 \li ContactDetail.Guid
169 \li ContactDetail.Hobby
170 \li ContactDetail.Name
171 \li ContactDetail.NickName
172 \li ContactDetail.Note
173 \li ContactDetail.OnlineAccount
174 \li ContactDetail.Organization
175 \li ContactDetail.PhoneNumber
176 \li ContactDetail.Presence
177 \li ContactDetail.Ringtone
178 \li ContactDetail.SyncTarget
179 \li ContactDetail.Tag
180 \li ContactDetail.Timestamp
181 \li ContactDetail.Url
182 \li ContactDetail.Version
183 \li ContactDetail.Unknown
184 \endlist
185
186 This property is read only.
187*/
188QDeclarativeContactDetail::DetailType QDeclarativeContactDetail::detailType() const
189{
190 return Unknown;
191}
192
193/*!
194 \qmlproperty list<int> ContactDetail::fields
195
196 This property holds the list of all fields which this detail supports.
197
198 This property is read only.
199*/
200QList<int> QDeclarativeContactDetail::fields() const
201{
202 return m_detail.values().keys();
203}
204
205QVariant QDeclarativeContactDetail::value(int field) const
206{
207 return m_detail.value(field);
208}
209
210bool QDeclarativeContactDetail::setValue(int field, const QVariant& v)
211{
212 bool changed = false;
213
214 if (value(field) != v)
215 changed = m_detail.setValue(field, value: v);
216
217 if (changed)
218 emit detailChanged();
219
220 return changed;
221}
222
223/*!
224 \qmlmethod bool Detail::removeValue(field)
225
226 Removes the value stored in this detail for the given \a field. Returns true if a value was stored for
227 the given field and the operation succeeded, and false otherwise.
228*/
229bool QDeclarativeContactDetail::removeValue(int field)
230{
231 bool ok = m_detail.removeValue(field);
232 if (ok)
233 emit detailChanged();
234 return ok;
235}
236
237QDeclarativeContactDetail *QDeclarativeContactDetailFactory::createContactDetail(QDeclarativeContactDetail::DetailType type)
238{
239 QDeclarativeContactDetail *contactDetail;
240 if (type == QDeclarativeContactDetail::Address)
241 contactDetail = new QDeclarativeContactAddress;
242 else if (type == QDeclarativeContactDetail::Anniversary)
243 contactDetail = new QDeclarativeContactAnniversary;
244 else if (type == QDeclarativeContactDetail::Avatar)
245 contactDetail = new QDeclarativeContactAvatar;
246 else if (type == QDeclarativeContactDetail::Birthday)
247 contactDetail = new QDeclarativeContactBirthday;
248 else if (type == QDeclarativeContactDetail::DisplayLabel)
249 contactDetail = new QDeclarativeContactDisplayLabel;
250 else if (type == QDeclarativeContactDetail::Email)
251 contactDetail = new QDeclarativeContactEmailAddress;
252 else if (type == QDeclarativeContactDetail::ExtendedDetail)
253 contactDetail = new QDeclarativeContactExtendedDetail;
254 else if (type == QDeclarativeContactDetail::Family)
255 contactDetail = new QDeclarativeContactFamily;
256 else if (type == QDeclarativeContactDetail::Favorite)
257 contactDetail = new QDeclarativeContactFavorite;
258 else if (type == QDeclarativeContactDetail::Gender)
259 contactDetail = new QDeclarativeContactGender;
260 else if (type == QDeclarativeContactDetail::Geolocation)
261 contactDetail = new QDeclarativeContactGeoLocation;
262 else if (type == QDeclarativeContactDetail::GlobalPresence)
263 contactDetail = new QDeclarativeContactGlobalPresence;
264 else if (type == QDeclarativeContactDetail::Guid)
265 contactDetail = new QDeclarativeContactGuid;
266 else if (type == QDeclarativeContactDetail::Hobby)
267 contactDetail = new QDeclarativeContactHobby;
268 else if (type == QDeclarativeContactDetail::Name)
269 contactDetail = new QDeclarativeContactName;
270 else if (type == QDeclarativeContactDetail::NickName)
271 contactDetail = new QDeclarativeContactNickname;
272 else if (type == QDeclarativeContactDetail::Note)
273 contactDetail = new QDeclarativeContactNote;
274 else if (type == QDeclarativeContactDetail::OnlineAccount)
275 contactDetail = new QDeclarativeContactOnlineAccount;
276 else if (type == QDeclarativeContactDetail::Organization)
277 contactDetail = new QDeclarativeContactOrganization;
278 else if (type == QDeclarativeContactDetail::PhoneNumber)
279 contactDetail = new QDeclarativeContactPhoneNumber;
280 else if (type == QDeclarativeContactDetail::Presence)
281 contactDetail = new QDeclarativeContactPresence;
282 else if (type == QDeclarativeContactDetail::Ringtone)
283 contactDetail = new QDeclarativeContactRingtone;
284 else if (type == QDeclarativeContactDetail::SyncTarget)
285 contactDetail = new QDeclarativeContactSyncTarget;
286 else if (type == QDeclarativeContactDetail::Tag)
287 contactDetail = new QDeclarativeContactTag;
288 else if (type == QDeclarativeContactDetail::Timestamp)
289 contactDetail = new QDeclarativeContactTimestamp;
290 else if (type == QDeclarativeContactDetail::Type)
291 contactDetail = new QDeclarativeContactType;
292 else if (type == QDeclarativeContactDetail::Url)
293 contactDetail = new QDeclarativeContactUrl;
294 else if (type == QDeclarativeContactDetail::Version)
295 contactDetail = new QDeclarativeContactVersion;
296 else
297 contactDetail = new QDeclarativeContactDetail;
298 return contactDetail;
299}
300
301/* ==================== QDeclarativeContactAddress ======================= */
302
303/*!
304 \qmltype Address
305 \instantiates QDeclarativeContactAddress
306 \brief The Address element contains an address of a contact.
307 \ingroup qml-contacts-details
308 \inqmlmodule QtContacts
309
310 The fields in the Address element are based on the segments
311 of the ADR property of a Versit vCard file.
312
313 Address element contains the following field types:
314 \list
315 \li Address.Street
316 \li Address.Locality
317 \li Address.Region
318 \li Address.PostCode
319 \li Address.Country
320 \li Address.SubTypes
321 \li Address.PostOfficeBox
322 \endlist
323
324 Versit \reg is a trademark of the Internet Mail Consortium.
325 This element is part of the \b{QtContacts} module.
326*/
327/*!
328 \qmlproperty string Address::street
329
330 This property holds the street number and street name of the address.
331*/
332/*!
333 \qmlproperty string Address::locality
334
335 This property holds the name of the city, town or suburb of the address.
336*/
337/*!
338 \qmlproperty string Address::region
339
340 This property holds the name or identifier of the state, province or region of the address.
341*/
342/*!
343 \qmlproperty string Address::postcode
344
345 This property holds the postal code for the address.
346*/
347/*!
348 \qmlproperty string Address::country
349
350 This property holds the name of the country of the address.
351*/
352/*!
353 \qmlproperty list<variant> Address::subTypes
354
355 This property stores the sub types of the address.
356
357 \list
358 \li Address.Parcel - An address for parcel delivery.
359 \li Address.Postal - An address for postal delivery.
360 \li Address.Domestic - An address for domestic mail delivery.
361 \li Address.International - An address for international mail delivery.
362 \endlist
363*/
364/*!
365 \qmlproperty string Address::postOfficeBox
366
367 This property holds the post office box identifier of the mailing address.
368*/
369
370/* ==================== QDeclarativeContactAnniversary ======================= */
371
372/*!
373 \qmltype Anniversary
374 \instantiates QDeclarativeContactAnniversary
375 \brief The Anniversary element contains an anniversary of a contact.
376 \ingroup qml-contacts-details
377 \inqmlmodule QtContacts
378
379
380 Anniversary element contains the following field types:
381 \list
382 \li Anniversary.CalendarId
383 \li Anniversary.OriginalDate
384 \li Anniversary.Event
385 \li Anniversary.SubType
386 \endlist
387
388 This element is part of the \b{QtContacts} module.
389*/
390
391/*!
392 \qmlproperty string Anniversary::calendarId
393
394 This property holds the id of the calendar event.
395*/
396/*!
397 \qmlproperty date Anniversary::originalDate
398
399 This property holds the original anniversary date value.
400 This property is either a date, or a date and time.
401*/
402/*!
403 \qmlproperty string Anniversary::event
404
405 This property holds the name of the event value.
406*/
407/*!
408 \qmlproperty enumeration Anniversary::subType
409
410 This property holds the sub type of an Anniversary.
411
412 \list
413 \li Unknown - Unknown sub type (default).
414 \li Wedding - A wedding anniversary.
415 \li Engagement - An engagement anniversary.
416 \li House - A new residence anniversary.
417 \li Employment - A start of employment anniversary.
418 \li Memorial - An event of sentimental significance.
419 \endlist
420*/
421
422/* ==================== QDeclarativeContactAvatar ======================= */
423/*!
424 \qmltype Avatar
425 \instantiates QDeclarativeContactAvatar
426 \brief The Avatar element contains avatar URLs of a contact.
427 \ingroup qml-contacts-details
428 \inqmlmodule QtContacts
429
430 Avatar element contains the following field types:
431 \list
432 \li Avatar.ImageUrl
433 \li Avatar.VideoUrl
434 \endlist
435
436 This element is part of the \b{QtContacts} module.
437*/
438
439/*!
440 \qmlproperty string Avatar::imageUrl
441
442 This property holds the URL of the avatar image.
443*/
444/*!
445 \qmlproperty string Avatar::videoUrl
446
447 This property holds the URL of a video avatar.
448*/
449
450
451/* ==================== QDeclarativeContactBirthday ======================= */
452/*!
453 \qmltype Birthday
454 \instantiates QDeclarativeContactBirthday
455 \brief The Birthday element contains a birthday of a contact.
456 \ingroup qml-contacts-details
457 \inqmlmodule QtContacts
458
459 Birthday element contains the following field types:
460 \list
461 \li Birthday.Birthday
462 \endlist
463
464 This element is part of the \b{QtContacts} module.
465*/
466
467/*!
468 \qmlproperty date Birthday::birthday
469
470 This property holds the birthday date. The property value is either a date, or a date and time.
471*/
472
473/* ==================== QDeclarativeContactDisplayLabel ======================= */
474/*!
475 \qmltype DisplayLabel
476 \instantiates QDeclarativeContactDisplayLabel
477 \brief The DisplayLabel element contains a label that can be used by clients when displaying a contact, for example in a list.
478 \ingroup qml-contacts-details
479 \inqmlmodule QtContacts
480
481 DisplayLabel element contains the following field types:
482 \list
483 \li DisplayLabel.Label
484 \endlist
485
486 This element is part of the \b{QtContacts} module.
487*/
488
489/*!
490 \qmlproperty string DisplayLabel::label
491
492 This property holds the value of the display label.
493*/
494
495/* ==================== QDeclarativeContactEmailAddress ======================= */
496/*!
497 \qmltype EmailAddress
498 \instantiates QDeclarativeContactEmailAddress
499 \brief The EmailAddress element contains an email address of a contact.
500 \ingroup qml-contacts-details
501 \inqmlmodule QtContacts
502
503 EmailAddress element contains the following field types:
504 \list
505 \li EmailAddress.EmailAddress
506 \endlist
507
508 This element is part of the \b{QtContacts} module.
509*/
510
511/*!
512 \qmlproperty string EmailAddress::emailAddress
513
514 This property holds the email address value.
515*/
516
517
518/* ==================== QDeclarativeContactExtendedDetail ======================= */
519/*!
520 \qmltype ExtendedDetail
521 \instantiates QDeclarativeContactExtendedDetail
522 \brief The ExtendedDetail element contains an extended detail of a contact.
523 \ingroup qml-contacts-details
524 \inqmlmodule QtContacts
525
526 ExtendedDetail element contains the following field types:
527 \list
528 \li ExtendedDetail.Name
529 \li ExtendedDetail.Data
530 \endlist
531
532 This element is part of the \b{QtContacts} module.
533
534 \sa QContactExtendedDetail
535*/
536
537/*!
538 \qmlproperty string ExtendedDetail::name
539
540 This property holds the name of the extended detail.
541*/
542
543/*!
544 \qmlproperty variant ExtendedDetail::data
545
546 This property holds the data of the extended detail.
547*/
548
549void QDeclarativeContactExtendedDetail::setData(const QVariant &newData)
550{
551 QVariant unboxedData(newData);
552 if (newData.userType() == qMetaTypeId<QJSValue>()) {
553 unboxedData = newData.value<QJSValue>().toVariant();
554 }
555
556 if (unboxedData != data() && !readOnly()) {
557 detail().setValue(field: QContactExtendedDetail::FieldData, value: unboxedData);
558 emit valueChanged();
559 }
560}
561
562/* ==================== QDeclarativeContactFamily ======================= */
563/*!
564 \qmltype Family
565 \instantiates QDeclarativeContactFamily
566 \brief The Family element contains names of family members of a contact.
567 \ingroup qml-contacts-details
568 \inqmlmodule QtContacts
569
570
571 Family element contains the following field types:
572 \list
573 \li Family.Spouse
574 \li Family.Children
575 \endlist
576
577 This element is part of the \b{QtContacts} module.
578*/
579
580/*!
581 \qmlproperty string Family::spouse
582
583 This property holds the name of a spouse.
584*/
585
586/*!
587 \qmlproperty list<string> Family::children
588
589 This property holds the the names of children.
590*/
591
592/* ==================== QDeclarativeContactFavorite ======================= */
593/*!
594 \qmltype Favorite
595 \instantiates QDeclarativeContactFavorite
596 \brief The Favorite element indicates if a contact is a favorite contact as well as the
597 position it should appear in an ordered list of favorites.
598 \ingroup qml-contacts-details
599 \inqmlmodule QtContacts
600
601 Favorite element contains the following field types:
602 \list
603 \li Favorite.Favorite
604 \li Favorite.Index
605 \endlist
606
607 This element is part of the \b{QtContacts} module.
608*/
609
610/*!
611 \qmlproperty bool Favorite::favorite
612
613 This property holds the value that indicates whether a contact is a favorite.
614*/
615
616/*!
617 \qmlproperty int Favorite::index
618
619 This property holds the index of the favorite contact (which determines the order they appear).
620*/
621
622
623/* ==================== QDeclarativeContactGender ======================= */
624/*!
625 \qmltype Gender
626 \instantiates QDeclarativeContactGender
627 \brief The Gender element contains the gender of a contact.
628 \ingroup qml-contacts-details
629 \inqmlmodule QtContacts
630
631 Gender element contains the following field types:
632 \list
633 \li Gender.Gender
634 \endlist
635
636 This element is part of the \b{QtContacts} module.
637*/
638
639/*!
640 \qmlproperty enumeration Gender::gender
641
642 This property holds the value of the gender.
643
644 \list
645 \li Gender.Male
646 \li Gender.Female
647 \endlist
648*/
649
650
651/* ==================== QDeclarativeContactGeoLocation ======================= */
652/*!
653 \qmltype GeoLocation
654 \instantiates QDeclarativeContactGeoLocation
655 \brief The GeoLocation element contains a global location coordinate associated with a contact.
656 \ingroup qml-contacts-details
657 \inqmlmodule QtContacts
658
659 GeoLocation element contains the following field types:
660 \list
661 \li GeoLocation.Label
662 \li GeoLocation.Latitude
663 \li GeoLocation.Longitude
664 \li GeoLocation.Accuracy
665 \li GeoLocation.Altitude
666 \li GeoLocation.AltitudeAccuracy
667 \li GeoLocation.Heading
668 \li GeoLocation.Speed
669 \li GeoLocation.Timestamp
670 \endlist
671
672 This element is part of the \b{QtContacts} module.
673*/
674
675/*!
676 \qmlproperty string GeoLocation::label
677
678 This property holds the location label.
679*/
680/*!
681 \qmlproperty double GeoLocation::latitude
682
683 This property holds the value of the latitude.
684*/
685/*!
686 \qmlproperty double GeoLocation::longitude
687
688 This property holds the value of the longitude.
689*/
690/*!
691 \qmlproperty double GeoLocation::accuracy
692
693 This property holds the value of the location (latitude/longitude) accuracy.
694*/
695/*!
696 \qmlproperty double GeoLocation::altitude
697
698 This property holds the value of the altitude.
699*/
700/*!
701 \qmlproperty double GeoLocation::altitudeAccuracy
702
703 This property holds the value of the accuracy of the altitude.
704*/
705/*!
706 \qmlproperty double GeoLocation::heading
707
708 This property holds the value of the heading.
709*/
710/*!
711 \qmlproperty double GeoLocation::speed
712
713 This property holds the value of the speed.
714*/
715/*!
716 \qmlproperty date GeoLocation::timestamp
717
718 This property holds the value of the timestamp of the location information.
719*/
720
721
722/* ==================== QDeclarativeContactGlobalPresence ======================= */
723/*!
724 \qmltype GlobalPresence
725 \instantiates QDeclarativeContactGlobalPresence
726 \brief The GlobalPresence element provides aggregated presence information
727 for a contact, synthesized or supplied by the backend.
728 \ingroup qml-contacts-details
729 \inqmlmodule QtContacts
730
731 GlobalPresence element contains the following field types:
732 \list
733 \li GlobalPresence.Timestamp
734 \li GlobalPresence.Nickname
735 \li GlobalPresence.State
736 \li GlobalPresence.StateText
737 \li GlobalPresence.ImageUrl
738 \li GlobalPresence.CustomMessage
739 \endlist
740
741 This element is part of the \b{QtContacts} module.
742*/
743
744/*!
745 \qmlproperty date GlobalPresence::timestamp
746
747 This property holds the timestamp value of the GlobalPresence.
748*/
749/*!
750 \qmlproperty string GlobalPresence::nickname
751
752 This property holds the nickname value of the GlobalPresence.
753*/
754/*!
755 \qmlproperty enumeration GlobalPresence::state
756
757 This property holds the presence state enumeration value.
758
759 \list
760 \li Presence.Unknown - Signifies that the presence state of the contact is not currently known (default).
761 \li Presence.Available - Signifies that the contact is available.
762 \li Presence.Hidden - Signifies that the contact is hidden.
763 \li Presence.Busy - Signifies that the contact is busy.
764 \li Presence.Away - Signifies that the contact is away.
765 \li Presence.ExtendedAway - Signifies that the contact is away for an extended period of time.
766 \li Presence.Offline - Signifies that the contact is offline.
767 \endlist
768*/
769/*!
770 \qmlproperty string GlobalPresence::stateText
771
772 This property holds the text corresponding to the current presence state.
773*/
774/*!
775 \qmlproperty url GlobalPresence::imageUrl
776
777 This property holds the last-known status image url of the contact for the online account
778 about which this detail stores presence information.
779*/
780/*!
781 \qmlproperty string GlobalPresence::customMessage
782
783 This property holds the custom status message from the contact for the online account
784 about which this detail stores presence information.
785*/
786
787/* ==================== QDeclarativeContactGuid ======================= */
788/*!
789 \qmltype Guid
790 \instantiates QDeclarativeContactGuid
791 \brief The Guid element contains a globally unique Id of a contact, for use in synchronization with other datastores.
792 \ingroup qml-contacts-details
793 \inqmlmodule QtContacts
794
795 Guid element contains the following field types:
796 \list
797 \li Guid.Guid
798 \endlist
799
800 This element is part of the \b{QtContacts} module.
801*/
802
803/*!
804 \qmlproperty string Guid::guid
805
806 This property holds the value of the GUID.
807*/
808
809/* ==================== QDeclarativeContactHobby ======================= */
810/*!
811 \qmltype Hobby
812 \instantiates QDeclarativeContactHobby
813 \brief The Hobby element contains a hobby of the contact.
814 \ingroup qml-contacts-details
815 \inqmlmodule QtContacts
816
817 Hobby element contains the following field types:
818 \list
819 \li Hobby.Hobby
820 \endlist
821
822 This element is part of the \b{QtContacts} module.
823*/
824
825/*!
826 \qmlproperty string Hobby::hobby
827
828 This property holds the name of the hobby.
829*/
830
831/* ==================== QDeclarativeContactName ======================= */
832/*!
833 \qmltype Name
834 \instantiates QDeclarativeContactName
835 \brief The Name element contains a name of a contact.
836 \ingroup qml-contacts-details
837 \inqmlmodule QtContacts
838
839
840 Name element contains the following field types:
841 \list
842 \li Name.Prefix
843 \li Name.FirstName
844 \li Name.MiddleName
845 \li Name.LastName
846 \li Name.Suffix
847 \endlist
848
849 This element is part of the \b{QtContacts} module.
850*/
851
852/*!
853 \qmlproperty string Name::prefix
854
855 This property holds the prefix name part of the name.
856*/
857/*!
858 \qmlproperty string Name::firstName
859
860 This property holds the first name part of the name.
861*/
862/*!
863 \qmlproperty string Name::middleName
864
865 This property holds the middle name part of the name.
866*/
867/*!
868 \qmlproperty string Name::lastName
869
870 This property holds the last name part of the name.
871*/
872/*!
873 \qmlproperty string Name::suffix
874
875 This property holds the suffix part of the name.
876*/
877
878
879/* ==================== QDeclarativeContactNickname ======================= */
880/*!
881 \qmltype Nickname
882 \instantiates QDeclarativeContactNickname
883 \brief The Nickname element contains a nickname of a contact.
884 \ingroup qml-contacts-details
885 \inqmlmodule QtContacts
886
887
888 Nickname element contains the following field types:
889 \list
890 \li Nickname.Nickname
891 \endlist
892
893 This element is part of the \b{QtContacts} module.
894*/
895
896/*!
897 \qmlproperty string Nickname::nickname
898
899 This property holds the value of the nickname.
900*/
901
902
903/* ==================== QDeclarativeContactNote ======================= */
904/*!
905 \qmltype Note
906 \instantiates QDeclarativeContactNote
907 \brief The Note element contains a note associated with a contact.
908 \ingroup qml-contacts-details
909 \inqmlmodule QtContacts
910
911 Note element contains the following field types:
912 \list
913 \li Note.Note
914 \endlist
915
916 This element is part of the \b{QtContacts} module.
917*/
918
919/*!
920 \qmlproperty string Note::note
921
922 This property holds the value of the note.
923*/
924
925
926/* ==================== QDeclarativeContactOnlineAccount ======================= */
927/*!
928 \qmltype OnlineAccount
929 \instantiates QDeclarativeContactOnlineAccount
930 \brief The OnlineAccount element contains a note associated with a contact.
931 \ingroup qml-contacts-details
932 \inqmlmodule QtContacts
933
934 OnlineAccount element contains the following field types:
935 \list
936 \li OnlineAccount.AccountUri - the account uri value.
937 \li OnlineAccount.ServiceProvider - the account service provider name.
938 \li OnlineAccount.Protocol - the account protocol value.
939 \li OnlineAccount.Capabilities - the account capabilities value.
940 \li OnlineAccount.SubTypes - the sub types of an online account.
941 \endlist
942
943 This element is part of the \b{QtContacts} module.
944*/
945
946/*!
947 \qmlproperty string OnlineAccount::accountUri
948
949 This property holds the value of the account uri.
950*/
951/*!
952 \qmlproperty string OnlineAccount::serviceProvider
953
954 This property holds the value of the account service provider name.
955*/
956/*!
957 \qmlproperty list<string> OnlineAccount::capabilities
958
959 This property holds the value of the account capabilities.
960*/
961/*!
962 \qmlproperty list<variant> OnlineAccount::subTypes
963
964 This property holds the value of the sub types of an online account.
965
966 \list
967 \li OnlineAccount.Unknown (default)
968 \li OnlineAccount.Sip - indicating this online account supports SIP.
969 \li OnlineAccount.SipVoip - indicating this online account supports SIP based VOIP.
970 \li OnlineAccount.Impp - indicating this online account supports IMPP.
971 \li OnlineAccount.VideoShare - indicating this online account supports VideoShare.
972 \endlist
973*/
974/*!
975 \qmlproperty enumeration OnlineAccount::protocol
976
977 This property holds the protocol enumeration value.
978
979 \list
980 \li OnlineAccount.Unknown - indicates this online account is for one unsupported protocol.
981 \li OnlineAccount.Aim - indicates this online account is for the AIM protocol.
982 \li OnlineAccount.Icq - indicates this online account is for the ICQ protocol.
983 \li OnlineAccount.Irc - indicates this online account is for the IRC protocol.
984 \li OnlineAccount.Jabber - indicates this online account is for the jabber protocol.
985 \li OnlineAccount.Msn - indicates this online account is for the MSN protocol.
986 \li OnlineAccount.Qq - indicates this online account is for the QQ protocol.
987 \li OnlineAccount.Skype - indicates this online account is for the Skype protocol.
988 \li OnlineAccount.Yahoo - indicates this online account is for the Yahoo protocol.
989 \endlist
990*/
991
992/* ==================== QDeclarativeContactOrganization ======================= */
993/*!
994 \qmltype Organization
995 \instantiates QDeclarativeContactOrganization
996 \brief The Organization element provides details about an
997 organization that the contact is either a part of, or stands for.
998 \ingroup qml-contacts-details
999 \inqmlmodule QtContacts
1000
1001 Organization element contains the following field types:
1002 \list
1003 \li Organization.Name
1004 \li Organization.LogoUrl
1005 \li Organization.Department
1006 \li Organization.Location
1007 \li Organization.Role
1008 \li Organization.Title
1009 \li Organization.AssistantName
1010 \endlist
1011
1012 This element is part of the \b{QtContacts} module.
1013*/
1014
1015/*!
1016 \qmlproperty string Organization::name
1017
1018 This property holds the value of the organization name.
1019*/
1020/*!
1021 \qmlproperty url Organization::logoUrl
1022
1023 This property holds the URL of the organization logo image.
1024*/
1025/*!
1026 \qmlproperty list<string> Organization::department
1027
1028 This property holds the value of the department name.
1029*/
1030/*!
1031 \qmlproperty string Organization::location
1032
1033 This property holds the value of the location of the organization.
1034*/
1035/*!
1036 \qmlproperty string Organization::role
1037
1038 This property holds the value of the contact's role in the organization.
1039*/
1040/*!
1041 \qmlproperty string Organization::title
1042
1043 This property holds the value of the contact's title in the organization.
1044*/
1045/*!
1046 \qmlproperty string Organization::assistantName
1047
1048 This property holds the value of the name of the contact's assistant.
1049*/
1050
1051/* ==================== QDeclarativeContactPhoneNumber ======================= */
1052/*!
1053 \qmltype PhoneNumber
1054 \instantiates QDeclarativeContactPhoneNumber
1055 \brief The PhoneNumber element provides a phone number of a contact.
1056 \ingroup qml-contacts-details
1057 \inqmlmodule QtContacts
1058
1059 PhoneNumber element contains the following field types:
1060 \list
1061 \li PhoneNumber.Number
1062 \li PhoneNumber.SubTypes
1063 \endlist
1064
1065 This element is part of the \b{QtContacts} module.
1066*/
1067
1068/*!
1069 \qmlproperty string PhoneNumber::number
1070
1071 This property holds the value of the phone number.
1072*/
1073
1074/*!
1075 \qmlproperty list<variant> PhoneNumber::subTypes
1076
1077 This property holds the sub types of a PhoneNumber.
1078
1079 \list
1080 \li PhoneNumber.Unknown - indicating this phone number type is unknown(default).
1081 \li PhoneNumber.Landline - indicating this phone number is a landline number.
1082 \li PhoneNumber.Mobile - ndicating this phone number is a mobile (cellular) number.
1083 \li PhoneNumber.Fax - indicating this phone number is a fax number.
1084 \li PhoneNumber.Pager - indicating this phone number is a pager number.
1085 \li PhoneNumber.Voice - indicating this phone number supports voice transmission.
1086 \li PhoneNumber.Modem - indicating this phone number supports data transmission.
1087 \li PhoneNumber.Video - indicating this phone number supports video transmission.
1088 \li PhoneNumber.Car - indicating this phone number is a car phone.
1089 \li PhoneNumber.BulletinBoardSystem - indicating this phone number is a bulletin board system.
1090 \li PhoneNumber.MessagingCapable - indicating this phone number supports messaging services.
1091 \li PhoneNumber.Assistant - indicating this phone number is the number of an assistant.
1092 \li PhoneNumber.DtmfMenu - indicating this phone number supports DTMF-controlled voice menu navigation.
1093 \endlist
1094*/
1095
1096/* ==================== QDeclarativeContactPresence ======================= */
1097/*!
1098 \qmltype Presence
1099 \instantiates QDeclarativeContactPresence
1100 \brief The Presence element provides presence information for an online account of a contact.
1101 \ingroup qml-contacts-details
1102 \inqmlmodule QtContacts
1103
1104 Presence element contains the following field types:
1105 \list
1106 \li Presence.Timestamp
1107 \li Presence.Nickname
1108 \li Presence.State
1109 \li Presence.StateText
1110 \li Presence.ImageUrl
1111 \li Presence.CustomMessage
1112 \endlist
1113
1114 This element is part of the \b{QtContacts} module.
1115*/
1116
1117/*!
1118 \qmlproperty date Presence::timestamp
1119
1120 This property holds the timestamp value of the Presence.
1121*/
1122/*!
1123 \qmlproperty string Presence::nickname
1124
1125 This property holds the nickname value of the Presence.
1126*/
1127/*!
1128 \qmlproperty enumeration Presence::state
1129
1130 This property holds the presence state enumeration value.
1131
1132 \list
1133 \li Presence.Unknown - Signifies that the presence state of the contact is not currently known (default).
1134 \li Presence.Available - Signifies that the contact is available.
1135 \li Presence.Hidden - Signifies that the contact is hidden.
1136 \li Presence.Busy - Signifies that the contact is busy.
1137 \li Presence.Away - Signifies that the contact is away.
1138 \li Presence.ExtendedAway - Signifies that the contact is away for an extended period of time.
1139 \li Presence.Offline - Signifies that the contact is offline.
1140 \endlist
1141*/
1142/*!
1143 \qmlproperty string Presence::stateText
1144
1145 This property holds the text corresponding to the current presence state.
1146*/
1147/*!
1148 \qmlproperty url Presence::imageUrl
1149
1150 This property holds the last-known status image url of the contact for the online account
1151 about which this detail stores presence information.
1152*/
1153/*!
1154 \qmlproperty string Presence::customMessage
1155
1156 This property holds the custom status message from the contact for the online account
1157 about which this detail stores presence information.
1158*/
1159
1160
1161
1162/* ==================== QDeclarativeContactRingtone ======================= */
1163/*!
1164 \qmltype Ringtone
1165 \instantiates QDeclarativeContactRingtone
1166 \brief The Ringtone element provides a ringtone associated with a contact.
1167 \ingroup qml-contacts-details
1168 \inqmlmodule QtContacts
1169
1170 Ringtone element contains the following field types:
1171 \list
1172 \li Ringtone.AudioRingtoneUrl
1173 \li Ringtone.VideoRingtoneUrl
1174 \endlist
1175
1176 This element is part of the \b{QtContacts} module.
1177*/
1178
1179/*!
1180 \qmlproperty url Ringtone::audioRingtoneUrl
1181
1182 This property holds the value of the URL for an audio ringtone.
1183*/
1184/*!
1185 \qmlproperty url Ringtone::videoRingtoneUrl
1186
1187 This property holds the value of the URL for a video ringtone.
1188*/
1189
1190// Not in use (note the missing ! below)
1191/*
1192 \qmlproperty url Ringtone::vibrationRingtoneUrl
1193
1194 This property holds the value of the URL for a vibration ringtone.
1195*/
1196
1197/* ==================== QDeclarativeContactSyncTarget ======================= */
1198/*!
1199 \qmltype SyncTarget
1200 \instantiates QDeclarativeContactSyncTarget
1201 \brief The SyncTarget element provides a sync target for a contact.
1202 \ingroup qml-contacts-details
1203 \inqmlmodule QtContacts
1204
1205 SyncTarget element contains the following field types:
1206 \list
1207 \li SyncTarget.SyncTarget
1208 \endlist
1209
1210 \sa QContactSyncTarget
1211
1212 This element is part of the \b{QtContacts} module.
1213*/
1214/*!
1215 \qmlproperty string SyncTarget::syncTarget
1216
1217 This property holds the sync target value.
1218*/
1219
1220/* ==================== QDeclarativeContactTag ======================= */
1221/*!
1222 \qmltype Tag
1223 \instantiates QDeclarativeContactTag
1224 \brief The Tag element provides a contains a tag associated with a contact.
1225 \ingroup qml-contacts-details
1226 \inqmlmodule QtContacts
1227
1228 Tag element contains the following field types:
1229 \list
1230 \li Tag.Tag
1231 \endlist
1232 \sa QContactTag
1233
1234 This element is part of the \b{QtContacts} module.
1235*/
1236/*!
1237 \qmlproperty string Tag::tag
1238
1239 This property holds the value of the tag.
1240*/
1241
1242/* ==================== QDeclarativeContactTimestamp ======================= */
1243/*!
1244 \qmltype Timestamp
1245 \instantiates QDeclarativeContactTimestamp
1246 \brief The Timestamp element contains the creation and last-modified timestamp associated with the contact.
1247 \ingroup qml-contacts-details
1248 \inqmlmodule QtContacts
1249
1250 Timestamp element contains the following field types:
1251 \list
1252 \li Timestamp.LastModified
1253 \li Timestamp.Created
1254 \endlist
1255
1256 This element is part of the \b{QtContacts} module.
1257*/
1258/*!
1259 \qmlproperty date Timestamp::lastModified
1260
1261 This property holds the value of the last modified timestamp.
1262*/
1263/*!
1264 \qmlproperty date Timestamp::created
1265
1266 This property holds the value of the timestamp a contact was created.
1267*/
1268
1269/* ==================== QDeclarativeContactUrl ======================= */
1270/*!
1271 \qmltype Url
1272 \instantiates QDeclarativeContactUrl
1273 \brief The Url element contains a url associated with a contact.
1274 \ingroup qml-contacts-details
1275 \inqmlmodule QtContacts
1276
1277 Url element contains the following field types:
1278 \list
1279 \li Url.Url
1280 \li Url.SubType
1281 \endlist
1282
1283 This element is part of the \b{QtContacts} module.
1284*/
1285/*!
1286 \qmlproperty string Url::url
1287
1288 This property holds the value of the URL.
1289*/
1290/*!
1291 \qmlproperty enumeration Url::subType
1292
1293 This property holds the sub type of a QContactUrl.
1294
1295 \list
1296 \li Url.Unknown - indicating this url type is unknown (default).
1297 \li Url.HomePage - indicating this url is a contact's home page.
1298 \li Url.Favourite - indicating this url is one of the contact's favourite URLs (or bookmarks).
1299 \endlist
1300*/
1301
1302#include "moc_qdeclarativecontactdetail_p.cpp"
1303
1304QT_END_NAMESPACE
1305

source code of qtpim/src/imports/contacts/qdeclarativecontactdetail.cpp