KABC::ResourceDir Class Reference
Inheritance diagram for KABC::ResourceDir:

Public Member Functions | |
ResourceDir (const KConfig *) | |
ResourceDir (const QString &path, const QString &type="vcard") | |
~ResourceDir () | |
virtual void | writeConfig (KConfig *) |
virtual bool | doOpen () |
virtual void | doClose () |
virtual Ticket * | requestSaveTicket () |
virtual void | releaseSaveTicket (Ticket *) |
virtual bool | load () |
virtual bool | asyncLoad () |
virtual bool | save (Ticket *) |
virtual bool | asyncSave (Ticket *) |
void | setPath (const QString &) |
QString | path () const |
void | setFormat (const QString &format) |
QString | format () const |
virtual void | removeAddressee (const Addressee &addr) |
Protected Slots | |
void | pathChanged () |
Protected Member Functions | |
void | init (const QString &path, const QString &format) |
Detailed Description
Definition at line 41 of file resourcedir.h.
Member Function Documentation
|
Writes the resource specific config to file.
Reimplemented from KABC::Resource. Definition at line 103 of file resourcedir.cpp. References KConfigBase::deleteEntry(), KABC::StdAddressBook::directoryName(), KABC::Resource::writeConfig(), KConfigBase::writeEntry(), and KConfigBase::writePathEntry(). |
|
Request a ticket, you have to pass through save() to allow locking. The resource has to create its locks in this function. Implements KABC::Resource. Definition at line 115 of file resourcedir.cpp. References KABC::Resource::addressBook(), KABC::AddressBook::emitAddressBookLocked(), endl(), KABC::Lock::error(), KABC::AddressBook::error(), kdDebug(), and KABC::Lock::lock(). |
|
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 136 of file resourcedir.cpp. |
|
Loads all addressees synchronously.
Implements KABC::Resource. Definition at line 171 of file resourcedir.cpp. References KABC::Resource::addressBook(), QFile::close(), endl(), QDir::entryList(), KABC::AddressBook::error(), kdDebug(), KABC::FormatPlugin::loadAll(), QFile::name(), and QFile::open(). Referenced by asyncLoad(), and pathChanged(). |
|
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 200 of file resourcedir.cpp. References load(), KABC::Resource::loadingError(), and KABC::Resource::loadingFinished(). Referenced by pathChanged(). |
|
Saves all addressees synchronously.
Implements KABC::Resource. Definition at line 214 of file resourcedir.cpp. References KABC::Resource::addressBook(), QMap::begin(), QFile::close(), QMap::end(), endl(), KABC::AddressBook::error(), QMap< QString, Addressee >::Iterator(), kdDebug(), KABC::Resource::mAddrMap, QFile::name(), QFile::open(), and KABC::FormatPlugin::save(). Referenced by asyncSave(). |
|
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 246 of file resourcedir.cpp. References save(), KABC::Resource::savingError(), and KABC::Resource::savingFinished(). |
|
Set path to be used for saving.
Definition at line 258 of file resourcedir.cpp. Referenced by init(), and KABC::ResourceDirConfig::saveSettings(). |
|
Return path used for loading and saving the address book.
Definition at line 269 of file resourcedir.cpp. Referenced by KABC::ResourceDirConfig::loadSettings(). |
|
Set the format by name.
Definition at line 274 of file resourcedir.cpp. References KABC::FormatFactory::format(), and KABC::FormatFactory::self(). Referenced by KABC::ResourceDirConfig::saveSettings(). |
|
Returns the format name.
Definition at line 285 of file resourcedir.cpp. Referenced by KABC::ResourceDirConfig::loadSettings(). |
|
Remove a addressee from its source. This method is mainly called by KABC::AddressBook. Reimplemented from KABC::Resource. Definition at line 304 of file resourcedir.cpp. References QMap::erase(), KABC::Resource::mAddrMap, and QFile::remove(). |
The documentation for this class was generated from the following files: