#include <resourcelocal.h>
Public Member Functions | |
ResourceLocal (const TDEConfig *) | |
ResourceLocal (const TQString &fileName) | |
virtual void | writeConfig (TDEConfig *config) |
TDEABC::Lock * | lock () |
TQString | fileName () const |
bool | setFileName (const TQString &fileName) |
bool | setValue (const TQString &key, const TQString &value) |
void | dump () const |
Public Member Functions inherited from KCal::ResourceCached | |
ResourceCached (const TDEConfig *) | |
void | readConfig (const TDEConfig *config) |
void | setReloadPolicy (int policy) |
int | reloadPolicy () const |
void | setReloadInterval (int minutes) |
int | reloadInterval () const |
void | setSavePolicy (int policy) |
int | savePolicy () const |
void | setSaveInterval (int minutes) |
int | saveInterval () const |
TQDateTime | lastLoad () const |
TQDateTime | lastSave () const |
TDE_DEPRECATED bool | addEvent (Event *event) |
bool | addEvent (Event *event, const TQString &subresource) |
bool | deleteEvent (Event *) |
Event * | event (const TQString &UniqueStr) |
Event::List | events () |
Event::List | rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEventsForDate (const TQDate &date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEventsForDate (const TQDateTime &qdt) |
Event::List | rawEvents (const TQDate &start, const TQDate &end, bool inclusive=false) |
TDE_DEPRECATED bool | addTodo (Todo *todo) |
bool | addTodo (Todo *todo, const TQString &subresource) |
bool | deleteTodo (Todo *) |
Todo * | todo (const TQString &uid) |
Todo::List | rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Todo::List | rawTodosForDate (const TQDate &date) |
TDE_DEPRECATED bool | addJournal (Journal *journal) |
bool | addJournal (Journal *journal, const TQString &subresource) |
bool | deleteJournal (Journal *) |
Journal * | journal (const TQString &uid) |
Journal::List | rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Journal::List | rawJournalsForDate (const TQDate &date) |
Alarm::List | alarms (const TQDateTime &from, const TQDateTime &to) |
Alarm::List | alarmsTo (const TQDateTime &to) |
void | setTimeZoneId (const TQString &timeZoneId) |
TQString | timeZoneId () const |
const Person & | getOwner () const |
void | setOwner (const Person &owner) |
void | enableChangeNotification () |
void | disableChangeNotification () |
void | clearChange (Incidence *) |
void | clearChange (const TQString &uid) |
void | clearChanges () |
bool | hasChanges () const |
Incidence::List | allChanges () const |
Incidence::List | addedIncidences () const |
Incidence::List | changedIncidences () const |
Incidence::List | deletedIncidences () const |
void | loadCache () |
void | saveCache () |
void | clearCache () |
void | clearEventsCache () |
void | clearTodosCache () |
void | clearJournalsCache () |
void | cleanUpEventCache (const KCal::Event::List &eventList) |
void | cleanUpTodoCache (const KCal::Todo::List &todoList) |
KPIM::IdMapper & | idMapper () |
Public Member Functions inherited from KCal::ResourceCalendar | |
ResourceCalendar (const TDEConfig *) | |
void | clearException () |
void | setException (ErrorFormat *error) |
ErrorFormat * | exception () |
void | setResolveConflict (bool b) |
virtual TQString | infoText () const |
bool | load () |
bool | save (Incidence *incidence=0) |
virtual bool | isSaving () |
virtual TDE_DEPRECATED bool | addIncidence (Incidence *) |
virtual bool | addIncidence (Incidence *, const TQString &subresource) |
virtual bool | deleteIncidence (Incidence *) |
Incidence * | incidence (const TQString &uid) |
Incidence::List | rawIncidences () |
virtual TQStringList | subresources () const |
virtual bool | canHaveSubresources () const |
virtual bool | subresourceActive (const TQString &) const |
virtual bool | subresourceWritable (const TQString &) const |
virtual const TQString | labelForSubresource (const TQString &resource) const |
virtual TQString | subresourceIdentifier (Incidence *incidence) |
virtual bool | removeSubresource (const TQString &resource) |
virtual bool | addSubresource (const TQString &resource, const TQString &parent) |
virtual TQString | subresourceType (const TQString &resource) |
virtual void | beginAddingIncidences () |
virtual void | endAddingIncidences () |
Public Member Functions inherited from KCal::Calendar::Observer | |
virtual void | calendarModified (bool, Calendar *) |
Protected Slots | |
void | reload () |
Protected Slots inherited from KCal::ResourceCached | |
void | slotReload () |
void | slotSave () |
void | setIdMapperIdentifier () |
Protected Member Functions | |
virtual bool | doLoad () |
virtual bool | doSave () |
virtual bool | doReload () |
TQDateTime | readLastModified () |
Protected Member Functions inherited from KCal::ResourceCached | |
void | calendarIncidenceAdded (KCal::Incidence *incidence) |
void | calendarIncidenceChanged (KCal::Incidence *incidence) |
void | calendarIncidenceDeleted (KCal::Incidence *incidence) |
virtual void | doClose () |
virtual bool | doOpen () |
bool | checkForReload () |
bool | checkForSave () |
void | checkForAutomaticSave () |
void | addInfoText (TQString &) const |
void | setupSaveTimer () |
void | setupReloadTimer () |
virtual TQString | cacheFile () const |
virtual TQString | changesCacheFile (const TQString &) const |
void | loadChangesCache (TQMap< Incidence *, bool > &, const TQString &) |
void | loadChangesCache () |
void | saveChangesCache (const TQMap< Incidence *, bool > &, const TQString &) |
void | saveChangesCache () |
Protected Member Functions inherited from KCal::ResourceCalendar | |
virtual bool | doSave (Incidence *) |
void | loadError (const TQString &errorMessage=TQString()) |
void | saveError (const TQString &errorMessage=TQString()) |
Friends | |
class | ResourceLocalConfig |
Additional Inherited Members | |
Public Types inherited from KCal::ResourceCached | |
enum | { ReloadNever , ReloadOnStartup , ReloadInterval } |
enum | { SaveNever , SaveOnExit , SaveInterval , SaveDelayed , SaveAlways } |
Public Slots inherited from KCal::ResourceCalendar | |
virtual void | setSubresourceActive (const TQString &, bool active) |
Signals inherited from KCal::ResourceCalendar | |
void | resourceChanged (ResourceCalendar *) |
void | resourceLoaded (ResourceCalendar *) |
void | resourceSaved (ResourceCalendar *) |
void | resourceLoadError (ResourceCalendar *, const TQString &error) |
void | resourceSaveError (ResourceCalendar *, const TQString &error) |
void | signalSubresourceAdded (ResourceCalendar *, const TQString &type, const TQString &subresource, const TQString &label) |
void | signalSubresourceRemoved (ResourceCalendar *, const TQString &, const TQString &) |
Static Public Member Functions inherited from KCal::ResourceCached | |
static bool | editorWindowOpen () |
static void | setEditorWindowOpen (bool open) |
Protected Attributes inherited from KCal::ResourceCached | |
CalendarLocal | mCalendar |
Protected Attributes inherited from KCal::ResourceCalendar | |
bool | mResolveConflict |
Detailed Description
This class provides a calendar resource stored as a local file.
Definition at line 45 of file resourcelocal.h.
Constructor & Destructor Documentation
◆ ResourceLocal() [1/2]
ResourceLocal::ResourceLocal | ( | const TDEConfig * | config | ) |
Create resource from configuration information stored in a TDEConfig object.
Definition at line 59 of file resourcelocal.cpp.
◆ ResourceLocal() [2/2]
ResourceLocal::ResourceLocal | ( | const TQString & | fileName | ) |
Create resource for file named fileName.
Definition at line 81 of file resourcelocal.cpp.
Member Function Documentation
◆ doLoad()
|
protectedvirtual |
Do the actual loading of the resource data.
Called by load().
Implements KCal::ResourceCalendar.
Definition at line 145 of file resourcelocal.cpp.
◆ doReload()
|
protectedvirtual |
Called by reload() to reload the resource, if it is already open.
- Returns
- true if successful, else false. If true is returned, reload() will emit a resourceChanged() signal.
Definition at line 174 of file resourcelocal.cpp.
◆ doSave()
|
protectedvirtual |
Do the actual saving of the resource data.
Called by save().
Implements KCal::ResourceCalendar.
Definition at line 161 of file resourcelocal.cpp.
◆ lock()
|
virtual |
Return object for locking the resource.
Implements KCal::ResourceCalendar.
Definition at line 169 of file resourcelocal.cpp.
◆ setValue()
|
virtual |
Sets a particular value of the resource's configuration.
The possible keys are resource specific.
This method is provided to make it possible to set resource-type specific settings without actually linking to the resource's library. Its use is discouraged, but in some situations the only possibility to avoid unwanted compiling and linking dependencies. E.g. if you don't want to link to the remote resource, but need to create a remote resource at the URL given in yourURL, you can use code like the following: KCal::ResourceCalendar *res = manager->createResource( "remote" ); if ( res ) { res->setTimeZoneId( timezone ); res->setResourceName( i18n("Test resource") ); res->setValue( "DownloadURL", yourURL ); manager->add( res ); }
Reimplemented from KCal::ResourceCalendar.
Definition at line 222 of file resourcelocal.cpp.
The documentation for this class was generated from the following files: