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 48 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.
|
|
Construct file resource on file.
|
|
Destructor.
|
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. |
|
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. |
|
Closes the file again.
|
|
Tries to open the file and checks for the proper format. This method should be called before load(). |
|
Return name of file used for loading and saving the address book.
|
|
Returns the format name.
|
|
Loads all addressees from file to the address book. Returns true if all addressees could be loaded otherwise false. Implements KABC::Resource. |
|
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. |
|
Remove a addressee from its source. This method is mainly called by KABC::AddressBook. Reimplemented from KABC::Resource. |
|
Requests a save ticket, that is used by save().
Implements KABC::Resource. |
|
Saves all addresses from address book to file. Returns true if all addressees could be saved otherwise false.
Implements KABC::Resource. |
|
Set name of file to be used for saving.
|
|
Sets a new format by name.
|
|
Writes the config back.
Reimplemented from KABC::Resource. |
The documentation for this class was generated from the following file: