48 #ifndef KCALCORE_CALENDAR_H
49 #define KCALCORE_CALENDAR_H
51 #include "kcalcore_export.h"
58 #include <QtCore/QObject>
150 explicit Calendar(
const KDateTime::Spec &timeSpec);
179 void setProductId(
const QString &
id);
214 void setTimeSpec(
const KDateTime::Spec &timeSpec);
222 KDateTime::Spec timeSpec()
const;
237 void setTimeZoneId(
const QString &timeZoneId);
262 void setViewTimeSpec(
const KDateTime::Spec &timeSpec)
const;
282 void setViewTimeZoneId(
const QString &timeZoneId)
const;
290 KDateTime::Spec viewTimeSpec()
const;
298 QString viewTimeZoneId()
const;
316 void shiftTimes(
const KDateTime::Spec &oldSpec,
const KDateTime::Spec &newSpec);
343 void setModified(
bool modified);
352 bool isModified()
const;
357 virtual void close() = 0;
374 virtual bool reload();
381 virtual bool isSaving()
const;
398 virtual void startBatchAdding();
405 virtual void endBatchAdding();
410 bool batchAdding()
const;
472 virtual void clearNotebookAssociations();
516 bool hasValidNotebook(
const QString ¬ebook)
const;
527 bool addNotebook(
const QString ¬ebook,
bool isVisible);
538 bool updateNotebook(
const QString ¬ebook,
bool isVisible);
548 bool deleteNotebook(
const QString ¬ebook);
556 bool setDefaultNotebook(
const QString ¬ebook);
563 QString defaultNotebook()
const;
598 const KDateTime &recurrenceId = KDateTime())
const;
617 virtual bool deleteIncidenceInstances(
const Incidence::Ptr &incidence) = 0;
682 const KDateTime::Spec &spec,
bool single =
true);
698 const KDateTime &recurrenceId,
699 bool thisAndFuture =
false);
712 virtual bool addEvent(
const Event::Ptr &event) = 0;
723 virtual bool deleteEvent(
const Event::Ptr &event) = 0;
731 virtual bool deleteEventInstances(
const Event::Ptr &event) = 0;
738 virtual void deleteAllEvents() = 0;
786 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
787 bool inclusive =
false)
const;
803 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
828 virtual Event::List rawEventsForDate(
const KDateTime &dt)
const = 0;
844 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
845 bool inclusive =
false)
const = 0;
862 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
876 const KDateTime &recurrenceId = KDateTime())
const = 0;
891 const KDateTime &recurrenceId = KDateTime())
const = 0;
933 virtual bool addTodo(
const Todo::Ptr &todo) = 0;
944 virtual bool deleteTodo(
const Todo::Ptr &todo) = 0;
951 virtual bool deleteTodoInstances(
const Todo::Ptr &todo) = 0;
957 virtual void deleteAllTodos() = 0;
1006 const KDateTime::Spec ×pec = KDateTime::Spec(),
1007 bool inclusive =
false)
const;
1044 const KDateTime::Spec ×pec = KDateTime::Spec(),
1045 bool inclusive =
false)
const = 0;
1057 const KDateTime &recurrenceId = KDateTime())
const = 0;
1072 const KDateTime &recurrenceId = KDateTime())
const = 0;
1114 virtual bool addJournal(
const Journal::Ptr &journal) = 0;
1125 virtual bool deleteJournal(
const Journal::Ptr &journal) = 0;
1133 virtual bool deleteJournalInstances(
const Journal::Ptr &journal) = 0;
1139 virtual void deleteAllJournals() = 0;
1205 const KDateTime &recurrenceId = KDateTime())
const = 0;
1220 const KDateTime &recurrenceId = KDateTime())
const = 0;
1316 virtual Alarm::List alarms(
const KDateTime &from,
const KDateTime &to)
const = 0;
1340 virtual void calendarModified(
bool modified,
Calendar *calendar);
1346 virtual void calendarIncidenceAdded(
const Incidence::Ptr &incidence);
1352 virtual void calendarIncidenceChanged(
const Incidence::Ptr &incidence);
1358 virtual void calendarIncidenceDeleted(
const Incidence::Ptr &incidence);
1364 virtual void calendarIncidenceAdditionCanceled(
const Incidence::Ptr &incidence);
1395 void incidenceUpdated(
const QString &uid,
const KDateTime &recurrenceId);
1402 virtual void doSetTimeSpec(
const KDateTime::Spec &timeSpec);
1426 void notifyIncidenceAdditionCanceled(
const Incidence::Ptr &incidence);
1432 virtual void customPropertyUpdated();
1440 void setObserversEnabled(
bool enabled);
1452 const KDateTime &from,
const KDateTime &to)
const;
1464 const KDateTime &from,
const KDateTime &to)
const;
1474 void setDeletionTracking(
bool enable);
1481 bool deletionTracking()
const;
1487 virtual void virtual_hook(
int id,
void *data);
1494 void filterChanged();
JournalSortField
Calendar Journal sort keys.
Sort Todos chronologically, by start date.
This file is part of the API for handling calendar data and defines the CustomProperties class...
Sort Journals chronologically by date.
EventSortField
Calendar Event sort keys.
virtual bool event(QEvent *e)
Sort Events chronologically, by end date.
Sort Todos chronologically, by due date.
SortDirection
Calendar Incidence sort directions.
This file is part of the API for handling calendar data and defines the Todo class.
Sort in ascending order (first to last)
TodoSortField
Calendar Todo sort keys.
This file is part of the API for handling calendar data and defines the Journal class.
QSharedPointer< Calendar > Ptr
A shared pointer to a Calendar.
Sort Journals alphabetically, by summary.
A class to manage custom calendar properties.
The CalendarObserver class.
This file is part of the API for handling calendar data and defines the Event class.
This file is part of the API for handling calendar data and defines the Incidence class...
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Sort Events alphabetically, by summary.
Represents the main calendar class.
The IncidenceObserver class.
Sort in descending order (last to first)
Sort Todos alphabetically, by summary.
Provides a filter for calendars.
Sort Todos by percentage completed.
Sort Events chronologically, by start date.
Sort Todos chronologically, by creation date.