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 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
KCal::ResourceLocal::ResourceLocal | ( | const KConfig * | ) |
Create resource from configuration information stored in a KConfig object.
KCal::ResourceLocal::ResourceLocal | ( | const QString & | fileName | ) |
Create resource for file named fileName.
Member Function Documentation
virtual bool KCal::ResourceLocal::doLoad | ( | ) | [protected, virtual] |
virtual bool KCal::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.
virtual bool KCal::ResourceLocal::doSave | ( | ) | [protected, virtual] |
KABC::Lock* KCal::ResourceLocal::lock | ( | ) | [virtual] |
bool KCal::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.
The documentation for this class was generated from the following file: