#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 |
![]() | |
ResourceCached (const TDEConfig *) | |
void | readConfig (const TDEConfig *config) |
void | writeConfig (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 () |
![]() | |
ResourceCalendar (const TDEConfig *) | |
void | clearException () |
void | setException (ErrorFormat *error) |
ErrorFormat * | exception () |
void | setResolveConflict (bool b) |
virtual void | writeConfig (TDEConfig *config) |
virtual TQString | infoText () const |
bool | load () |
bool | save (Incidence *incidence=0) |
virtual bool | isSaving () |
virtual TDEABC::Lock * | lock ()=0 |
virtual TDE_DEPRECATED bool | addIncidence (Incidence *) |
virtual bool | addIncidence (Incidence *, const TQString &subresource) |
virtual bool | deleteIncidence (Incidence *) |
Incidence * | incidence (const TQString &uid) |
virtual TDE_DEPRECATED bool | addEvent (Event *event)=0 |
virtual bool | addEvent (Event *event, const TQString &subresource)=0 |
virtual bool | deleteEvent (Event *)=0 |
virtual Event * | event (const TQString &uid)=0 |
virtual Event::List | rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0 |
virtual Event::List | rawEventsForDate (const TQDate &date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0 |
virtual Event::List | rawEventsForDate (const TQDateTime &qdt)=0 |
virtual Event::List | rawEvents (const TQDate &start, const TQDate &end, bool inclusive=false)=0 |
virtual bool | setValue (const TQString &key, const TQString &value) |
virtual TDE_DEPRECATED bool | addTodo (Todo *todo)=0 |
virtual bool | addTodo (Todo *todo, const TQString &subresource)=0 |
virtual bool | deleteTodo (Todo *)=0 |
virtual Todo * | todo (const TQString &uid)=0 |
virtual Todo::List | rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0 |
virtual Todo::List | rawTodosForDate (const TQDate &date)=0 |
virtual TDE_DEPRECATED bool | addJournal (Journal *)=0 |
virtual bool | addJournal (Journal *journal, const TQString &subresource)=0 |
virtual bool | deleteJournal (Journal *)=0 |
virtual Journal * | journal (const TQString &uid)=0 |
virtual Journal::List | rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0 |
virtual Journal::List | rawJournalsForDate (const TQDate &date)=0 |
virtual Alarm::List | alarms (const TQDateTime &from, const TQDateTime &to)=0 |
virtual Alarm::List | alarmsTo (const TQDateTime &to)=0 |
Incidence::List | rawIncidences () |
virtual void | setTimeZoneId (const TQString &timeZoneId)=0 |
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 () |
![]() | |
virtual void | calendarModified (bool, Calendar *) |
virtual void | calendarIncidenceAdded (Incidence *) |
virtual void | calendarIncidenceChanged (Incidence *) |
virtual void | calendarIncidenceDeleted (Incidence *) |
Protected Slots | |
void | reload () |
![]() | |
void | slotReload () |
void | slotSave () |
void | setIdMapperIdentifier () |
Protected Member Functions | |
virtual bool | doLoad () |
virtual bool | doSave () |
virtual bool | doReload () |
TQDateTime | readLastModified () |
![]() | |
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 () |
![]() | |
virtual bool | doLoad ()=0 |
virtual bool | doSave ()=0 |
virtual bool | doSave (Incidence *) |
virtual void | addInfoText (TQString &) const |
void | loadError (const TQString &errorMessage=TQString()) |
void | saveError (const TQString &errorMessage=TQString()) |
Friends | |
class | ResourceLocalConfig |
Additional Inherited Members | |
![]() | |
enum | { ReloadNever , ReloadOnStartup , ReloadInterval } |
enum | { SaveNever , SaveOnExit , SaveInterval , SaveDelayed , SaveAlways } |
![]() | |
virtual void | setSubresourceActive (const TQString &, bool active) |
![]() | |
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 bool | editorWindowOpen () |
static void | setEditorWindowOpen (bool open) |
![]() | |
CalendarLocal | mCalendar |
![]() | |
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.
◆ ~ResourceLocal()
|
virtual |
Definition at line 128 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.
◆ dump()
void ResourceLocal::dump | ( | ) | const |
Definition at line 197 of file resourcelocal.cpp.
◆ fileName()
TQString ResourceLocal::fileName | ( | ) | const |
Definition at line 203 of file resourcelocal.cpp.
◆ lock()
|
virtual |
Return object for locking the resource.
Implements KCal::ResourceCalendar.
Definition at line 169 of file resourcelocal.cpp.
◆ readLastModified()
|
protected |
Definition at line 139 of file resourcelocal.cpp.
◆ reload
|
protectedslot |
Definition at line 191 of file resourcelocal.cpp.
◆ setFileName()
bool ResourceLocal::setFileName | ( | const TQString & | fileName | ) |
Definition at line 208 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.
◆ writeConfig()
|
virtual |
Reimplemented from KCal::ResourceCached.
Definition at line 90 of file resourcelocal.cpp.
Friends And Related Function Documentation
◆ ResourceLocalConfig
|
friend |
Definition at line 50 of file resourcelocal.h.
The documentation for this class was generated from the following files: