#include <resourcelocal.h>

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

List of all members.

Public Member Functions

 ResourceLocal (const KConfig *)
 ResourceLocal (const TQString &fileName)
virtual void writeConfig (KConfig *config)
KABC::Lock * lock ()
TQString fileName () const
bool setFileName (const TQString &fileName)
bool setValue (const TQString &key, const TQString &value)
void dump () const

Protected Slots

void reload ()

Protected Member Functions

virtual bool doLoad ()
virtual bool doSave ()
virtual bool doReload ()
TQDateTime readLastModified ()

Friends

class ResourceLocalConfig

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::ResourceLocal ( const KConfig *  config)

Create resource from configuration information stored in a KConfig object.

Definition at line 59 of file resourcelocal.cpp.

ResourceLocal::ResourceLocal ( const TQString &  fileName)

Create resource for file named fileName.

Definition at line 81 of file resourcelocal.cpp.


Member Function Documentation

bool ResourceLocal::doLoad ( ) [protected, virtual]

Do the actual loading of the resource data.

Called by load().

Implements KCal::ResourceCalendar.

Definition at line 145 of file resourcelocal.cpp.

bool ResourceLocal::doReload ( ) [protected, virtual]

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.

bool ResourceLocal::doSave ( ) [protected, virtual]

Do the actual saving of the resource data.

Called by save().

Implements KCal::ResourceCalendar.

Definition at line 161 of file resourcelocal.cpp.

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

Return object for locking the resource.

Implements KCal::ResourceCalendar.

Definition at line 169 of file resourcelocal.cpp.

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.


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