summaryrefslogtreecommitdiffstats
path: root/libkcal/calendar.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /libkcal/calendar.h
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* 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
Diffstat (limited to 'libkcal/calendar.h')
-rw-r--r--libkcal/calendar.h87
1 files changed, 80 insertions, 7 deletions
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 <tqobject.h>
-#include <tqstring.h>
-#include <tqdatetime.h>
-#include <tqptrlist.h>
-#include <tqdict.h>
-#include <kdepimmacros.h>
-
+#include "exceptions.h"
#include "customproperties.h"
#include "event.h"
#include "todo.h"
@@ -45,6 +39,14 @@
#include "kcalversion.h"
#include "person.h"
+#include <kdepimmacros.h>
+
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+
/**
@namespace KCal
Namespace KCal is for global classes, objects and/or functions in libkcal.
@@ -207,6 +209,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.
@param owner is a Person object.
@@ -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,8 +932,26 @@ 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.
@param incidenceBase is a pointer an IncidenceBase object.
@@ -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<Incidence> mOrphans;
TQDict<Incidence> mOrphanUids;
+ ErrorFormat *mException;
class Private;
Private *d;
};