21 #ifndef KCAL_RESOURCECACHED_H
22 #define KCAL_RESOURCECACHED_H
24 #include "resourcecalendar.h"
26 #include "libemailfunctions/idmapper.h"
27 #include "incidence.h"
28 #include "calendarlocal.h"
30 #include <tdeconfig.h>
32 #include <tqptrlist.h>
34 #include <tqdatetime.h>
37 #include <tdemacros.h>
56 enum { ReloadNever, ReloadOnStartup, ReloadInterval };
62 enum { SaveNever, SaveOnExit, SaveInterval, SaveDelayed, SaveAlways };
67 void readConfig(
const TDEConfig *config );
68 void writeConfig( TDEConfig *config );
70 static bool editorWindowOpen();
71 static void setEditorWindowOpen(
bool open);
80 void setReloadPolicy(
int policy );
86 int reloadPolicy()
const;
92 void setReloadInterval(
int minutes );
97 int reloadInterval()
const;
108 void setSavePolicy(
int policy );
114 int savePolicy()
const;
120 void setSaveInterval(
int minutes );
125 int saveInterval()
const;
140 TDE_DEPRECATED
bool addEvent(
Event *event );
141 bool addEvent(
Event *event,
const TQString &subresource );
146 bool deleteEvent(
Event *);
151 Event *event(
const TQString &UniqueStr);
169 Event::List rawEventsForDate(
const TQDateTime &qdt );
174 Event::List rawEvents(
const TQDate &start,
const TQDate &end,
175 bool inclusive =
false );
180 TDE_DEPRECATED
bool addTodo(
Todo *todo );
181 bool addTodo(
Todo *todo,
const TQString &subresource );
186 bool deleteTodo(
Todo * );
191 Todo *todo(
const TQString &uid );
199 Todo::List rawTodosForDate(
const TQDate &date );
203 TDE_DEPRECATED
bool addJournal(
Journal *journal );
204 bool addJournal(
Journal *journal,
const TQString &subresource );
209 bool deleteJournal(
Journal * );
213 Journal *journal(
const TQString &uid );
226 Alarm::List alarms(
const TQDateTime &from,
const TQDateTime &to );
236 void setTimeZoneId(
const TQString &timeZoneId );
238 TQString timeZoneId()
const;
243 const Person &getOwner()
const;
247 void setOwner(
const Person &owner );
249 void enableChangeNotification();
250 void disableChangeNotification();
253 void clearChange(
const TQString &uid );
257 bool hasChanges()
const;
283 void clearEventsCache();
288 void clearTodosCache();
293 void clearJournalsCache();
301 KPIM::IdMapper& idMapper();
315 virtual void doClose();
320 virtual bool doOpen();
324 bool checkForReload();
330 void checkForAutomaticSave();
332 void addInfoText( TQString & )
const;
334 void setupSaveTimer();
335 void setupReloadTimer();
341 virtual TQString cacheFile()
const;
346 virtual TQString changesCacheFile(
const TQString& )
const;
347 void loadChangesCache( TQMap<Incidence*, bool>&,
const TQString& );
348 void loadChangesCache();
349 void saveChangesCache(
const TQMap<Incidence*, bool>&,
const TQString& );
350 void saveChangesCache();
356 void setIdMapperIdentifier();
361 TQTimer mReloadTimer;
368 TQDateTime mLastLoad;
369 TQDateTime mLastSave;
371 TQMap<KCal::Incidence *,bool> mAddedIncidences;
372 TQMap<KCal::Incidence *,bool> mChangedIncidences;
373 TQMap<KCal::Incidence *,bool> mDeletedIncidences;
375 KPIM::IdMapper mIdMapper;
This class provides a calendar stored as a local file.
This class provides an Event in the sense of RFC2445.
This class provides the base class common to all calendar components.
This class provides a Journal in the sense of RFC2445.
This class represents a person.
This class provides a calendar resource using a local CalendarLocal object to cache the calendar data...
TQDateTime lastLoad() const
Return time of last load.
Event::List events()
Return filtered list of all events in calendar.
TQDateTime lastSave() const
Return time of last save.
This class provides the interfaces for a calendar resource.
This class provides a Todo in the sense of RFC2445.
Namespace KCal is for global classes, objects and/or functions in libkcal.
TodoSortField
How Todos are to be sorted.
@ TodoSortUnsorted
Todos are to be unsorted.
JournalSortField
How Journals are to be sorted.
@ JournalSortUnsorted
Journals are to be unsorted.
EventSortField
How Events are to be sorted.
@ EventSortUnsorted
Events are to be unsorted.
SortDirection
Sort direction.
@ SortDirectionAscending
Sort in ascending order (first to last)