libkcal
KCal::ResourceLocal Class Reference
#include <resourcelocal.h>
Inheritance diagram for KCal::ResourceLocal:

Detailed Description
This class provides a calendar resource stored as a local file.
Definition at line 45 of file resourcelocal.h.
Public Member Functions | |
ResourceLocal (const KConfig *) | |
ResourceLocal (const QString &fileName) | |
virtual | ~ResourceLocal () |
virtual void | writeConfig (KConfig *config) |
KABC::Lock * | lock () |
QString | fileName () const |
bool | setFileName (const QString &fileName) |
bool | setValue (const QString &key, const QString &value) |
void | dump () const |
Protected Slots | |
void | reload () |
Protected Member Functions | |
virtual bool | doLoad () |
virtual bool | doSave () |
virtual bool | doReload () |
QDateTime | readLastModified () |
Friends | |
class | ResourceLocalConfig |
Constructor & Destructor Documentation
ResourceLocal::ResourceLocal | ( | const KConfig * | ) |
Create resource from configuration information stored in a KConfig object.
Definition at line 59 of file resourcelocal.cpp.
ResourceLocal::ResourceLocal | ( | const QString & | fileName | ) |
Member Function Documentation
KABC::Lock * ResourceLocal::lock | ( | ) | [virtual] |
Return object for locking the resource.
Implements KCal::ResourceCalendar.
Definition at line 167 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 220 of file resourcelocal.cpp.
bool ResourceLocal::doLoad | ( | ) | [protected, virtual] |
Do the actual loading of the resource data.
Called by load().
Implements KCal::ResourceCalendar.
Definition at line 143 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 159 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 172 of file resourcelocal.cpp.
The documentation for this class was generated from the following files: