KABC::ResourceFile Class Reference
#include <resourcefile.h>
Inheritance diagram for KABC::ResourceFile:

Detailed Description
This resource allows access to a local file.
Definition at line 40 of file resourcefile.h.
Public Member Functions | |
ResourceFile (const KConfig *cfg) | |
ResourceFile (const QString &fileName, const QString &formatName="vcard") | |
~ResourceFile () | |
virtual void | writeConfig (KConfig *cfg) |
virtual bool | doOpen () |
virtual void | doClose () |
virtual Ticket * | requestSaveTicket () |
virtual void | releaseSaveTicket (Ticket *) |
virtual bool | load () |
virtual bool | asyncLoad () |
virtual bool | save (Ticket *ticket) |
virtual bool | asyncSave (Ticket *ticket) |
void | setFileName (const QString &) |
QString | fileName () const |
void | setFormat (const QString &name) |
QString | format () const |
virtual void | removeAddressee (const Addressee &addr) |
Protected Slots | |
void | fileChanged () |
Protected Member Functions | |
void | init (const QString &fileName, const QString &format) |
bool | lock (const QString &fileName) |
void | unlock (const QString &fileName) |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 49 of file resourcefile.cpp. |
|
Construct file resource on file.
Definition at line 66 of file resourcefile.cpp. |
|
Destructor.
Definition at line 95 of file resourcefile.cpp. |
Member Function Documentation
|
Loads all addressees asyncronously. You have to make sure that either the loadingFinished() or loadingError() signal is emitted from within this function. The default implementation simply calls the synchronous load.
Reimplemented from KABC::Resource. Definition at line 229 of file resourcefile.cpp. |
|
Saves all addressees asynchronously. You have to make sure that either the savingFinished() or savingError() signal is emitted from within this function. The default implementation simply calls the synchronous save.
Reimplemented from KABC::Resource. Definition at line 311 of file resourcefile.cpp. |
|
Closes the file again.
Definition at line 208 of file resourcefile.cpp. |
|
Tries to open the file and checks for the proper format. This method should be called before load(). Definition at line 144 of file resourcefile.cpp. |
|
Return name of file used for loading and saving the address book.
Definition at line 337 of file resourcefile.cpp. |
|
Returns the format name.
Definition at line 351 of file resourcefile.cpp. |
|
Loads all addressees from file to the address book. Returns true if all addressees could be loaded otherwise false. Implements KABC::Resource. Definition at line 212 of file resourcefile.cpp. |
|
Releases the ticket previousely requested with requestSaveTicket(). The resource has to remove its locks in this function. This function is also responsible for deleting the ticket. Implements KABC::Resource. Definition at line 134 of file resourcefile.cpp. |
|
Remove a addressee from its source. This method is mainly called by KABC::AddressBook. Reimplemented from KABC::Resource. Definition at line 372 of file resourcefile.cpp. |
|
Requests a save ticket, that is used by save().
Implements KABC::Resource. Definition at line 113 of file resourcefile.cpp. |
|
Saves all addresses from address book to file. Returns true if all addressees could be saved otherwise false.
Implements KABC::Resource. Definition at line 245 of file resourcefile.cpp. |
|
Set name of file to be used for saving.
Definition at line 325 of file resourcefile.cpp. |
|
Sets a new format by name.
Definition at line 342 of file resourcefile.cpp. |
|
Writes the config back.
Reimplemented from KABC::Resource. Definition at line 101 of file resourcefile.cpp. |
The documentation for this class was generated from the following files: