KABC::ResourceFile Class Reference
This resource allows access to a local file. More...
#include <resourcefile.h>
Inheritance diagram for KABC::ResourceFile:


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