class ResourceFile

# class ResourceFile | More...
Internal Use Only
Full name | `KABC::ResourceFile`
Definition | `#include <resourcefile.h>`
Inherits | QObject (qt) [public ], KABC::Resource [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- ResourceFile ( AddressBook *ab, const KConfig *cfg )
- ResourceFile ( AddressBook *ab, const QString &filename, FormatPlugin *format = 0 )
- ~ResourceFile ()
- bool open ()
- void close ()
- Ticket * requestSaveTicket ()
- bool load ()
- bool save ( Ticket *ticket )
- void setFileName ( const QString & )
- QString fileName () const
- virtual QString identifier () const
- void removeAddressee ( const Addressee& addr )
- virtual void cleanUp ()

#### Protected Methods

- bool lock ( const QString &fileName )
- void unlock ( const QString &fileName )

#### Protected Slots

- void fileChanged ()

## Detailed Description

ResourceFile ( AddressBook *ab, const KConfig *cfg ) | ### ResourceFile

Constructor.

Parameters:

ab | The address book where the addressees should be stored.
cfg | The config object where custom resource settings are stored.

ResourceFile ( AddressBook *ab, const QString &filename, FormatPlugin *format = 0 ) | ### ResourceFile

Constructor.

Parameters:

ab | The address book where the addressees should be stored.
filename | The name of the file, the addressees should be read from.
format | The pointer to a format handler.

~ResourceFile () | ### ~ResourceFile

Destructor.

bool open () | ### open

Tries to open the file and checks for the proper format. This method should be called before load().

Reimplemented from Resource.

void close () | ### close

Closes the file again.

Reimplemented from Resource.

Ticket * requestSaveTicket () | ### requestSaveTicket

Requests a save ticket, that is used by save()

Reimplemented from Resource.

bool load () | ### load

Loads all addressees from file to the address book. Returns true if all addressees could be loaded otherwise false.

Reimplemented from Resource.

bool save ( Ticket *ticket ) | ### save

Saves all addresses from address book to file. Returns true if all addressees could be saved otherwise false.

Parameters:

ticket | The ticket returned by requestSaveTicket()

Reimplemented from Resource.

void setFileName ( const QString & ) | ### setFileName

Set name of file to be used for saving.

QString fileName () | ### fileName

[const]

Return name of file used for loading and saving the address book.

QString identifier () | ### identifier

[const virtual]

Returns the unique identifier.

Reimplemented from Resource.

void removeAddressee ( const Addressee& addr ) | ### removeAddressee

Remove a addressee from its source. This method is mainly called by KABC::AddressBook.

Reimplemented from Resource.

void cleanUp () | ### cleanUp

[virtual]

This method is called by an error handler if the application crashed

Reimplemented from Resource.

void fileChanged () | ### fileChanged

[protected slots slot]

bool lock ( const QString &fileName ) | ### lock

[protected]

void unlock ( const QString &fileName ) | ### unlock

[protected]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:38:02 2003, using kdoc 2.0a54.