KCal Library
resourcelocaldir.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KCAL_RESOURCELOCALDIRDIR_H
00022 #define KCAL_RESOURCELOCALDIRDIR_H
00023
00024 #include "kcal_export.h"
00025 #include "resourcecached.h"
00026
00027 namespace KCal {
00028
00033 class KCAL_EXPORT ResourceLocalDir : public ResourceCached
00034 {
00035 Q_OBJECT
00036 friend class ResourceLocalDirConfig;
00037
00038 public:
00039 ResourceLocalDir();
00040 explicit ResourceLocalDir( const KConfigGroup &group );
00041 explicit ResourceLocalDir( const QString &fileName );
00042 virtual ~ResourceLocalDir();
00043
00044 void readConfig( const KConfigGroup &group );
00045 void writeConfig( KConfigGroup &group );
00046
00047 KABC::Lock *lock();
00048
00050 bool deleteEvent( Event *event );
00051
00053 void deleteAllEvents();
00054
00058 bool deleteTodo( Todo *todo );
00059
00063 void deleteAllTodos();
00064
00068 bool deleteJournal( Journal *journal );
00069
00073 void deleteAllJournals();
00074
00075 void dump() const;
00076
00077 protected Q_SLOTS:
00078 void reload( const QString &file );
00079
00080 protected:
00081 virtual bool doLoad( bool syncCache );
00082 virtual bool doSave( bool syncCache );
00083 bool doSave( bool syncCache, Incidence *incidence );
00084 virtual bool doFileLoad( CalendarLocal &cal, const QString &fileName );
00085
00086 private:
00087
00088 using ResourceCalendar::doLoad;
00089 using ResourceCalendar::doSave;
00090
00091
00092 Q_DISABLE_COPY( ResourceLocalDir )
00093 class Private;
00094 Private *const d;
00095
00096 };
00097
00098 }
00099
00100 #endif