• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • kcalcore
calendar.h
Go to the documentation of this file.
1/*
2 This file is part of the kcalcore library.
3
4 Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5 Copyright (c) 2001,2003,2004 Cornelius Schumacher <schumacher@kde.org>
6 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
7 Copyright (c) 2006 David Jarvie <software@astrojar.org.uk>
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA.
23*/
48#ifndef KCALCORE_CALENDAR_H
49#define KCALCORE_CALENDAR_H
50
51#include "kcalcore_export.h"
52#include "event.h"
53#include "customproperties.h"
54#include "incidence.h"
55#include "journal.h"
56#include "todo.h"
57
58#include <QtCore/QObject>
59
60namespace KCalCore {
61
62class CalFilter;
63class Person;
64class ICalTimeZones;
65
69enum SortDirection {
70 SortDirectionAscending,
71 SortDirectionDescending
72};
73
77enum EventSortField {
78 EventSortUnsorted,
79 EventSortStartDate,
80 EventSortEndDate,
81 EventSortSummary
82};
83
87enum TodoSortField {
88 TodoSortUnsorted,
89 TodoSortStartDate,
90 TodoSortDueDate,
91 TodoSortPriority,
92 TodoSortPercentComplete,
93 TodoSortSummary,
94 TodoSortCreated
95};
96
100enum JournalSortField {
101 JournalSortUnsorted,
102 JournalSortDate,
103 JournalSortSummary
104};
105
128class KCALCORE_EXPORT Calendar : public QObject, public CustomProperties,
129 public IncidenceBase::IncidenceObserver
130{
131 Q_OBJECT
132
133public:
134
138 typedef QSharedPointer<Calendar> Ptr;
139
150 explicit Calendar(const KDateTime::Spec &timeSpec);
151
165 explicit Calendar(const QString &timeZoneId);
166
170 virtual ~Calendar();
171
179 void setProductId(const QString &id);
180
186 QString productId() const;
187
195 void setOwner(const Person::Ptr &owner);
196
204 Person::Ptr owner() const;
205
214 void setTimeSpec(const KDateTime::Spec &timeSpec);
215
222 KDateTime::Spec timeSpec() const;
223
237 void setTimeZoneId(const QString &timeZoneId);
238
246 QString timeZoneId() const;
247
262 void setViewTimeSpec(const KDateTime::Spec &timeSpec) const;
263
282 void setViewTimeZoneId(const QString &timeZoneId) const;
283
290 KDateTime::Spec viewTimeSpec() const;
291
298 QString viewTimeZoneId() const;
299
316 void shiftTimes(const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec);
317
325 ICalTimeZones *timeZones() const;
326
333 void setTimeZones(ICalTimeZones *zones);
334
343 void setModified(bool modified);
344
352 bool isModified() const;
353
357 virtual void close() = 0;
358
365 virtual bool save();
366
374 virtual bool reload();
375
381 virtual bool isSaving() const;
382
388 QStringList categories() const;
389
390 // Incidence Specific Methods //
391
398 virtual void startBatchAdding();
399
405 virtual void endBatchAdding();
406
410 bool batchAdding() const;
411
421 virtual bool addIncidence(const Incidence::Ptr &incidence);
422
432 virtual bool deleteIncidence(const Incidence::Ptr &incidence);
433
439 virtual Incidence::List incidences() const;
440
448 virtual Incidence::List incidences(const QDate &date) const;
449
455 virtual Incidence::List rawIncidences() const;
456
464 virtual Incidence::List instances(const Incidence::Ptr &incidence) const;
465
466 // Notebook Specific Methods //
467
472 virtual void clearNotebookAssociations();
473
482 virtual bool setNotebook(const Incidence::Ptr &incidence, const QString &notebook);
483
491 virtual QString notebook(const Incidence::Ptr &incidence) const;
492
500 virtual QString notebook(const QString &uid) const;
501
507 virtual QStringList notebooks() const;
508
516 bool hasValidNotebook(const QString &notebook) const;
517
527 bool addNotebook(const QString &notebook, bool isVisible);
528
538 bool updateNotebook(const QString &notebook, bool isVisible);
539
548 bool deleteNotebook(const QString &notebook);
549
556 bool setDefaultNotebook(const QString &notebook);
557
563 QString defaultNotebook() const;
564
570 bool isVisible(const Incidence::Ptr &incidence) const;
571
578 virtual Incidence::List incidences(const QString &notebook) const;
579
586 virtual Incidence::List duplicates(const Incidence::Ptr &incidence);
587
597 Incidence::Ptr incidence(const QString &uid,
598 const KDateTime &recurrenceId = KDateTime()) const;
599
609 Incidence::Ptr deleted(const QString &uid, const KDateTime &recurrenceId = KDateTime()) const;
610
617 virtual bool deleteIncidenceInstances(const Incidence::Ptr &incidence) = 0;
618
627 virtual Incidence::Ptr incidenceFromSchedulingID(const QString &sid) const;
628
635 virtual Incidence::List incidencesFromSchedulingID(const QString &sid) const;
636
646 static Incidence::List mergeIncidenceList(const Event::List &events,
647 const Todo::List &todos,
648 const Journal::List &journals);
649
654 virtual bool beginChange(const Incidence::Ptr &incidence);
655
660 virtual bool endChange(const Incidence::Ptr &incidence);
661
680 KCALCORE_DEPRECATED Incidence::Ptr dissociateOccurrence(
681 const Incidence::Ptr &incidence, const QDate &date,
682 const KDateTime::Spec &spec, bool single = true);
697 static Incidence::Ptr createException(const Incidence::Ptr &incidence,
698 const KDateTime &recurrenceId,
699 bool thisAndFuture = false);
700
701 // Event Specific Methods //
702
712 virtual bool addEvent(const Event::Ptr &event) = 0;
713
723 virtual bool deleteEvent(const Event::Ptr &event) = 0;
724
731 virtual bool deleteEventInstances(const Event::Ptr &event) = 0;
732
738 virtual void deleteAllEvents() = 0;
739
749 static Event::List sortEvents(const Event::List &eventList,
750 EventSortField sortField,
751 SortDirection sortDirection);
760 virtual Event::List events(EventSortField sortField = EventSortUnsorted,
761 SortDirection sortDirection = SortDirectionAscending) const;
762
770 Event::List events(const KDateTime &dt) const;
771
785 Event::List events(const QDate &start, const QDate &end,
786 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
787 bool inclusive = false) const;
788
802 Event::List events(const QDate &date,
803 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
804 EventSortField sortField = EventSortUnsorted,
805 SortDirection sortDirection = SortDirectionAscending) const;
806
815 virtual Event::List rawEvents(
816 EventSortField sortField = EventSortUnsorted,
817 SortDirection sortDirection = SortDirectionAscending) const = 0;
818
828 virtual Event::List rawEventsForDate(const KDateTime &dt) const = 0;
829
843 virtual Event::List rawEvents(const QDate &start, const QDate &end,
844 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
845 bool inclusive = false) const = 0;
846
860 virtual Event::List rawEventsForDate(
861 const QDate &date,
862 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
863 EventSortField sortField = EventSortUnsorted,
864 SortDirection sortDirection = SortDirectionAscending) const = 0;
865
875 virtual Event::Ptr event(const QString &uid,
876 const KDateTime &recurrenceId = KDateTime()) const = 0;
877
890 virtual Event::Ptr deletedEvent(const QString &uid,
891 const KDateTime &recurrenceId = KDateTime()) const = 0;
892
904 virtual Event::List deletedEvents(
905 EventSortField sortField = EventSortUnsorted,
906 SortDirection sortDirection = SortDirectionAscending) const = 0;
907
917 virtual Event::List eventInstances(
918 const Incidence::Ptr &event,
919 EventSortField sortField = EventSortUnsorted,
920 SortDirection sortDirection = SortDirectionAscending) const = 0;
921
922 // Todo Specific Methods //
923
933 virtual bool addTodo(const Todo::Ptr &todo) = 0;
934
944 virtual bool deleteTodo(const Todo::Ptr &todo) = 0;
945
951 virtual bool deleteTodoInstances(const Todo::Ptr &todo) = 0;
952
957 virtual void deleteAllTodos() = 0;
958
968 static Todo::List sortTodos(const Todo::List &todoList,
969 TodoSortField sortField,
970 SortDirection sortDirection);
971
980 virtual Todo::List todos(TodoSortField sortField = TodoSortUnsorted,
981 SortDirection sortDirection = SortDirectionAscending) const;
982
990 virtual Todo::List todos(const QDate &date) const;
991
1005 virtual Todo::List todos(const QDate &start, const QDate &end,
1006 const KDateTime::Spec &timespec = KDateTime::Spec(),
1007 bool inclusive = false) const;
1008
1017 virtual Todo::List rawTodos(
1018 TodoSortField sortField = TodoSortUnsorted,
1019 SortDirection sortDirection = SortDirectionAscending) const = 0;
1020
1028 virtual Todo::List rawTodosForDate(const QDate &date) const = 0;
1029
1043 virtual Todo::List rawTodos(const QDate &start, const QDate &end,
1044 const KDateTime::Spec &timespec = KDateTime::Spec(),
1045 bool inclusive = false) const = 0;
1046
1056 virtual Todo::Ptr todo(const QString &uid,
1057 const KDateTime &recurrenceId = KDateTime()) const = 0;
1058
1071 virtual Todo::Ptr deletedTodo(const QString &uid,
1072 const KDateTime &recurrenceId = KDateTime()) const = 0;
1073
1085 virtual Todo::List deletedTodos(
1086 TodoSortField sortField = TodoSortUnsorted,
1087 SortDirection sortDirection = SortDirectionAscending) const = 0;
1088
1098 virtual Todo::List todoInstances(
1099 const Incidence::Ptr &todo,
1100 TodoSortField sortField = TodoSortUnsorted,
1101 SortDirection sortDirection = SortDirectionAscending) const = 0;
1102
1103 // Journal Specific Methods //
1104
1114 virtual bool addJournal(const Journal::Ptr &journal) = 0;
1115
1125 virtual bool deleteJournal(const Journal::Ptr &journal) = 0;
1126
1133 virtual bool deleteJournalInstances(const Journal::Ptr &journal) = 0;
1134
1139 virtual void deleteAllJournals() = 0;
1140
1150 static Journal::List sortJournals(const Journal::List &journalList,
1151 JournalSortField sortField,
1152 SortDirection sortDirection);
1161 virtual Journal::List journals(
1162 JournalSortField sortField = JournalSortUnsorted,
1163 SortDirection sortDirection = SortDirectionAscending) const;
1164
1172 virtual Journal::List journals(const QDate &date) const;
1173
1182 virtual Journal::List rawJournals(
1183 JournalSortField sortField = JournalSortUnsorted,
1184 SortDirection sortDirection = SortDirectionAscending) const = 0;
1185
1193 virtual Journal::List rawJournalsForDate(const QDate &date) const = 0;
1194
1204 virtual Journal::Ptr journal(const QString &uid,
1205 const KDateTime &recurrenceId = KDateTime()) const = 0;
1206
1219 virtual Journal::Ptr deletedJournal(const QString &uid,
1220 const KDateTime &recurrenceId = KDateTime()) const = 0;
1221
1233 virtual Journal::List deletedJournals(
1234 JournalSortField sortField = JournalSortUnsorted,
1235 SortDirection sortDirection = SortDirectionAscending) const = 0;
1236
1246 virtual Journal::List journalInstances(
1247 const Incidence::Ptr &journal,
1248 JournalSortField sortField = JournalSortUnsorted,
1249 SortDirection sortDirection = SortDirectionAscending) const = 0;
1250
1251 // Relations Specific Methods //
1252
1257 virtual void setupRelations(const Incidence::Ptr &incidence);
1258
1264 virtual void removeRelations(const Incidence::Ptr &incidence);
1265
1272 bool isAncestorOf(const Incidence::Ptr &ancestor,
1273 const Incidence::Ptr &incidence) const;
1274
1281 Incidence::List relations(const QString &uid) const;
1282
1283 // Filter Specific Methods //
1284
1294 void setFilter(CalFilter *filter);
1295
1304 CalFilter *filter() const;
1305
1306 // Alarm Specific Methods //
1307
1316 virtual Alarm::List alarms(const KDateTime &from, const KDateTime &to) const = 0;
1317
1318 // Observer Specific Methods //
1319
1325 class KCALCORE_EXPORT CalendarObserver //krazy:exclude=dpointer
1326 {
1327 public:
1331 virtual ~CalendarObserver();
1332
1340 virtual void calendarModified(bool modified, Calendar *calendar);
1341
1346 virtual void calendarIncidenceAdded(const Incidence::Ptr &incidence);
1347
1352 virtual void calendarIncidenceChanged(const Incidence::Ptr &incidence);
1353
1358 virtual void calendarIncidenceDeleted(const Incidence::Ptr &incidence);
1359
1364 virtual void calendarIncidenceAdditionCanceled(const Incidence::Ptr &incidence);
1365 };
1366
1375 void registerObserver(CalendarObserver *observer);
1376
1385 void unregisterObserver(CalendarObserver *observer);
1386
1387 using QObject::event; // prevent warning about hidden virtual method
1388
1389protected:
1395 void incidenceUpdated(const QString &uid, const KDateTime &recurrenceId);
1396
1402 virtual void doSetTimeSpec(const KDateTime::Spec &timeSpec);
1403
1408 void notifyIncidenceAdded(const Incidence::Ptr &incidence);
1409
1414 void notifyIncidenceChanged(const Incidence::Ptr &incidence);
1415
1420 void notifyIncidenceDeleted(const Incidence::Ptr &incidence);
1421
1426 void notifyIncidenceAdditionCanceled(const Incidence::Ptr &incidence);
1427
1432 virtual void customPropertyUpdated();
1433
1440 void setObserversEnabled(bool enabled);
1441
1451 void appendAlarms(Alarm::List &alarms, const Incidence::Ptr &incidence,
1452 const KDateTime &from, const KDateTime &to) const;
1453
1463 void appendRecurringAlarms(Alarm::List &alarms, const Incidence::Ptr &incidence,
1464 const KDateTime &from, const KDateTime &to) const;
1465
1474 void setDeletionTracking(bool enable);
1475
1481 bool deletionTracking() const;
1482
1487 virtual void virtual_hook(int id, void *data);
1488
1489Q_SIGNALS:
1494 void filterChanged();
1495
1496private:
1497 //@cond PRIVATE
1498 class Private;
1499 Private *const d;
1500 //@endcond
1501
1502 Q_DISABLE_COPY(Calendar)
1503};
1504
1505}
1506
1507#endif
KCalCore::Alarm::List
QVector< Ptr > List
List of alarms.
Definition: alarm.h:83
KCalCore::CalFilter
Provides a filter for calendars.
Definition: calfilter.h:56
KCalCore::Calendar::CalendarObserver
The CalendarObserver class.
Definition: calendar.h:1326
KCalCore::Calendar
Represents the main calendar class.
Definition: calendar.h:130
KCalCore::Calendar::deletedTodos
virtual Todo::List deletedTodos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all deleted Todos for this Calendar.
KCalCore::Calendar::event
virtual Event::Ptr event(const QString &uid, const KDateTime &recurrenceId=KDateTime()) const =0
Returns the Event associated with the given unique identifier.
KCalCore::Calendar::addEvent
virtual bool addEvent(const Event::Ptr &event)=0
Inserts an Event into the calendar.
KCalCore::Calendar::hasValidNotebook
bool hasValidNotebook(const QString &notebook) const
Check if calendar knows about the given notebook.
KCalCore::Calendar::instances
virtual Incidence::List instances(const Incidence::Ptr &incidence) const
Returns an unfiltered list of all exceptions of this recurring incidence.
KCalCore::Calendar::isVisible
bool isVisible(const Incidence::Ptr &incidence) const
Check if incidence is visible.
KCalCore::Calendar::setDefaultNotebook
bool setDefaultNotebook(const QString &notebook)
set DefaultNotebook information to calendar.
KCalCore::Calendar::alarms
virtual Alarm::List alarms(const KDateTime &from, const KDateTime &to) const =0
Returns a list of Alarms within a time range for this Calendar.
KCalCore::Calendar::journal
virtual Journal::Ptr journal(const QString &uid, const KDateTime &recurrenceId=KDateTime()) const =0
Returns the Journal associated with the given unique identifier.
KCalCore::Calendar::rawJournalsForDate
virtual Journal::List rawJournalsForDate(const QDate &date) const =0
Returns an unfiltered list of all Journals for on the specified date.
KCalCore::Calendar::timeZoneId
QString timeZoneId() const
Returns the time zone ID used for creating or modifying incidences in the calendar.
KCalCore::Calendar::incidences
virtual Incidence::List incidences() const
Returns a filtered list of all Incidences for this Calendar.
KCalCore::Calendar::setViewTimeSpec
void setViewTimeSpec(const KDateTime::Spec &timeSpec) const
Notes the time specification which the client application intends to use for viewing the incidences i...
KCalCore::Calendar::filterChanged
void filterChanged()
Emitted when setFilter() is called.
KCalCore::Calendar::deleteEvent
virtual bool deleteEvent(const Event::Ptr &event)=0
Removes an Event from the calendar.
KCalCore::Calendar::duplicates
virtual Incidence::List duplicates(const Incidence::Ptr &incidence)
List all possible duplicate incidences.
KCalCore::Calendar::Ptr
QSharedPointer< Calendar > Ptr
A shared pointer to a Calendar.
Definition: calendar.h:138
KCalCore::Calendar::setTimeSpec
void setTimeSpec(const KDateTime::Spec &timeSpec)
Sets the default time specification (time zone, etc.) used for creating or modifying incidences in th...
KCalCore::Calendar::deleteJournal
virtual bool deleteJournal(const Journal::Ptr &journal)=0
Removes a Journal from the calendar.
KCalCore::Calendar::updateNotebook
bool updateNotebook(const QString &notebook, bool isVisible)
Update notebook information in calendar.
KCalCore::Calendar::addTodo
virtual bool addTodo(const Todo::Ptr &todo)=0
Inserts a Todo into the calendar.
KCalCore::Calendar::Calendar
Calendar(const QString &timeZoneId)
Construct Calendar object using a time zone ID.
KCalCore::Calendar::viewTimeZoneId
QString viewTimeZoneId() const
Returns the time zone Id used for viewing the incidences in this calendar.
KCalCore::Calendar::filter
CalFilter * filter() const
Returns the calendar filter.
KCalCore::Calendar::rawIncidences
virtual Incidence::List rawIncidences() const
Returns an unfiltered list of all Incidences for this Calendar.
KCalCore::Calendar::categories
QStringList categories() const
Returns a list of all categories used by Incidences in this Calendar.
KCalCore::Calendar::setTimeZones
void setTimeZones(ICalTimeZones *zones)
Set the time zone collection used by the calendar.
KCalCore::Calendar::rawTodos
virtual Todo::List rawTodos(const QDate &start, const QDate &end, const KDateTime::Spec &timespec=KDateTime::Spec(), bool inclusive=false) const =0
Returns an unfiltered list of all Todos occurring within a date range.
KCalCore::Calendar::setOwner
void setOwner(const Person::Ptr &owner)
Sets the owner of the calendar to owner.
KCalCore::Calendar::deleteAllEvents
virtual void deleteAllEvents()=0
Removes all Events from the calendar.
KCalCore::Calendar::incidences
virtual Incidence::List incidences(const QDate &date) const
Returns a filtered list of all Incidences which occur on the given date.
KCalCore::Calendar::deletedEvents
virtual Event::List deletedEvents(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all deleted Events for this Calendar.
KCalCore::Calendar::eventInstances
virtual Event::List eventInstances(const Incidence::Ptr &event, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all possible instances for this recurring Event.
KCalCore::Calendar::setFilter
void setFilter(CalFilter *filter)
Sets the calendar filter.
KCalCore::Calendar::rawTodosForDate
virtual Todo::List rawTodosForDate(const QDate &date) const =0
Returns an unfiltered list of all Todos which due on the specified date.
KCalCore::Calendar::notebook
virtual QString notebook(const Incidence::Ptr &incidence) const
Get incidence's notebook.
KCalCore::Calendar::rawEventsForDate
virtual Event::List rawEventsForDate(const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Events which occur on the given date.
KCalCore::Calendar::todo
virtual Todo::Ptr todo(const QString &uid, const KDateTime &recurrenceId=KDateTime()) const =0
Returns the Todo associated with the given unique identifier.
KCalCore::Calendar::~Calendar
virtual ~Calendar()
Destroys the calendar.
KCalCore::Calendar::todoInstances
virtual Todo::List todoInstances(const Incidence::Ptr &todo, TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all possible instances for this recurring Todo.
KCalCore::Calendar::timeZones
ICalTimeZones * timeZones() const
Returns the time zone collection used by the calendar.
KCalCore::Calendar::journalInstances
virtual Journal::List journalInstances(const Incidence::Ptr &journal, JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all instances for this recurring Journal.
KCalCore::Calendar::setViewTimeZoneId
void setViewTimeZoneId(const QString &timeZoneId) const
Notes the time zone Id which the client application intends to use for viewing the incidences in this...
KCalCore::Calendar::deleteEventInstances
virtual bool deleteEventInstances(const Event::Ptr &event)=0
Delete all events that are instances of recurring event event.
KCalCore::Calendar::shiftTimes
void shiftTimes(const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
Shifts the times of all incidences so that they appear at the same clock time as before but in a new ...
KCalCore::Calendar::Calendar
Calendar(const KDateTime::Spec &timeSpec)
Constructs a calendar with a specified time zone timeZoneid.
KCalCore::Calendar::rawJournals
virtual Journal::List rawJournals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Journals for this Calendar.
KCalCore::Calendar::notebook
virtual QString notebook(const QString &uid) const
Get incidence's notebook.
KCalCore::Calendar::rawEvents
virtual Event::List rawEvents(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Events for this Calendar.
KCalCore::Calendar::deleteTodoInstances
virtual bool deleteTodoInstances(const Todo::Ptr &todo)=0
Delete all to-dos that are instances of recurring to-do todo.
KCalCore::Calendar::clearNotebookAssociations
virtual void clearNotebookAssociations()
Clears notebook associations from hash-tables for incidences.
KCalCore::Calendar::close
virtual void close()=0
Clears out the current calendar, freeing all used memory etc.
KCalCore::Calendar::deleteJournalInstances
virtual bool deleteJournalInstances(const Journal::Ptr &journal)=0
Delete all journals that are instances of recurring journal journal.
KCalCore::Calendar::rawEvents
virtual Event::List rawEvents(const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false) const =0
Returns an unfiltered list of all Events occurring within a date range.
KCalCore::Calendar::rawEventsForDate
virtual Event::List rawEventsForDate(const KDateTime &dt) const =0
Returns an unfiltered list of all Events which occur on the given timestamp.
KCalCore::Calendar::viewTimeSpec
KDateTime::Spec viewTimeSpec() const
Returns the time specification used for viewing the incidences in this calendar.
KCalCore::Calendar::notebooks
virtual QStringList notebooks() const
List all uids of notebooks currently in the memory.
KCalCore::Calendar::deletedTodo
virtual Todo::Ptr deletedTodo(const QString &uid, const KDateTime &recurrenceId=KDateTime()) const =0
Returns the deleted Todo associated with the given unique identifier.
KCalCore::Calendar::deleteAllTodos
virtual void deleteAllTodos()=0
Removes all To-dos from the calendar.
KCalCore::Calendar::deleteTodo
virtual bool deleteTodo(const Todo::Ptr &todo)=0
Removes a Todo from the calendar.
KCalCore::Calendar::rawTodos
virtual Todo::List rawTodos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Todos for this Calendar.
KCalCore::Calendar::addNotebook
bool addNotebook(const QString &notebook, bool isVisible)
Add notebook information into calendar.
KCalCore::Calendar::setNotebook
virtual bool setNotebook(const Incidence::Ptr &incidence, const QString &notebook)
Associate notebook for an incidence.
KCalCore::Calendar::deleteAllJournals
virtual void deleteAllJournals()=0
Removes all Journals from the calendar.
KCalCore::Calendar::deletedEvent
virtual Event::Ptr deletedEvent(const QString &uid, const KDateTime &recurrenceId=KDateTime()) const =0
Returns the deleted Event associated with the given unique identifier.
KCalCore::Calendar::timeSpec
KDateTime::Spec timeSpec() const
Get the time specification (time zone etc.) used for creating or modifying incidences in the Calendar...
KCalCore::Calendar::defaultNotebook
QString defaultNotebook() const
Get uid of default notebook.
KCalCore::Calendar::deleteIncidenceInstances
virtual bool deleteIncidenceInstances(const Incidence::Ptr &incidence)=0
Delete all incidences that are instances of recurring incidence incidence.
KCalCore::Calendar::addJournal
virtual bool addJournal(const Journal::Ptr &journal)=0
Inserts a Journal into the calendar.
KCalCore::Calendar::deleteNotebook
bool deleteNotebook(const QString &notebook)
Delete notebook information from calendar.
KCalCore::Calendar::deletedJournals
virtual Journal::List deletedJournals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all deleted Journals for this Calendar.
KCalCore::Calendar::setTimeZoneId
void setTimeZoneId(const QString &timeZoneId)
Sets the time zone ID used for creating or modifying incidences in the Calendar.
KCalCore::Calendar::deletedJournal
virtual Journal::Ptr deletedJournal(const QString &uid, const KDateTime &recurrenceId=KDateTime()) const =0
Returns the deleted Journal associated with the given unique identifier.
KCalCore::Calendar::incidences
virtual Incidence::List incidences(const QString &notebook) const
List all notebook incidences in the memory.
KCalCore::Calendar::owner
Person::Ptr owner() const
Returns the owner of the calendar.
KCalCore::CustomProperties
A class to manage custom calendar properties.
Definition: customproperties.h:52
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
A shared pointer to an Event object.
Definition: event.h:55
KCalCore::Event::List
QVector< Ptr > List
List of events.
Definition: event.h:60
KCalCore::ICalTimeZones
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Definition: icaltimezones.h:66
KCalCore::IncidenceBase::IncidenceObserver
The IncidenceObserver class.
Definition: incidencebase.h:200
KCalCore::Incidence::List
QVector< Ptr > List
List of incidences.
Definition: incidence.h:117
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
Definition: incidence.h:112
KCalCore::Journal::Ptr
QSharedPointer< Journal > Ptr
A shared pointer to a Journal object.
Definition: journal.h:49
KCalCore::Journal::List
QVector< Ptr > List
List of journals.
Definition: journal.h:54
KCalCore::Person::Ptr
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
Definition: person.h:56
KCalCore::Todo::List
QVector< Ptr > List
List of to-dos.
Definition: todo.h:55
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Definition: todo.h:50
customproperties.h
This file is part of the API for handling calendar data and defines the CustomProperties class.
event.h
This file is part of the API for handling calendar data and defines the Event class.
incidence.h
This file is part of the API for handling calendar data and defines the Incidence class.
journal.h
This file is part of the API for handling calendar data and defines the Journal class.
KCalCore
TODO: KDE5:
Definition: alarm.h:47
KCalCore::JournalSortField
JournalSortField
Calendar Journal sort keys.
Definition: calendar.h:100
KCalCore::JournalSortUnsorted
@ JournalSortUnsorted
Do not sort Journals.
Definition: calendar.h:101
KCalCore::JournalSortSummary
@ JournalSortSummary
Sort Journals alphabetically, by summary.
Definition: calendar.h:103
KCalCore::JournalSortDate
@ JournalSortDate
Sort Journals chronologically by date.
Definition: calendar.h:102
KCalCore::TodoSortField
TodoSortField
Calendar Todo sort keys.
Definition: calendar.h:87
KCalCore::TodoSortCreated
@ TodoSortCreated
Sort Todos chronologically, by creation date.
Definition: calendar.h:94
KCalCore::TodoSortSummary
@ TodoSortSummary
Sort Todos alphabetically, by summary.
Definition: calendar.h:93
KCalCore::TodoSortUnsorted
@ TodoSortUnsorted
Do not sort Todos.
Definition: calendar.h:88
KCalCore::TodoSortStartDate
@ TodoSortStartDate
Sort Todos chronologically, by start date.
Definition: calendar.h:89
KCalCore::TodoSortPercentComplete
@ TodoSortPercentComplete
Sort Todos by percentage completed.
Definition: calendar.h:92
KCalCore::TodoSortPriority
@ TodoSortPriority
Sort Todos by priority.
Definition: calendar.h:91
KCalCore::TodoSortDueDate
@ TodoSortDueDate
Sort Todos chronologically, by due date.
Definition: calendar.h:90
KCalCore::EventSortField
EventSortField
Calendar Event sort keys.
Definition: calendar.h:77
KCalCore::EventSortStartDate
@ EventSortStartDate
Sort Events chronologically, by start date.
Definition: calendar.h:79
KCalCore::EventSortSummary
@ EventSortSummary
Sort Events alphabetically, by summary.
Definition: calendar.h:81
KCalCore::EventSortEndDate
@ EventSortEndDate
Sort Events chronologically, by end date.
Definition: calendar.h:80
KCalCore::EventSortUnsorted
@ EventSortUnsorted
Do not sort Events.
Definition: calendar.h:78
KCalCore::SortDirection
SortDirection
Calendar Incidence sort directions.
Definition: calendar.h:69
KCalCore::SortDirectionAscending
@ SortDirectionAscending
Sort in ascending order (first to last)
Definition: calendar.h:70
KCalCore::SortDirectionDescending
@ SortDirectionDescending
Sort in descending order (last to first)
Definition: calendar.h:71
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal