libkcal

KCal::ResourceLocal Class Reference

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

#include <resourcelocal.h>

Inheritance diagram for KCal::ResourceLocal:

List of all members.


Public Member Functions

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

Protected Slots

void reload ()

Protected Member Functions

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

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 QString fileName  ) 

Create resource for file named fileName.

Definition at line 81 of file resourcelocal.cpp.

ResourceLocal::~ResourceLocal (  )  [virtual]

Definition at line 128 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.

void ResourceLocal::dump (  )  const

Definition at line 197 of file resourcelocal.cpp.

QString ResourceLocal::fileName (  )  const

Definition at line 203 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.

QDateTime ResourceLocal::readLastModified (  )  [protected]

Definition at line 139 of file resourcelocal.cpp.

void ResourceLocal::reload (  )  [protected, slot]

Definition at line 191 of file resourcelocal.cpp.

bool ResourceLocal::setFileName ( const QString fileName  ) 

Definition at line 208 of file resourcelocal.cpp.

bool ResourceLocal::setValue ( const QString key,
const QString 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.

void ResourceLocal::writeConfig ( KConfig *  config  )  [virtual]

Reimplemented from KCal::ResourceCached.

Definition at line 90 of file resourcelocal.cpp.


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