#include <resourcelocal.h>

Public Member Functions | |
ResourceLocal () | |
ResourceLocal (const KConfigGroup &group) | |
ResourceLocal (const QString &fileName) | |
virtual | ~ResourceLocal () |
void | dump () const |
QString | fileName () const |
KABC::Lock * | lock () |
bool | setFileName (const QString &fileName) |
bool | setValue (const QString &key, const QString &value) |
virtual void | writeConfig (KConfigGroup &group) |
Protected Slots | |
void | reload () |
Protected Member Functions | |
virtual bool | doLoad (bool syncCache) |
virtual bool | doReload () |
virtual bool | doSave (bool syncCache) |
virtual bool | doSave (bool syncCache, Incidence *incidence) |
ResourceLocal & | operator= (const ResourceLocal &other) |
bool | operator== (const ResourceLocal &other) |
KDateTime | readLastModified () |
Detailed Description
Provides a calendar resource stored as a local file.
Definition at line 46 of file resourcelocal.h.
Constructor & Destructor Documentation
Constructs a resource using default configuration information.
Definition at line 61 of file resourcelocal.cpp.
ResourceLocal::ResourceLocal | ( | const KConfigGroup & | group | ) | [explicit] |
Constructs a resource from configuration information stored in a KConfig object.
- Parameters:
-
group the configuration group to read the resource configuration from
Definition at line 70 of file resourcelocal.cpp.
ResourceLocal::ResourceLocal | ( | const QString & | fileName | ) | [explicit] |
Constructs a resource for file named fileName
.
- Parameters:
-
fileName the file to link to the resource.
Definition at line 88 of file resourcelocal.cpp.
ResourceLocal::~ResourceLocal | ( | ) | [virtual] |
Destroys the resource.
Definition at line 132 of file resourcelocal.cpp.
Member Function Documentation
bool ResourceLocal::doLoad | ( | bool | syncCache | ) | [protected, virtual] |
Actually loads the data from the local file.
Implements KCal::ResourceCached.
Definition at line 147 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 186 of file resourcelocal.cpp.
bool ResourceLocal::doSave | ( | bool | syncCache | ) | [protected, virtual] |
Actually saves the data to the local file.
Implements KCal::ResourceCached.
Definition at line 166 of file resourcelocal.cpp.
bool ResourceLocal::doSave | ( | bool | syncCache, |
Incidence * | incidence | ||
) | [protected, virtual] |
Do the actual saving of the resource data.
Called by save(CacheAction). Save one Incidence. The default implementation calls doSave(bool) to save everything.
- Parameters:
-
syncCache if true
, the cache will be uploaded to the remote resource. Iffalse
, only the cache will be updatedincidence The incidence to be saved.
Reimplemented from KCal::ResourceCached.
Definition at line 176 of file resourcelocal.cpp.
void ResourceLocal::dump | ( | ) | const [virtual] |
Dumps the resource.
Reimplemented from KRES::Resource.
Definition at line 212 of file resourcelocal.cpp.
QString ResourceLocal::fileName | ( | ) | const |
Returns the fileName for this resource.
- See also:
- setFileName()
Definition at line 218 of file resourcelocal.cpp.
KABC::Lock * ResourceLocal::lock | ( | ) | [virtual] |
Returns the lock.
Implements KCal::ResourceCalendar.
Definition at line 181 of file resourcelocal.cpp.
ResourceLocal & ResourceLocal::operator= | ( | const ResourceLocal & | other | ) | [protected] |
Sets this ResourceLocal equal to other
.
Definition at line 255 of file resourcelocal.cpp.
bool ResourceLocal::operator== | ( | const ResourceLocal & | other | ) | [protected] |
Compares this ResourceLocal and other
for equality.
Returns true if they are equal.
- Parameters:
-
other the instance to compare with
Definition at line 248 of file resourcelocal.cpp.
KDateTime ResourceLocal::readLastModified | ( | ) | [protected] |
Returns the date/time the local file was last modified.
- See also:
- doSave()
Definition at line 141 of file resourcelocal.cpp.
void ResourceLocal::reload | ( | ) | [protected, slot] |
Reload the resource data from the local file.
Definition at line 205 of file resourcelocal.cpp.
bool ResourceLocal::setFileName | ( | const QString & | fileName | ) |
Sets the fileName for this resource.
This will be the local file where the resource data will be stored.
- Parameters:
-
fileName the file to use for this resource
- See also:
- fileName()
Definition at line 223 of file resourcelocal.cpp.
bool ResourceLocal::setValue | ( | const QString & | key, |
const QString & | value | ||
) | [virtual] |
Sets a value for this resource.
- Parameters:
-
key the distinct name for this value. value the actual data for this value.
Reimplemented from KCal::ResourceCalendar.
Definition at line 239 of file resourcelocal.cpp.
void ResourceLocal::writeConfig | ( | KConfigGroup & | group | ) | [virtual] |
Writes KConfig config
to a local file.
Reimplemented from KCal::ResourceCached.
Definition at line 96 of file resourcelocal.cpp.
The documentation for this class was generated from the following files: