libkcal Library API Documentation

KCal::ResourceLocal Class Reference

This class provides a calendar resource stored as a local file. More...

#include <resourcelocal.h>

Inheritance diagram for KCal::ResourceLocal:

KCal::ResourceCached KCal::ResourceCalendar List of all members.

Public Methods

 ResourceLocal (const KConfig *)
 ResourceLocal (const QString &fileName)
virtual ~ResourceLocal ()
virtual void writeConfig (KConfig *config)
bool load ()
bool save ()
KABC::Lock * lock ()
void dump () const

Protected Slots

void reload ()

Protected Methods

bool doOpen ()
void doClose ()
virtual void update (IncidenceBase *incidence)
QDateTime readLastModified ()

Detailed Description

This class provides a calendar resource stored as a local file.

Definition at line 43 of file resourcelocal.h.


Constructor & Destructor Documentation

ResourceLocal::ResourceLocal const KConfig *   
 

Create resource from configuration information stored in a KConfig object.

Definition at line 58 of file resourcelocal.cpp.

ResourceLocal::ResourceLocal const QString   fileName
 

Create resource for file named fileName.

Definition at line 80 of file resourcelocal.cpp.


Member Function Documentation

bool ResourceLocal::load   [virtual]
 

Load resource data.

After calling this function all data is accessible by calling the incidence/event/todo/etc. accessor functions.

If data is actually loaded within this function or the loading is delayed until it is accessed by another function depends on the implementation of the resource.

If loading the data takes significant time, the resource should return cached values, if available and return the results via the resourceChanged signal. When the resource has finished loading the resourceLoaded() signal is emitted.

Calling this function multiple times should have the same effect as calling it once, given that the data isn't changed between calls.

Implements KCal::ResourceCalendar.

Definition at line 151 of file resourcelocal.cpp.

References KCal::CalendarLocal::load().

bool ResourceLocal::save   [virtual]
 

Save resource data.

After calling this function it is save to close the resource without losing data.

If data is actually saved within this function or saving is delayed depends on the implementation of the resource.

If saving the data takes significant time, the resource should return from the function, do the saving in the background and notify the end of the save by emitting the signal resourceSaved().

Implements KCal::ResourceCalendar.

Definition at line 162 of file resourcelocal.cpp.

References KCal::CalendarLocal::save().

KABC::Lock * ResourceLocal::lock   [virtual]
 

Return object for locking the resource.

Implements KCal::ResourceCalendar.

Definition at line 173 of file resourcelocal.cpp.

void ResourceLocal::doClose   [protected]
 

clears out the current calendar, freeing all used memory etc.

etc.

Definition at line 196 of file resourcelocal.cpp.

References KCal::CalendarLocal::close().

void ResourceLocal::update IncidenceBase   incidence [protected, virtual]
 

This method should be called whenever a Event is modified directly via it's pointer.

It makes sure that the calendar is internally consistent.

Implements KCal::ResourceCalendar.

Definition at line 205 of file resourcelocal.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkcal Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:25 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003