From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch * Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkcal/calendar.h | 87 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 7 deletions(-) (limited to 'libkcal/calendar.h') diff --git a/libkcal/calendar.h b/libkcal/calendar.h index a53ef5a0..005b513e 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -31,13 +31,7 @@ #ifndef KCAL_CALENDAR_H #define KCAL_CALENDAR_H -#include -#include -#include -#include -#include -#include - +#include "exceptions.h" #include "customproperties.h" #include "event.h" #include "todo.h" @@ -45,6 +39,14 @@ #include "kcalversion.h" #include "person.h" +#include + +#include +#include +#include +#include +#include + /** @namespace KCal Namespace KCal is for global classes, objects and/or functions in libkcal. @@ -206,6 +208,17 @@ class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties, */ TQString productId(); + /** + Clears the exception status. + */ + void clearException(); + + /** + Returns an exception, if there is any, containing information about the + last error that occurred. + */ + ErrorFormat *exception() const; + /** Set the owner of the Calendar. @@ -472,6 +485,22 @@ class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties, static Event::List sortEvents( Event::List *eventList, EventSortField sortField, SortDirection sortDirection ); + + /** + Sort a list of Events that occur on a specified date. + + @param eventList is a pointer to a list of Events occurring on @p date. + @param date is the date. + @param sortField specifies the EventSortField. + @param sortDirection specifies the SortDirection. + + @return a list of Events sorted as specified. + */ + static Event::List sortEventsForDate( Event::List *eventList, + const TQDate &date, + EventSortField sortField, + SortDirection sortDirection ); + /** Return a sorted, filtered list of all Events for this Calendar. @@ -755,6 +784,30 @@ class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties, */ virtual Journal *journal( const TQString &uid ) = 0; + /** + Emits the beginBatchAdding() signal. + + This should be called before adding a batch of incidences with + addIncidence( Incidence *), addTodo( Todo *), addEvent( Event *) + or addJournal( Journal *). Some Calendars are connected to this + signal, e.g: CalendarResources uses it to know a series of + incidenceAdds are related so the user isn't prompted multiple + times which resource to save the incidence to + + @since 4.4 + */ + void beginBatchAdding(); + + /** + Emits the endBatchAdding() signal. + + Used with beginBatchAdding(). Should be called after + adding all incidences. + + @since 4.4 + */ + void endBatchAdding(); + // Relations Specific Methods // /** @@ -879,7 +932,25 @@ class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties, */ void calendarLoaded(); + /** + @see beginBatchAdding() + @since 4.4 + */ + void batchAddingBegins(); + + /** + @see endBatchAdding() + @since 4.4 + */ + void batchAddingEnds(); + protected: + /** + Sets information about the last error occurred. + The previous exception is freed. + */ + void setException( ErrorFormat *e ); + /** The Observer interface. So far not implemented. @@ -941,6 +1012,7 @@ class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties, // returning static Alarm::List private: + /** Intialize a Calendar object with starting values. */ @@ -964,6 +1036,7 @@ class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties, TQDict mOrphans; TQDict mOrphanUids; + ErrorFormat *mException; class Private; Private *d; }; -- cgit v1.2.3