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);
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;
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;
785 Event::List events(
const QDate &start,
const QDate &end,
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;
843 virtual Event::List rawEvents(
const QDate &start,
const QDate &end,
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;
890 virtual Event::Ptr deletedEvent(
const QString &uid,
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;
990 virtual Todo::List todos(
const QDate &date)
const;
1005 virtual Todo::List todos(
const QDate &start,
const QDate &end,
1006 const KDateTime::Spec ×pec = KDateTime::Spec(),
1007 bool inclusive =
false)
const;
1028 virtual Todo::List rawTodosForDate(
const QDate &date)
const = 0;
1043 virtual Todo::List rawTodos(
const QDate &start,
const QDate &end,
1044 const KDateTime::Spec ×pec = KDateTime::Spec(),
1045 bool inclusive =
false)
const = 0;
1056 virtual Todo::Ptr todo(
const QString &uid,
1057 const KDateTime &recurrenceId = KDateTime())
const = 0;
1071 virtual Todo::Ptr deletedTodo(
const QString &uid,
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;
1193 virtual Journal::List rawJournalsForDate(
const QDate &date)
const = 0;
1205 const KDateTime &recurrenceId = KDateTime())
const = 0;
1219 virtual Journal::Ptr deletedJournal(
const QString &uid,
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);
1387 using QObject::event;
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.
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.