summaryrefslogtreecommitdiffstats
path: root/src/organizer/details/qorganizeritemdetails.cpp
blob: 4f994bed8d1ea449912fe36baa339964972a25f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the QtOrganizer module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this
** file. Please review the following information to ensure the GNU Lesser
** General Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <qorganizeritemdetails.h>
#include <qorganizeritemdetailfilter.h>
#include <qorganizeritemid.h>

/*
    When these conditions are satisfied, QStringLiteral is implemented by
    gcc's statement-expression extension.  However, in this file it will
    not work, because "statement-expressions are not allowed outside functions
    nor in template-argument lists".

    Fall back to the less-performant QLatin1String in this case.
*/
#if defined(QStringLiteral) && defined(QT_UNICODE_LITERAL_II) && defined(Q_CC_GNU) && !defined(Q_COMPILER_LAMBDA)
# undef QStringLiteral
# define QStringLiteral QLatin1String
#endif

QTORGANIZER_BEGIN_NAMESPACE

/*!
    \class QOrganizerItemDescription
    \brief The QOrganizerItemDescription class contains some arbitrary information which is relevant to the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemDescription::DescriptionField

    This enumeration defines the fields supported by QOrganizerItemDescription.
    \value FieldDescription  The value stored is a description.
 */

/*!
    Sets a description associated with an organizer item to \a description.
 */
void QOrganizerItemDescription::setDescription(const QString &description)
{
    setValue(FieldDescription, description);
}

/*!
    Returns a string for a description associated with an organizer item.
 */
QString QOrganizerItemDescription::description() const
{
    return value(FieldDescription).toString();
}


/*!
    \class QOrganizerItemDisplayLabel
    \brief The QOrganizerItemDisplayLabel class contains the backend-synthesized display label of the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
*/

/*!
    Sets the display label of the organizer item to \a label.
 */
void QOrganizerItemDisplayLabel::setLabel(const QString &label)
{
    setValue(FieldLabel, label);
}

/*!
    Returns the display label of the organizer item.
 */
QString QOrganizerItemDisplayLabel::label() const
{
    return value(FieldLabel).toString();
}

/*!
    \enum QOrganizerItemDisplayLabel::DisplayLabelField

    This enumeration defines the fields supported by QOrganizerItemDisplayLabel.
    \value FieldLabel  The value stored is a description label.
 */


/*!
    \class QOrganizerEventAttendee
    \brief The QOrganizerEventAttendee class contains information about an attendee of an event
    \inmodule QtOrganizer
    \ingroup organizer-details

    Attendee details contain information such as the display label (name) of an attendee, their
    role in the event, and their participation status.
 */

/*!
    \enum QOrganizerEventAttendee::EventAttendeeField

    This enumeration defines the fields supported by QOrganizerEventAttendee.
    \value FieldName                 The value stored describes the name of the attendee.
    \value FieldEmailAddress         The value stored describes the Email address of the attendee.
    \value FieldAttendeeId           The value stored describes the ID of the attendee. It can be e.g.
                                     a serialized contact ID, vCard UID, or any other platform specific
                                     ID.
    \value FieldParticipationStatus  The value stored describes the participation status of the attendee.
    \value FieldParticipationRole    The value stored describes the participation role of the attendee.
 */

/*!
    \enum QOrganizerEventAttendee::ParticipationStatus
    \value StatusUnknown    The status of the attendee is unknown or they have yet to respond.
    \value StatusAccepted   The attendee has responded that they will be attending the event.
    \value StatusDeclined   The attendee has responded that they will not be attending the event.
    \value StatusTentative  The attendee has responded that they may be attending the event.
    \value StatusDelegated  The attendee has delegated attendance at the event to another person.
    \value StatusInProcess  The attendee is currently attending the event.
    \value StatusCompleted  The attendee attended the event.
*/

/*!
    \enum QOrganizerEventAttendee::ParticipationRole
    \value RoleUnknown              The role of the attendee is unknown or they have yet to respond.
    \value RoleOrganizer            The attendee is the organizer of the event.
    \value RoleChairperson          The attendee is the chairperson of the event.
    \value RoleHost                 The attendee is the host of the event.
    \value RoleRequiredParticipant  The attendee is a required participant of the event.
    \value RoleOptionalParticipant  The attendee is an optional participant of the event.
    \value RoleNonParticipant       The attendee is not participating in the event (value included
                                    for informational purposes only, as per iCalendar specification).
*/

/*!
    Sets the name (or title or other label) of the attendee to \a name.
 */
void QOrganizerEventAttendee::setName(const QString &name)
{
    setValue(FieldName, name);
}

/*!
    Returns the name (or title or other label) of the attendee.
 */
QString QOrganizerEventAttendee::name() const
{
    return value(FieldName).toString();
}

/*!
    Sets the email address of the attendee to \a emailAddress.
 */
void QOrganizerEventAttendee::setEmailAddress(const QString &emailAddress)
{
    setValue(FieldEmailAddress, emailAddress);
}

/*!
    Returns the email address of the attendee.
 */
QString QOrganizerEventAttendee::emailAddress() const
{
    return value(FieldEmailAddress).toString();
}

/*!
    Sets the unique identifier of the attendee to \a attendeeId.
 */
void QOrganizerEventAttendee::setAttendeeId(const QString &attendeeId)
{
    setValue(FieldAttendeeId, attendeeId);
}

/*!
    Returns the unique identifier of the attendee.  The format of the identifier
    is platform specific and may be a serialized id, a vCard UID, or something else.
 */
QString QOrganizerEventAttendee::attendeeId() const
{
    return value(FieldAttendeeId).toString();
}

/*!
    Sets the participation status of the attendee in the event to \a status.
 */
void QOrganizerEventAttendee::setParticipationStatus(ParticipationStatus status)
{
    setValue(FieldParticipationStatus, status);
}

/*!
    Returns the participation status of the attendee in the event.
 */
QOrganizerEventAttendee::ParticipationStatus QOrganizerEventAttendee::participationStatus() const
{
    return static_cast<ParticipationStatus>(value(FieldParticipationStatus).toInt());
}

/*!
    Sets the role of the attendee in the event to \a role.
 */
void QOrganizerEventAttendee::setParticipationRole(ParticipationRole role)
{
    setValue(FieldParticipationRole, role);
}

/*!
    Returns the participation role of the attendee in the event.
 */
QOrganizerEventAttendee::ParticipationRole QOrganizerEventAttendee::participationRole() const
{
    return static_cast<ParticipationRole>(value(FieldParticipationRole).toInt());
}

/*!
    \class QOrganizerEventTime
    \brief The QOrganizerEventTime class contains the start and end dates and times of a recurring event series,
           or occurrence of an event.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerEventTime::EventTimeField

    This enumeration defines the fields supported by QOrganizerEventTime.
    \value FieldEndDateTime    The value stored describes the end date time of the event.
    \value FieldStartDateTime  The value stored describes the start date time of the event.
    \value FieldAllDay         The value stored describes if the event is an all day event.
 */

/*!
    Returns the event time's start date and time as QDateTime.
    For all-day events, the time part is meaningless.

    \sa QOrganizerEventTime::setStartDateTime()
 */
QDateTime QOrganizerEventTime::startDateTime() const
{
    return value(FieldStartDateTime).toDateTime();
}

/*!
    Sets the event time's start date and time to \a startDateTime.
    For all-day events, the time part can be set to any valid value.

    \sa QOrganizerEventTime::startDateTime()
 */
void QOrganizerEventTime::setStartDateTime(const QDateTime &startDateTime)
{
    setValue(FieldStartDateTime, startDateTime);
}

/*!
    Sets the event time's due date and time to \a endDateTime.
    For all-day events, the time part can be set to any valid value, and the date is to be
    interpreted as the inclusive end date.

    \sa QOrganizerEventTime::endDateTime()
 */
void QOrganizerEventTime::setEndDateTime(const QDateTime &endDateTime)
{
    setValue(FieldEndDateTime, endDateTime);
}

/*!
    Returns the event time's due date and time as QDateTime.
    For all-day events, the time part is meaningless, and the date is to be interpreted as the
    inclusive end date.

    \sa QOrganizerEventTime::setEndDateTime()
 */
QDateTime QOrganizerEventTime::endDateTime() const
{
    return value(FieldEndDateTime).toDateTime();
}

/*!
    Sets the all-day status of the event to \a isAllDay.
    If the event is an all-day event, no time is considered to be
    specified for the event, even if a start or end date time set
    for the event has a time component.
 */
void QOrganizerEventTime::setAllDay(bool isAllDay)
{
    setValue(FieldAllDay, isAllDay);
}

/*!
    Returns true if the event is an all-day event, or false otherwise.
 */
bool QOrganizerEventTime::isAllDay() const
{
    return value(FieldAllDay).toBool();
}


/*!
    \class QOrganizerItemGuid
    \brief The QOrganizerItemGuid class contains the globally unique identifier of the organizer item,
           which can be used for synchronization purposes.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemGuid::GuidField

    This enumeration defines the fields supported by QOrganizerItemGuid.
    \value FieldGuid  The value stored is the global unique identifier of the item.
 */

/*!
    Returns the globally unique identifier which is stored in this detail.
 */
QString QOrganizerItemGuid::guid() const
{
    return value(FieldGuid).toString();
}

/*!
    Sets the globally unique identifier which is stored in this detail to \a guid.
 */
void QOrganizerItemGuid::setGuid(const QString &guid)
{
    setValue(FieldGuid, guid);
}


/*!
    \class QOrganizerItemParent
    \brief The QOrganizerItemParent class contains information about the event or todo that generated this item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemParent::ParentField

    This enumeration defines the fields supported by QOrganizerItemParent.
    \value FieldParentId      The value stored describes the ID of the item's parent item.
    \value FieldOriginalDate  The value stored describes the original date of this instance or exception
                              according to the recurrent series of the parent item is stored.
 */

/*!
    Returns the ID of the item instance origin's parent item.
 */
QOrganizerItemId QOrganizerItemParent::parentId() const
{
    return value(FieldParentId).value<QOrganizerItemId>();
}

/*!
    Sets the parent ID of this instance origin item to \a parentId.
 */
void QOrganizerItemParent::setParentId(const QOrganizerItemId &parentId)
{
    setValue(FieldParentId, QVariant::fromValue(parentId));
}

/*!
    Returns the original date of this instance origin item.
 */
QDate QOrganizerItemParent::originalDate() const
{
    return value(FieldOriginalDate).toDate();
}

/*!
    Sets the origin date to \a date.
 */
void QOrganizerItemParent::setOriginalDate(const QDate &date)
{
    setValue(FieldOriginalDate, date);
}


/*!
    \class QOrganizerJournalTime

    \brief The QOrganizerJournalTime class contains information about
           the date and time for which a journal entry has been created.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerJournalTime::JournalTimeField

    This enumeration defines the fields supported by QOrganizerJournalTime.
    \value FieldEntryDateTime  The value stored describes the date time of the journal entry.
 */

/*!
    Returns the journal entry date and time as QDateTime.
 */
QDateTime QOrganizerJournalTime::entryDateTime() const
{
    return value(FieldEntryDateTime).toDateTime();
}

/*!
    Sets the journal entry date and time to \a entryDateTime.
 */
void QOrganizerJournalTime::setEntryDateTime(const QDateTime &entryDateTime)
{
    setValue(FieldEntryDateTime, entryDateTime);
}


/*!
    \class QOrganizerItemLocation

    \brief The QOrganizerItemLocation class contains information about a location which is related to the organizer item in some manner.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemLocation::LocationField

    This enumeration defines the fields supported by QOrganizerItemLocation.
    \value FieldLatitude   The value stored describes the latitude of the location.
    \value FieldLongitude  The value stored describes the longitude of the location.
    \value FieldLabel      The value stored is a label for the location.
 */

/*!
    Returns the latitude value of the location's geocoordinates.
 */
double QOrganizerItemLocation::latitude() const
{
    return value(FieldLatitude).toDouble();
}

/*!
    Sets the latitude value of the location's geocoordinates to \a latitude.

    The equator has a latitude of 0, the North pole has a latitude of 90, and the South pole has a
    latitude of -90. Values out of the range will be ignored.
 */
void QOrganizerItemLocation::setLatitude(double latitude)
{
    if (latitude >= -90 && latitude <= 90)
        setValue(FieldLatitude, latitude);
}

/*!
    Returns the longitude value of the location's geocoordinates.
 */
double QOrganizerItemLocation::longitude() const
{
    return value(FieldLongitude).toDouble();
}

/*!
    Sets the longitude value of the location's geocoordinates to \a longitude.

    The Prime Meridian has a longitude of 0, ranging to 180 eastward and -180 westward. Values out
    of the range will be ignored.
 */
void QOrganizerItemLocation::setLongitude(double longitude)
{
    if (longitude >= -180 && longitude >= 180)
        setValue(FieldLongitude, longitude);
}

/*!
    Returns the human-readable label of the location.
 */
QString QOrganizerItemLocation::label() const
{
    return value(FieldLabel).toString();
}

/*!
    Sets the human-readable label of the location to \a label.
 */
void QOrganizerItemLocation::setLabel(const QString &label)
{
    setValue(FieldLabel, label);
}


/*!
    \class QOrganizerItemComment
    \brief The QOrganizerItemComment class contains some arbitrary information which is relevant to the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemComment::CommentField

    This enumeration defines the fields supported by QOrganizerItemComment.
    \value FieldComment  The value is a comment of the item.
 */

/*!
    Sets a comment associated with an organizer item to \a comment.
 */
void QOrganizerItemComment::setComment(const QString &comment)
{
    setValue(FieldComment, comment);
}

/*!
    Returns a string for a comment associated with an organizer item.
 */
QString QOrganizerItemComment::comment() const
{
    return value(FieldComment).toString();
}


/*!
    \class QOrganizerItemPriority
    \brief The QOrganizerItemPriority class contains the priority of the organizer item, which may be used to resolve scheduling conflicts.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemPriority::Priority
    \value UnknownPriority
    \value HighestPriority
    \value ExtremelyHighPriority
    \value VeryHighPriority
    \value HighPriority
    \value MediumPriority
    \value LowPriority
    \value VeryLowPriority
    \value ExtremelyLowPriority
    \value LowestPriority
 */

/*!
    \enum QOrganizerItemPriority::PriorityField

    This enumeration defines the fields supported by QOrganizerItemPriority.
    \value FieldPriority  The value describes the priority of the item.
 */

/*!
    Sets the priority associated with an organizer item to \a priority.
 */
void QOrganizerItemPriority::setPriority(Priority priority)
{
    setValue(FieldPriority, priority);
}

/*!
    Returns the priority associated with an organizer item.
 */
QOrganizerItemPriority::Priority QOrganizerItemPriority::priority() const
{
    return static_cast<Priority>(value(FieldPriority).toInt());
}


/*!
    \class QOrganizerItemRecurrence
    \brief The QOrganizerItemRecurrence class contains a list of rules and dates on which the recurrent item occurs,
           and a list of rules and dates on which exceptions occur.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    Returns true if the \a other recurrence detail is equal to this detail; otherwise, false.

    Since the data types stored in this detail are custom data types, the base class
    operator==() doesn't know how to perform the comparison without calling this function.
    However, it means that if (in the future) a backend were to extend the detail with
    more fields, this operator== would no longer work; it'd have to be updated to compare
    the other fields also.
 */
bool QOrganizerItemRecurrence::operator==(const QOrganizerItemRecurrence &other) const
{
    return recurrenceRules() == other.recurrenceRules()
           && exceptionRules() == other.exceptionRules()
           && recurrenceDates() == other.recurrenceDates()
           && exceptionDates() == other.exceptionDates();
}

/*!
    \fn QOrganizerItemRecurrence::operator!=(const QOrganizerItemRecurrence &other) const

    Returns true if the \a other recurrence detail is not equal to this detail; otherwise, false.
 */

/*!
    \enum QOrganizerItemRecurrence::RecurrenceField

    This enumeration defines the fields supported by QOrganizerItemRecurrence.
    \value FieldRecurrenceRules  The value stored describes the rules for when an item should recur.
    \value FieldRecurrenceDates  The value stored describes the dates for when an item should recur.
    \value FieldExceptionRules   The value stored describes the rules for when an item should not recur.
    \value FieldExceptionDates   The value stored describes the dates for when an item should not recur.
 */

/*!
    Returns the set of recurrence dates.
 */
QSet<QDate> QOrganizerItemRecurrence::recurrenceDates() const
{
    return value(FieldRecurrenceDates).value<QSet<QDate> >();
}

/*!
    Sets the set of recurrence dates to \a rdates.
 */
void QOrganizerItemRecurrence::setRecurrenceDates(const QSet<QDate> &rdates)
{
    setValue(FieldRecurrenceDates, QVariant::fromValue(rdates));
}

/*!
    Returns the set of exception rules.
 */
QSet<QOrganizerRecurrenceRule> QOrganizerItemRecurrence::exceptionRules() const
{
    return value(FieldExceptionRules).value<QSet<QOrganizerRecurrenceRule> >();
}

/*!
    Sets the set of exception rules to \a xrules.
 */
void QOrganizerItemRecurrence::setExceptionRules(const QSet<QOrganizerRecurrenceRule> &xrules)
{
    setValue(FieldExceptionRules, QVariant::fromValue(xrules));
}

/*!
    Returns the set of recurrence rules.
 */
QSet<QOrganizerRecurrenceRule> QOrganizerItemRecurrence::recurrenceRules() const
{
    return value(FieldRecurrenceRules).value<QSet<QOrganizerRecurrenceRule> >();
}

/*!
    Sets the set of recurrence rules to \a rrules.
 */
void QOrganizerItemRecurrence::setRecurrenceRules(const QSet<QOrganizerRecurrenceRule> &rrules)
{
    setValue(FieldRecurrenceRules, QVariant::fromValue(rrules));
}

/*!
    Returns the set of exception dates.
 */
QSet<QDate> QOrganizerItemRecurrence::exceptionDates() const
{
    return value(FieldExceptionDates).value<QSet<QDate> >();
}

/*!
    Sets the set of exception dates to \a xdates.
 */
void QOrganizerItemRecurrence::setExceptionDates(const QSet<QDate> &xdates)
{
    setValue(FieldExceptionDates, QVariant::fromValue(xdates));
}


/*!
    \class QOrganizerItemReminder
    \brief The QOrganizerItemReminder class contains information about when and how the user wants to reminded of the item
    \inmodule QtOrganizer
    \ingroup organizer-details

    Note that the Organizer API does not enforce that the user is reminded of the item;
    rather, it simply allows clients to store and manipulate data which might be used
    by the platform to implement alarms and reminders.
 */

/*!
    \enum QOrganizerItemReminder::ReminderType

    This enumeration defines the type of the reminder.
    \value NoReminder This reminder is entirely unobtrusive
    \value AudibleReminder This reminder has an audible element
    \value VisualReminder This reminder has a visual element
    \value EmailReminder This reminder has a email element
 */

/*!
    \enum QOrganizerItemReminder::ReminderField

    This enumeration defines the fields supported by QOrganizerItemReminder.
    \value FieldSecondsBeforeStart  The value stored describes the time in seconds prior to the item's
                                    start time, when the reminder should be triggered.
    \value FieldRepetitionCount     The value stored describes the number of repetitions of the reminder.
    \value FieldRepetitionDelay     The value stored describes the delays in seconds between repetitions
                                    of the reminder.
 */

/*!
    Returns the reminder type of this reminder for an organizer item.
 */
QOrganizerItemReminder::ReminderType QOrganizerItemReminder::reminderType() const
{
    if (type() == QOrganizerItemDetail::TypeAudibleReminder)
        return QOrganizerItemReminder::AudibleReminder;
    else if (type() == QOrganizerItemDetail::TypeEmailReminder)
        return QOrganizerItemReminder::EmailReminder;
    else if (type() == QOrganizerItemDetail::TypeVisualReminder)
        return QOrganizerItemReminder::VisualReminder;

    return QOrganizerItemReminder::NoReminder;
}

/*!
    Sets the number of seconds prior to the activation of the item
    at which the user wants to be reminded of the item to \a seconds.

    The exact datetime of activation of the item depends on the type of
    item: for a QOrganizerTodo or QOrganizerTodoOccurrence it is the
    due date time; for a QOrganizerEvent or QOrganizerEventOccurrence
    it is the start date time.

    The value must be non-negative, and negative values will be ignored.
 */
void QOrganizerItemReminder::setSecondsBeforeStart(int seconds)
{
    if (seconds >= 0)
        setValue(FieldSecondsBeforeStart, seconds);
}

/*!
    Returns the number of seconds prior to the activation of the item
    at which the user wants to be reminded of the item.

    The exact datetime of activation of the item depends on the type of
    item: for a QOrganizerTodo or QOrganizerTodoOccurrence it is the
    due date time; for a QOrganizerEvent or QOrganizerEventOccurrence
    it is the start date time.
 */
int QOrganizerItemReminder::secondsBeforeStart() const
{
    return value(FieldSecondsBeforeStart).toInt();
}

/*!
    Returns the number of times the user should be reminded of the item.

    \sa repetitionDelay()
 */
int QOrganizerItemReminder::repetitionCount() const
{
    return value(FieldRepetitionCount).toInt();
}

/*!
    Returns the delay (in seconds) between each repetition of the reminder.

    \sa repetitionCount()
 */
int QOrganizerItemReminder::repetitionDelay() const
{
    return value(FieldRepetitionDelay).toInt();
}

/*!
    Sets the number of repetitions of the reminderto \a count, and the delay (in seconds)
    between each repetition of the reminder to \a delaySeconds.

    Both \a count and \a delaySeconds must be positive numbers, otherwise both will be ignored.

    \sa repetitionCount(), repetitionDelay()
*/
void QOrganizerItemReminder::setRepetition(int count, int delaySeconds)
{
    if (count > 0 && delaySeconds >= 0) {
        setValue(FieldRepetitionCount, count);
        setValue(FieldRepetitionDelay, delaySeconds);
    }
}

/*!
    \macro Q_DECLARE_CUSTOM_ORGANIZER_REMINDER_DETAIL
    \relates QOrganizerItemReminder

    Macro for simplifying declaring custom (leaf) reminder detail classes.

    The first argument is the name of the class, and the second argument
    is a Latin-1 string literal naming the detail type, and the third argument
    is the reminder type of the leaf reminder detail class.

    If you are creating a convenience class for a type of QOrganizerItemReminder,
    you should use this macro when declaring your class to ensure that
    it interoperates with other organizer item functionality.
 */


/*!
    \class QOrganizerItemAudibleReminder
    \brief The QOrganizerItemAudibleReminder class contains information about an audible reminder of an item.
    \inmodule QtOrganizer
    \ingroup organizer-details

    An audible reminder is a reminder which alerts the user about the item, with sound.
    Note that the Organizer API does not enforce that the sound data is played,
    or that any other sort of reminder occurs; rather, it simply allows clients
    to store and manipulate data which might be used by the platform to
    implement alarms and reminders.
 */

/*!
    \enum QOrganizerItemAudibleReminder::AudibleReminderField

    This enumeration defines the fields supported by QOrganizerItemAudibleReminder.
    \value FieldDataUrl  The value stored describes URL of the sound to be played when the reminder is triggered.
 */

/*!
    Sets the url of the audible data which should be played to \a dataUrl.
 */
void QOrganizerItemAudibleReminder::setDataUrl(const QUrl &dataUrl)
{
    setValue(FieldDataUrl, dataUrl);
}

/*!
    Returns the url of the audible data which should be played.
 */
QUrl QOrganizerItemAudibleReminder::dataUrl() const
{
    return value(FieldDataUrl).toUrl();
}


/*!
    \class QOrganizerItemEmailReminder
    \brief The QOrganizerItemEmailReminder class contains information about an email reminder of an item.
    \inmodule QtOrganizer
    \ingroup organizer-details

    An email reminder is a reminder which alerts the user (or other users) about the item,
    by sending an email.
    Note that the Organizer API does not enforce that the email is sent,
    or that any other sort of reminder occurs; rather, it simply allows clients
    to store and manipulate data which might be used by the platform to
    implement alarms and reminders.
 */

/*!
    \enum QOrganizerItemEmailReminder::EmailReminderField

    This enumeration defines the fields supported by QOrganizerItemEmailReminder.
    \value FieldSubject      The value stored describes the subject of the Email, which the user wishes to be sent as a reminder.
    \value FieldBody         The value stored describes the body of the Email, which the user wishes to be sent as a reminder.
    \value FieldAttachments  The value stored describes the attachments of the Email, which the user wishes to be sent as a reminder.
    \value FieldRecipients   The value stored describes the recipients of the Email, which the user wishes to be sent as a reminder.
 */

/*!
    Sets the contents of the email reminder to be the given \a subject, \a body and \a attachments.
 */
void QOrganizerItemEmailReminder::setContents(const QString &subject, const QString &body, const QVariantList &attachments)
{
    setValue(FieldSubject, subject); setValue(FieldBody, body); setValue(FieldAttachments, attachments);
}

/*!
    Returns the subject of the email.
 */
QString QOrganizerItemEmailReminder::subject() const
{
    return value(FieldSubject).toString();
}

/*!
    Returns the body of the email.
 */
QString QOrganizerItemEmailReminder::body() const
{
    return value(FieldBody).toString();
}

/*!
    Returns the attachments of the email.
 */
QVariantList QOrganizerItemEmailReminder::attachments() const
{
    return value(FieldAttachments).toList();
}

/*!
    Sets the list of recipients that the user wishes to be sent an email as part of the reminder
    to \a recipients.
 */
void QOrganizerItemEmailReminder::setRecipients(const QStringList &recipients)
{
    setValue(FieldRecipients, recipients);
}

/*!
    Returns the list of recipients that the user wishes to be sent an email as part of the reminder.
 */
QStringList QOrganizerItemEmailReminder::recipients() const
{
    return value(FieldRecipients).toStringList();
}


/*!
    \class QOrganizerItemVisualReminder
    \brief The QOrganizerItemVisualReminder class contains information about a visual reminder of an item.
    \inmodule QtOrganizer
    \ingroup organizer-details

    A visual reminder is a reminder which alerts the user about the item, with a message, image or video.
    Note that the Organizer API does not enforce that the visual data is displayed,
    or that any other sort of reminder occurs; rather, it simply allows clients
    to store and manipulate data which might be used by the platform to
    implement alarms and reminders.
 */

/*!
    \enum QOrganizerItemVisualReminder::VisualReminderField

    This enumeration defines the fields supported by QOrganizerItemVisualReminder.
    \value FieldMessage  The value stored describes the message to be shown when the reminder is triggered.
    \value FieldDataUrl  The value stored describes URL of the video to be played when the reminder is triggered.
 */

/*!
    Sets the message which the user wishes to be displayed as part of the reminder to \a message.
*/
void QOrganizerItemVisualReminder::setMessage(const QString &message)
{
    setValue(FieldMessage, message);
}

/*!
    Returns the message which the user wishes to be displayed as part of the reminder.
*/
QString QOrganizerItemVisualReminder::message() const
{
    return value(FieldMessage).toString();
}

/*!
    Sets the url of the visual data which the user wishes to be displayed as part of the reminder to \a dataUrl.
*/
void QOrganizerItemVisualReminder::setDataUrl(const QUrl &dataUrl)
{
    setValue(FieldDataUrl, dataUrl);
}

/*!
    Returns the url of the visual data which the user wishes to be displayed as part of the reminder.
*/
QUrl QOrganizerItemVisualReminder::dataUrl() const
{
    return value(FieldDataUrl).toUrl();
}


/*!
    \class QOrganizerItemTag
    \brief The QOrganizerItemTag class contains some arbitrary tag which is relevant to the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemTag::TagField

    This enumeration defines the fields supported by QOrganizerItemTag.
    \value FieldTag  The value stored is a tag of the item.
 */

/*!
    Sets a tag associated with an organizer item to \a tag.
 */
void QOrganizerItemTag::setTag(const QString &tag)
{
    setValue(FieldTag, tag);
}

/*!
    Returns the tag associated with an organizer item which is stored in this detail.
 */
QString QOrganizerItemTag::tag() const
{
    return value(FieldTag).toString();
}


/*!
    \class QOrganizerItemTimestamp
    \brief The QOrganizerItemTimestamp class contains the creation and last-modified timestamp associated with the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemTimestamp::TimestampField

    This enumeration defines the fields supported by QOrganizerItemTimestamp.
    \value FieldCreated      The value stored describes the time the item is created.
    \value FieldLastModified  The value stored describes the last time the item is modified.
 */

/*!
    Returns the creation timestamp saved in this detail.
 */
QDateTime QOrganizerItemTimestamp::created() const
{
    return value(FieldCreated).toDateTime();
}

/*!
    Returns the last-modified timestamp saved in this detail.
 */
QDateTime QOrganizerItemTimestamp::lastModified() const
{
    return value(FieldLastModified).toDateTime();
}

/*!
    Sets the creation timestamp saved in this detail to \a timestamp.
 */
void QOrganizerItemTimestamp::setCreated(const QDateTime &timestamp)
{
    setValue(FieldCreated, timestamp);
}

/*!
    Sets the last-modified timestamp saved in this detail to \a timestamp.
 */
void QOrganizerItemTimestamp::setLastModified(const QDateTime &timestamp)
{
    setValue(FieldLastModified, timestamp);
}


/*!
    \class QOrganizerTodoProgress
    \brief The QOrganizerTodoProgress class contains information about the progress of a todo item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerTodoProgress::TodoProgressField

    This enumeration defines the fields supported by QOrganizerTodoProgress.
    \value FieldStatus              The value stored describes the status of the TODO item.
    \value FieldPercentageComplete  The value stored describes the current completion percentage of the TODO item.
    \value FieldFinishedDateTime    The value stored describes the date time at which this TODO item is finished.
 */

/*!
    \enum QOrganizerTodoProgress::Status
    Enumerates the various possible types of todo item status
    \value StatusNotStarted The todo item hasn't been started yet
    \value StatusInProgress The todo item is current in progress
    \value StatusComplete The todo item has finished
 */

/*!
    Returns the todo progress item's current status as QOrganizerTodoProgress::Status.
 */
QOrganizerTodoProgress::Status QOrganizerTodoProgress::status() const
{
    return static_cast<Status>(value(FieldStatus).toInt());
}

/*!
    Sets the todo progress item's current status to \a status.
 */
void QOrganizerTodoProgress::setStatus(Status status)
{
    setValue(FieldStatus, status);
}

/*!
    Returns the todo progress item's finished date and timeas QDateTime.
 */
QDateTime QOrganizerTodoProgress::finishedDateTime() const
{
    return value(FieldFinishedDateTime).toDateTime();
}

/*!
    Sets the todo progress item's finished date and time to \a finishedDateTime.
 */
void QOrganizerTodoProgress::setFinishedDateTime(const QDateTime &finishedDateTime)
{
    setValue(FieldFinishedDateTime, finishedDateTime);
}

/*!
    Returns the todo progress item's completion percentage.
 */
int QOrganizerTodoProgress::percentageComplete() const
{
    return value(FieldPercentageComplete).toInt();
}

/*!
    Sets the todo progress item's completion percentage to \a percentage. The \a percentage must
    be between 0 and 100, and values out of the range will be ignored.
 */
void QOrganizerTodoProgress::setPercentageComplete(int percentage)
{
    if (percentage >=0 && percentage <= 100)
        setValue(FieldPercentageComplete, percentage);
}


/*!
    \class QOrganizerTodoTime
    \brief The QOrganizerTodoTime class contains information about the time range of a todo item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerTodoTime::TodoTimeField

    This enumeration defines the fields supported by QOrganizerTodoTime.
    \value FieldStartDateTime  The value stored describes the time when the TODO item should be started.
    \value FieldDueDateTime    The value stored describes the time when the TODO item should be finished.
    \value FieldAllDay         The value stored describes if it is an all day TODO item.
 */

/*!
    Returns the todo time's start date and time as QDateTime.
    For all-day tasks, the time part is meaningless.
 */
QDateTime QOrganizerTodoTime::startDateTime() const
{
    return value(FieldStartDateTime).toDateTime();
}

/*!
    Sets the todo time's start date and time to \a startDateTime.
    For all-day tasks, the time part can be set to any valid value.
 */
void QOrganizerTodoTime::setStartDateTime(const QDateTime &startDateTime)
{
    setValue(FieldStartDateTime, startDateTime);
}

/*!
    Returns the todo time's due date and time as QDateTime.
    For all-day tasks, the time part is meaningless.
 */
QDateTime QOrganizerTodoTime::dueDateTime() const
{
    return value(FieldDueDateTime).toDateTime();
}

/*!
    Sets the todo time's due date and time to \a dueDateTime.
    For all-day tasks, the time part can be set to any valid value.
 */
void QOrganizerTodoTime::setDueDateTime(const QDateTime &dueDateTime)
{
    setValue(FieldDueDateTime, dueDateTime);
}

/*!
    Sets the all-day status of the TODO to \a isAllDay.
    If the tasks is an all-day TODO, no time is considered to be
    specified for the todo, even if the start date time set
    for the todo has a time component.
 */
void QOrganizerTodoTime::setAllDay(bool isAllDay)
{
    setValue(FieldAllDay, isAllDay);
}

/*!
    Returns true if the todo is an all-day TODO, or false otherwise.
 */
bool QOrganizerTodoTime::isAllDay() const
{
    return value(FieldAllDay).toBool();
}


/*!
    \class QOrganizerItemType
    \brief The QOrganizerItemType class describes the type of the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemType::ItemType

    This enumeration describes the type of the organizer item.

    \value TypeUndefined        This item is of an unknown type.
    \value TypeEvent            This item is an event.
    \value TypeEventOccurrence  This item is an event occurrence.
    \value TypeTodo             This item is a TODO.
    \value TypeTodoOccurrence   This item is a TODO occurrence.
    \value TypeJournal          This item is a journal.
    \value TypeNote             This item is a note.
 */

/*!
    \enum QOrganizerItemType::ItemTypeField

    This enumeration defines the fields supported by QOrganizerItemType.
    \value FieldType  The value stored describes the type of the item.
 */

/*!
    Returns the organizer item type value stored in this detail.
 */
QOrganizerItemType::ItemType QOrganizerItemType::type() const
{
    return static_cast<ItemType>(value(FieldType).toInt());
}

/*!
    Sets the type of the organizer item to be the give \a type.
 */
void QOrganizerItemType::setType(QOrganizerItemType::ItemType type)
{
    setValue(FieldType, type);
}


/*!
   \class QOrganizerEventRsvp
   \brief The QOrganizerEventRsvp class contains RSVP information for an event, applicable to the user of the calendar
   \inmodule QtOrganizer
   \ingroup organizer-details

   RSVP detail contain information such as the role of the calendar user in the event,
   the participation status of the calendar user in the event, the date by which the
   user is requested to respond to the invitation, the date at which the user did
   respond to the invitation, the name of the organizer of the event, and the contact
   details of the organizer of the event.
 */

/*!
    \enum QOrganizerEventRsvp::EventRsvpField

    This enumeration defines the fields supported by QOrganizerEventRsvp.
    \value FieldParticipationStatus  The value stored describes the pariticipation status of the user for this event.
    \value FieldParticipationRole    The value stored describes the pariticipation role of the user for this event.
    \value FieldResponseRequirement  The value stored describes the if the user is required to respond this event invitation.
    \value FieldResponseDeadline     The value stored describes when the user should respond to this event invitation.
    \value FieldResponseDate         The value stored describes when the user responds to this event invitation.
    \value FieldOrganizerName        The value stored describes the organizer's name of this event.
    \value FieldOrganizerEmail       The value stored describes the organizer's Email of this event.
 */

/*!
   Sets the participation status of the user of the calendar in the event to \a status.
 */
void QOrganizerEventRsvp::setParticipationStatus(QOrganizerEventAttendee::ParticipationStatus status)
{
    setValue(FieldParticipationStatus, status);
}

/*!
   Returns the participation status of the user of the calendar in the event.
 */
QOrganizerEventAttendee::ParticipationStatus QOrganizerEventRsvp::participationStatus() const
{
    return static_cast<QOrganizerEventAttendee::ParticipationStatus>(value(FieldParticipationStatus).toInt());
}

/*!
   Sets the role of the user of the calendar in the event to \a role.
 */
void QOrganizerEventRsvp::setParticipationRole(QOrganizerEventAttendee::ParticipationRole role)
{
    setValue(FieldParticipationRole, role);
}

/*!
   Returns the participation role of the user of the calendar in the event.
 */
QOrganizerEventAttendee::ParticipationRole QOrganizerEventRsvp::participationRole() const
{
    return static_cast<QOrganizerEventAttendee::ParticipationRole>(value(FieldParticipationRole).toInt());
}

/*!
   \enum QOrganizerEventRsvp::ResponseRequirement
   \value ResponseNotRequired The organizer does not require the calendar user to respond to the invitation
   \value ResponseRequired The organizer requires the calendar user to respond to the invitation
*/

/*!
   Sets the response requirement for the invitation to \a responseRequirement.
 */
void QOrganizerEventRsvp::setResponseRequirement(ResponseRequirement responseRequirement)
{
    setValue(FieldResponseRequirement, responseRequirement);
}

/*!
   Returns the response requirement of the invitation.
 */
QOrganizerEventRsvp::ResponseRequirement QOrganizerEventRsvp::responseRequirement() const
{
    return static_cast<ResponseRequirement>(value(FieldResponseRequirement).toInt());
}

/*!
   Sets the date by which the user was requested to have responded to the invitation to the event to \a date.
 */
void QOrganizerEventRsvp::setResponseDeadline(const QDate &date)
{
    setValue(FieldResponseDeadline, date);
}

/*!
   Returns the date by which the user was requested to have responded to the invitation to the event.
 */
QDate QOrganizerEventRsvp::responseDeadline() const
{
    return value(FieldResponseDeadline).toDate();
}

/*!
   Sets the date at which the user responded to the invitation to the event to \a date.
 */
void QOrganizerEventRsvp::setResponseDate(const QDate &date)
{
    setValue(FieldResponseDate, date);
}

/*!
   Returns the date at which user responded to the invitation to the event.
 */
QDate QOrganizerEventRsvp::responseDate() const
{
    return value(FieldResponseDate).toDate();
}

/*!
   Sets the name of the organizer of the event (who sent the invitation) to \a name.
 */
void QOrganizerEventRsvp::setOrganizerName(const QString &name)
{
    setValue(FieldOrganizerName, name);
}

/*!
   Returns the name of the organizer of the event.
 */
QString QOrganizerEventRsvp::organizerName() const
{
    return value(FieldOrganizerName).toString();
}

/*!
   Sets the email address of the organizer of the event (who sent the invitation) to \a email.
 */
void QOrganizerEventRsvp::setOrganizerEmail(const QString &email)
{
    setValue(FieldOrganizerEmail, email);
}

/*!
   Returns the email address of the organizer of the event.
 */
QString QOrganizerEventRsvp::organizerEmail() const
{
    return value(FieldOrganizerEmail).toString();
}

/*!
    \class QOrganizerItemClassification
    \brief The QOrganizerItemClassification class is for defining the classification of an organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details

    This can be used as a part of security model for the organizer.
 */

/*!
    \enum QOrganizerItemClassification::ClassificationField

    This enumeration defines the fields supported by QOrganizerItemClassification.
    \value FieldClassification  The value stored describes the classification of an item.
 */

/*!
   \enum QOrganizerItemClassification::AccessClassification
   \value AccessPublic The item can be accessed by everybody
   \value AccessConfidential The access to the item is restricted
   \value AccessPrivate Only private access allowed for the item
*/

/*!
   Sets the classification of the item \a classification.
 */
void QOrganizerItemClassification::setClassification(AccessClassification classification)
{
    setValue(FieldClassification, classification);
}

/*!
   Returns classification of the item.
 */
QOrganizerItemClassification::AccessClassification QOrganizerItemClassification::classification() const
{
    return static_cast<AccessClassification>(value(FieldClassification).toInt());
}

/*!
    \class QOrganizerItemExtendedDetail
    \brief The QOrganizerItemExtendedDetail class provides the possibility to save extended details to the organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details

    Different back-end engines may or may not support extended details for different item types. Even
    if supported, they may accept different QVariant types as the data.
 */

/*!
    \enum QOrganizerItemExtendedDetail::ExtendedDetailField

    This enumeration defines the fields supported by QOrganizerItemExtendedDetail.
    \value FieldName  The value stored describes the name of this extended detail.
    \value FieldData  The value stored describes the data stored in this extended detail.
 */

/*!
    Sets the \a name of this extended detail.
 */
void QOrganizerItemExtendedDetail::setName(const QString &name)
{
    setValue(FieldName, name);
}

/*!
    Gets the name of this extended detail.
 */
QString QOrganizerItemExtendedDetail::name() const
{
    return value(FieldName).toString();
}

/*!
    Sets the \a data of the extended detail.
 */
void QOrganizerItemExtendedDetail::setData(const QVariant &data)
{
    setValue(FieldData, data);
}

/*!
    Gets the data of this extended detail.
 */
QVariant QOrganizerItemExtendedDetail::data() const
{
    return value(FieldData);
}

/*!
    \class QOrganizerItemVersion
    \brief The QOrganizerItemVersion class provides the versioning information of an organizer item.
    \inmodule QtOrganizer
    \ingroup organizer-details
 */

/*!
    \enum QOrganizerItemVersion::VersionField

    This enumeration defines the fields supported by QOrganizerItemVersion.
    \value FieldVersion          The value stored describes the integer version of an organizer item.
                                 It can be used as the sequence number as per iCalendar spec.
    \value FieldExtendedVersion  The value stored describes the extended version of an organizer item.
                                 It can be used to represent the version stored in the back-end.
 */

/*!
    Sets the integer \a version. The \a version must be a positive number, otherwise ignored.
 */
void QOrganizerItemVersion::setVersion(int version)
{
    if (version > 0)
        setValue(FieldVersion, version);
}

/*!
    Gets the integer version.
 */
int QOrganizerItemVersion::version() const
{
    return value(FieldVersion).toInt();
}

/*!
    Sets the \a extendedVersion.
 */
void QOrganizerItemVersion::setExtendedVersion(const QByteArray &extendedVersion)
{
    setValue(FieldExtendedVersion, extendedVersion);
}

/*!
    Gets the extended version.
 */
QByteArray QOrganizerItemVersion::extendedVersion() const
{
    return value(FieldExtendedVersion).toByteArray();
}

QTORGANIZER_END_NAMESPACE