25 #ifndef KCAL_RESOURCECALENDAR_H 26 #define KCAL_RESOURCECALENDAR_H 29 #include <tqdatetime.h> 30 #include <tqptrlist.h> 32 #include <tdeconfig.h> 39 #include "exceptions.h" 41 #include <tderesources/resource.h> 42 #include <tderesources/manager.h> 43 #include <tdeabc/lock.h> 44 #include <tdepimmacros.h> 68 void clearException();
82 void setResolveConflict(
bool b);
84 virtual void writeConfig( TDEConfig* config );
90 virtual TQString infoText()
const;
141 virtual TDEABC::Lock *lock() = 0;
147 virtual KDE_DEPRECATED
bool addIncidence(
Incidence * );
152 virtual bool addIncidence(
Incidence *,
const TQString &subresource );
157 virtual bool deleteIncidence(
Incidence * );
163 Incidence *incidence(
const TQString &uid );
169 virtual KDE_DEPRECATED
bool addEvent(
Event *event ) = 0;
170 virtual bool addEvent(
Event *event,
const TQString &subresource ) = 0;
175 virtual bool deleteEvent(
Event * ) = 0;
180 virtual Event *event(
const TQString &uid ) = 0;
197 virtual Event::List rawEventsForDate(
const TQDateTime &qdt ) = 0;
203 virtual Event::List rawEvents(
const TQDate &start,
const TQDate &end,
204 bool inclusive =
false ) = 0;
225 virtual bool setValue(
const TQString &key,
const TQString &value );
260 const TQString& subresource,
const TQString& label );
273 virtual KDE_DEPRECATED
bool addTodo(
Todo *todo ) = 0;
274 virtual bool addTodo(
Todo *todo,
const TQString &subresource ) = 0;
279 virtual bool deleteTodo(
Todo * ) = 0;
285 virtual Todo *todo(
const TQString &uid ) = 0;
293 virtual Todo::List rawTodosForDate(
const TQDate &date ) = 0;
300 virtual KDE_DEPRECATED
bool addJournal(
Journal * ) = 0;
301 virtual bool addJournal(
Journal *journal,
const TQString &subresource ) = 0;
306 virtual bool deleteJournal(
Journal * ) = 0;
311 virtual Journal *journal(
const TQString &uid ) = 0;
319 virtual Journal::List rawJournalsForDate(
const TQDate &date ) = 0;
324 virtual Alarm::List alarms(
const TQDateTime &from,
325 const TQDateTime &to ) = 0;
330 virtual Alarm::List alarmsTo(
const TQDateTime &to ) = 0;
339 virtual void setTimeZoneId(
const TQString &timeZoneId ) = 0;
361 virtual bool subresourceWritable(
const TQString& )
const;
379 { Q_UNUSED( incidence );
return TQString(); }
386 virtual bool removeSubresource(
const TQString& resource );
392 virtual bool addSubresource(
const TQString& resource,
const TQString& parent );
398 virtual TQString subresourceType(
const TQString &resource );
404 virtual void beginAddingIncidences();
410 virtual void endAddingIncidences();
416 virtual void setSubresourceActive(
const TQString &,
bool active );
420 bool mResolveConflict;
424 virtual bool doLoad() = 0;
428 virtual bool doSave() = 0;
444 void loadError(
const TQString &errorMessage = TQString() );
448 void saveError(
const TQString &errorMessage = TQString() );
451 bool mReceivedLoadError;
452 bool mReceivedSaveError;
460 typedef KRES::Manager<ResourceCalendar> CalendarResourceManager;
JournalSortField
How Journals are to be sorted.
Journals are to be unsorted.
virtual const TQString labelForSubresource(const TQString &resource) const
What is the label for this subresource?
This class provides a Todo in the sense of RFC2445.
virtual bool canHaveSubresources() const
Is this subresource capable of having subresources or not?
This class provides an Event in the sense of RFC2445.
virtual bool subresourceActive(const TQString &) const
Is this subresource active or not?
This class provides the interfaces for a calendar resource.
Provides the main "calendar" object class.
Sort in ascending order (first to last)
This class provides the base class common to all calendar components.
This class provides a Journal in the sense of RFC2445.
virtual TQString subresourceIdentifier(Incidence *incidence)
Get the identifier of the subresource associated with a specified incidence.
virtual TQStringList subresources() const
If this resource has subresources, return a TQStringList of them.
Todos are to be unsorted.
Events are to be unsorted.
Namespace KCal is for global classes, objects and/or functions in libkcal.
SortDirection
Sort direction.
virtual void addInfoText(TQString &) const
Add info text for concrete resources.
TodoSortField
How Todos are to be sorted.
virtual bool isSaving()
Return true if a save operation is still in progress, otherwise return false.
EventSortField
How Events are to be sorted.