#include <resourcelocal.h>

Inheritance diagram for KCal::ResourceLocal:
KCal::ResourceCached KCal::ResourceCalendar KCal::Calendar::Observer

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 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 *)
 
Eventevent (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 *)
 
Todotodo (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 *)
 
Journaljournal (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 PersongetOwner () 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)
 
ErrorFormatexception ()
 
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 *)
 
Incidenceincidence (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 Eventevent (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 Todotodo (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 Journaljournal (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 ()
 
- Public Member Functions inherited from KCal::Calendar::Observer
virtual void calendarModified (bool, Calendar *)
 
virtual void calendarIncidenceAdded (Incidence *)
 
virtual void calendarIncidenceChanged (Incidence *)
 
virtual void calendarIncidenceDeleted (Incidence *)
 

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 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

- 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.

◆ ~ResourceLocal()

ResourceLocal::~ResourceLocal ( )
virtual

Definition at line 128 of file resourcelocal.cpp.

Member Function Documentation

◆ doLoad()

bool ResourceLocal::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()

bool ResourceLocal::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()

bool ResourceLocal::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()

TDEABC::Lock * ResourceLocal::lock ( )
virtual

Return object for locking the resource.

Implements KCal::ResourceCalendar.

Definition at line 169 of file resourcelocal.cpp.

◆ readLastModified()

TQDateTime ResourceLocal::readLastModified ( )
protected

Definition at line 139 of file resourcelocal.cpp.

◆ reload

void ResourceLocal::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()

bool ResourceLocal::setValue ( const TQString &  key,
const TQString &  value 
)
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()

void ResourceLocal::writeConfig ( TDEConfig *  config)
virtual

Reimplemented from KCal::ResourceCached.

Definition at line 90 of file resourcelocal.cpp.

Friends And Related Function Documentation

◆ ResourceLocalConfig

friend class ResourceLocalConfig
friend

Definition at line 50 of file resourcelocal.h.


The documentation for this class was generated from the following files: