diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
commit | cc29364f06178f8f6b457384f2ec37a042bd9d43 (patch) | |
tree | 7c77a3184c698bbf9d98cef09fb1ba8124daceba /libkcal/resourcecalendar.h | |
parent | 4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff) | |
download | tdepim-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/resourcecalendar.h')
-rw-r--r-- | libkcal/resourcecalendar.h | 60 |
1 files changed, 55 insertions, 5 deletions
diff --git a/libkcal/resourcecalendar.h b/libkcal/resourcecalendar.h index 3fea84a1b..91f3d1aee 100644 --- a/libkcal/resourcecalendar.h +++ b/libkcal/resourcecalendar.h @@ -36,6 +36,7 @@ #include "event.h" #include "journal.h" #include "calendar.h" +#include "exceptions.h" #include <kresources/resource.h> #include <kresources/manager.h> @@ -55,11 +56,28 @@ class CalFormat; */ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource { - Q_OBJECT + Q_OBJECT public: ResourceCalendar( const KConfig * ); virtual ~ResourceCalendar(); + /** + Clears the exception status. + */ + void clearException(); + + /** + Set exception for this object. This is used by the functions of this + class to report errors. + */ + void setException( ErrorFormat *error ); + + /** + Returns an exception, if there is any, containing information about the + last error that occurred. + */ + ErrorFormat *exception(); + void setResolveConflict( bool b); virtual void writeConfig( KConfig* config ); @@ -123,8 +141,14 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource /** Add incidence to resource. + @deprecated use addIncidence(Incidence *,const TQString &) instead. + */ + virtual KDE_DEPRECATED bool addIncidence( Incidence * ); + + /** + Add incidence to resource and subresource. */ - virtual bool addIncidence( Incidence * ); + virtual bool addIncidence( Incidence *, const TQString &subresource ); /** Delete incidence from resource. @@ -139,8 +163,10 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource /** Add event to resource. + @deprecated use addEvent(Event *,const TQString&) instead. */ - virtual bool addEvent( Event *event ) = 0; + virtual KDE_DEPRECATED bool addEvent( Event *event ) = 0; + virtual bool addEvent( Event *event, const TQString &subresource ) = 0; /** Delete event from this resource. @@ -241,8 +267,11 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource public: /** Add a todo to the todolist. + @deprecated use addTodo(Todo *,const TQString &) instead. */ - virtual bool addTodo( Todo *todo ) = 0; + virtual KDE_DEPRECATED bool addTodo( Todo *todo ) = 0; + virtual bool addTodo( Todo *todo, const TQString &subresource ) = 0; + /** Remove a todo from the todolist. */ @@ -265,8 +294,10 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource /** Add a Journal entry to the resource. + @deprecated use addJournal(Journal *,const TQString &) instead. */ - virtual bool addJournal( Journal * ) = 0; + virtual KDE_DEPRECATED bool addJournal( Journal * ) = 0; + virtual bool addJournal( Journal *journal, const TQString &subresource ) = 0; /** Remove a Journal entry from calendar. @@ -324,6 +355,11 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource virtual bool subresourceActive( const TQString& ) const { return true; } /** + Is this subresource writable or not? + */ + virtual bool subresourceWritable( const TQString& ) const; + + /** What is the label for this subresource? */ virtual const TQString labelForSubresource( const TQString& resource ) const @@ -360,6 +396,18 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource */ virtual TQString subresourceType( const TQString &resource ); + /** + * Called when we starting adding a batch of incidences. + * So we don't show the same warnings for each incidence. + */ + virtual void beginAddingIncidences(); + + /** + * Called when we finish adding a batch of incidences. + * @see beginAddingIncidences() + */ + virtual void endAddingIncidences(); + public slots: /** (De-)activate a subresource. @@ -402,6 +450,8 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource bool mReceivedLoadError; bool mReceivedSaveError; + ErrorFormat *mException; + class Private; Private *d; }; |