25 #ifndef KCAL_RESOURCECALENDAR_H
26 #define KCAL_RESOURCECALENDAR_H
35 #include "kresources/resource.h"
36 #include "kresources/manager.h"
37 #include "kabc/lock.h"
39 #include <kdatetime.h>
42 #include <QtCore/QString>
58 bool isResolveConflictSet()
const;
59 void setResolveConflict(
bool b );
61 virtual void writeConfig( KConfigGroup &group );
67 virtual QString infoText()
const;
118 bool save( QString &err,
Incidence *incidence = 0 );
124 virtual bool isSaving();
133 void setInhibitSave(
bool inhibit );
138 bool saveInhibited()
const;
143 virtual KABC::Lock *lock() = 0;
148 virtual bool addIncidence(
Incidence * );
153 virtual bool deleteIncidence(
Incidence * );
161 Incidence *incidence(
const QString &uid );
166 virtual bool addEvent(
Event *event ) = 0;
171 virtual bool deleteEvent(
Event * ) = 0;
176 virtual void deleteAllEvents() = 0;
181 virtual Event *event(
const QString &uid ) = 0;
191 EventSortField sortField = EventSortUnsorted,
192 SortDirection sortDirection = SortDirectionAscending ) = 0;
205 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
206 EventSortField sortField = EventSortUnsorted,
207 SortDirection sortDirection = SortDirectionAscending ) = 0;
212 virtual Event::List rawEventsForDate(
const KDateTime &dt ) = 0;
225 const QDate &start,
const QDate &end,
226 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
227 bool inclusive =
false ) = 0;
251 virtual bool setValue(
const QString &key,
const QString &value );
288 const QString &subresource,
const QString &label );
300 virtual bool addTodo(
Todo *todo ) = 0;
305 virtual bool deleteTodo(
Todo * ) = 0;
310 virtual void deleteAllTodos() = 0;
318 virtual Todo *todo(
const QString &uid ) = 0;
324 TodoSortField sortField = TodoSortUnsorted,
325 SortDirection sortDirection = SortDirectionAscending ) = 0;
330 virtual Todo::List rawTodosForDate(
const QDate &date ) = 0;
335 virtual bool addJournal(
Journal * ) = 0;
340 virtual bool deleteJournal(
Journal * ) = 0;
345 virtual void deleteAllJournals() = 0;
350 virtual Journal *journal(
const QString &uid ) = 0;
356 JournalSortField sortField = JournalSortUnsorted,
357 SortDirection sortDirection = SortDirectionAscending ) = 0;
362 virtual Journal::List rawJournalsForDate(
const QDate &date ) = 0;
368 const KDateTime &to ) = 0;
373 virtual Alarm::List alarmsTo(
const KDateTime &to ) = 0;
384 virtual void setTimeSpec(
const KDateTime::Spec &timeSpec ) = 0;
391 virtual KDateTime::Spec timeSpec()
const = 0;
402 virtual void setTimeZoneId(
const QString &timeZoneId ) = 0;
411 virtual QString timeZoneId()
const = 0;
427 virtual void shiftTimes(
const KDateTime::Spec &oldSpec,
428 const KDateTime::Spec &newSpec ) = 0;
435 virtual QStringList subresources()
const;
440 virtual bool canHaveSubresources()
const;
445 virtual bool subresourceActive(
const QString &resource )
const;
450 virtual QString labelForSubresource(
const QString &resource )
const;
460 virtual QString subresourceIdentifier(
Incidence *incidence );
466 virtual void setSubresourceActive(
const QString &resource,
bool active );
471 virtual bool removeSubresource(
const QString &resource );
477 virtual bool addSubresource(
const QString &resource,
const QString &parent );
483 virtual QString subresourceType(
const QString &resource );
489 virtual bool doLoad(
bool syncCache ) = 0;
494 virtual bool doSave(
bool syncCache ) = 0;
501 virtual bool doSave(
bool syncCache,
Incidence * );
511 void loadError(
const QString &errorMessage = QString() );
516 void saveError(
const QString &errorMessage = QString() );
518 bool receivedLoadError()
const;
519 void setReceivedLoadError(
bool b );
520 bool receivedSaveError()
const;
521 void setReceivedSaveError(
bool b );
529 void setNoReadOnlyOnLoad(
bool noReadOnly );
535 bool noReadOnlyOnLoad()
const;
537 using QObject::event;
Provides a To-do in the sense of RFC2445.
This class provides an Event in the sense of RFC2445.
This class provides the interfaces for a calendar resource.
virtual void addInfoText(QString &) const
Add info text for concrete resources.
This file is part of the API for handling calendar data and defines the Todo class.
This file is part of the API for handling calendar data and defines the Calendar class.
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
This class provides a template for lists of pointers.
This file is part of the API for handling calendar data and defines the Exception and ErrorFormat cla...
Provides a Journal in the sense of RFC2445.
This file is part of the API for handling calendar data and defines the Journal class.
This file is part of the API for handling calendar data and defines the Alarm class.
This file is part of the API for handling calendar data and defines the Event class.