48 #ifndef KCALCORE_CALENDAR_H
49 #define KCALCORE_CALENDAR_H
51 #include "kcalcore_export.h"
58 #include <QtCore/QObject>
138 typedef QSharedPointer<Calendar>
Ptr;
150 explicit Calendar(
const KDateTime::Spec &timeSpec );
165 explicit Calendar(
const QString &timeZoneId );
179 void setProductId(
const QString &
id );
186 QString productId()
const;
214 void setTimeSpec(
const KDateTime::Spec &timeSpec );
222 KDateTime::Spec timeSpec()
const;
237 void setTimeZoneId(
const QString &timeZoneId );
246 QString timeZoneId()
const;
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;
388 QStringList categories()
const;
398 virtual void startBatchAdding();
405 virtual void endBatchAdding();
410 bool batchAdding()
const;
472 virtual void clearNotebookAssociations();
482 virtual bool setNotebook(
const Incidence::Ptr &incidence,
const QString ¬ebook );
491 virtual QString notebook(
const Incidence::Ptr &incidence )
const;
500 virtual QString notebook(
const QString &uid )
const;
507 virtual QStringList notebooks()
const;
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;
609 Incidence::Ptr deleted(
const QString &uid,
const KDateTime &recurrenceId = KDateTime() )
const;
617 virtual bool deleteIncidenceInstances(
const Incidence::Ptr &incidence ) = 0;
627 virtual Incidence::Ptr incidenceFromSchedulingID(
const QString &sid )
const;
635 virtual Incidence::List incidencesFromSchedulingID(
const QString &sid )
const;
680 const KDateTime::Spec &spec,
681 bool single =
true );
694 virtual bool addEvent(
const Event::Ptr &event ) = 0;
705 virtual bool deleteEvent(
const Event::Ptr &event ) = 0;
713 virtual bool deleteEventInstances(
const Event::Ptr &event ) = 0;
719 virtual void deleteAllEvents() = 0;
766 Event::List events(
const QDate &start,
const QDate &end,
767 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
768 bool inclusive =
false )
const;
784 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
809 virtual Event::List rawEventsForDate(
const KDateTime &dt )
const = 0;
824 virtual Event::List rawEvents(
const QDate &start,
const QDate &end,
825 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
826 bool inclusive =
false )
const = 0;
843 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
857 const KDateTime &recurrenceId = KDateTime() )
const = 0;
868 virtual Event::Ptr deletedEvent(
const QString &uid,
869 const KDateTime &recurrenceId = KDateTime() )
const = 0;
908 virtual bool addTodo(
const Todo::Ptr &todo ) = 0;
919 virtual bool deleteTodo(
const Todo::Ptr &todo ) = 0;
926 virtual bool deleteTodoInstances(
const Todo::Ptr &todo ) = 0;
932 virtual void deleteAllTodos() = 0;
965 virtual Todo::List todos(
const QDate &date )
const;
980 virtual Todo::List todos(
const QDate &start,
const QDate &end,
981 const KDateTime::Spec ×pec = KDateTime::Spec(),
982 bool inclusive =
false )
const;
1003 virtual Todo::List rawTodosForDate(
const QDate &date )
const = 0;
1018 virtual Todo::List rawTodos(
const QDate &start,
const QDate &end,
1019 const KDateTime::Spec ×pec = KDateTime::Spec(),
1020 bool inclusive =
false )
const = 0;
1031 virtual Todo::Ptr todo(
const QString &uid,
1032 const KDateTime &recurrenceId = KDateTime() )
const = 0;
1043 virtual Todo::Ptr deletedTodo(
const QString &uid,
1044 const KDateTime &recurrenceId = KDateTime() )
const = 0;
1083 virtual bool addJournal(
const Journal::Ptr &journal ) = 0;
1094 virtual bool deleteJournal(
const Journal::Ptr &journal ) = 0;
1102 virtual bool deleteJournalInstances(
const Journal::Ptr &journal ) = 0;
1108 virtual void deleteAllJournals() = 0;
1162 virtual Journal::List rawJournalsForDate(
const QDate &date )
const = 0;
1174 const KDateTime &recurrenceId = KDateTime() )
const = 0;
1185 virtual Journal::Ptr deletedJournal(
const QString &uid,
1186 const KDateTime &recurrenceId = KDateTime() )
const = 0;
1279 virtual Alarm::List alarms(
const KDateTime &from,
const KDateTime &to )
const = 0;
1303 virtual void calendarModified(
bool modified,
Calendar *calendar );
1309 virtual void calendarIncidenceAdded(
const Incidence::Ptr &incidence );
1315 virtual void calendarIncidenceChanged(
const Incidence::Ptr &incidence );
1321 virtual void calendarIncidenceDeleted(
const Incidence::Ptr &incidence );
1327 virtual void calendarIncidenceAdditionCanceled(
const Incidence::Ptr &incidence );
1350 using QObject::event;
1358 void incidenceUpdated(
const QString &uid,
const KDateTime &recurrenceId );
1365 virtual void doSetTimeSpec(
const KDateTime::Spec &timeSpec );
1389 void notifyIncidenceAdditionCanceled(
const Incidence::Ptr &incidence );
1395 virtual void customPropertyUpdated();
1403 void setObserversEnabled(
bool enabled );
1415 const KDateTime &from,
const KDateTime &to )
const;
1427 const KDateTime &from,
const KDateTime &to )
const;
1433 virtual void virtual_hook(
int id,
void *data );
JournalSortField
Calendar Journal sort keys.
QVector< Ptr > List
List of journals.
Sort Todos chronologically, by start date.
This file is part of the API for handling calendar data and defines the CustomProperties class...
QSharedPointer< Event > Ptr
A shared pointer to an Event object.
Sort Journals chronologically by date.
QVector< Ptr > List
List of alarms.
EventSortField
Calendar Event sort keys.
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
QVector< Ptr > List
List of events.
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.
QVector< Ptr > List
List of to-dos.
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
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...
QVector< Ptr > List
List of incidences.
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)
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Sort Todos alphabetically, by summary.
QSharedPointer< Journal > Ptr
A shared pointer to a Journal object.
Provides a filter for calendars.
Sort Todos by percentage completed.
Sort Events chronologically, by start date.
Sort Todos chronologically, by creation date.