• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

  • TDEABC
  • ResourceFile
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
TDEABC::ResourceFile Class Reference

#include <resourcefile.h>

Inherits TDEABC::Resource.

Public Member Functions

 ResourceFile (const TDEConfig *cfg)
 
 ResourceFile (const TQString &fileName, const TQString &formatName="vcard")
 
 ~ResourceFile ()
 
virtual void writeConfig (TDEConfig *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 TQString &)
 
TQString fileName () const
 
void setFormat (const TQString &name)
 
TQString format () const
 
virtual void removeAddressee (const Addressee &addr)
 

Protected Slots

void fileChanged ()
 

Protected Member Functions

void init (const TQString &fileName, const TQString &format)
 
bool lock (const TQString &fileName)
 
void unlock (const TQString &fileName)
 

Detailed Description

This resource allows access to a local file.

Definition at line 40 of file resourcefile.h.

Constructor & Destructor Documentation

◆ ResourceFile() [1/2]

ResourceFile::ResourceFile ( const TDEConfig *  cfg)

Constructor.

Parameters
cfgThe config object where custom resource settings are stored.

Definition at line 49 of file resourcefile.cpp.

◆ ResourceFile() [2/2]

ResourceFile::ResourceFile ( const TQString &  fileName,
const TQString &  formatName = "vcard" 
)

Construct file resource on file.

  • fileName using format
  • formatName.

Definition at line 66 of file resourcefile.cpp.

◆ ~ResourceFile()

ResourceFile::~ResourceFile ( )

Destructor.

Definition at line 95 of file resourcefile.cpp.

Member Function Documentation

◆ asyncLoad()

bool ResourceFile::asyncLoad ( )
virtual

Definition at line 239 of file resourcefile.cpp.

◆ asyncSave()

bool ResourceFile::asyncSave ( Ticket *  ticket)
virtual

Definition at line 329 of file resourcefile.cpp.

◆ doClose()

void ResourceFile::doClose ( )
virtual

Closes the file again.

Definition at line 218 of file resourcefile.cpp.

◆ doOpen()

bool ResourceFile::doOpen ( )
virtual

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.

◆ fileChanged

void ResourceFile::fileChanged ( )
protectedslot

Definition at line 374 of file resourcefile.cpp.

◆ fileName()

TQString ResourceFile::fileName ( ) const

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

Definition at line 355 of file resourcefile.cpp.

◆ format()

TQString ResourceFile::format ( ) const

Returns the format name.

Definition at line 369 of file resourcefile.cpp.

◆ init()

void ResourceFile::init ( const TQString &  fileName,
const TQString &  format 
)
protected

Definition at line 74 of file resourcefile.cpp.

◆ load()

bool ResourceFile::load ( )
virtual

Loads all addressees from file to the address book.

Returns true if all addressees could be loaded otherwise false.

Definition at line 222 of file resourcefile.cpp.

◆ releaseSaveTicket()

void ResourceFile::releaseSaveTicket ( Ticket *  ticket)
virtual

Definition at line 134 of file resourcefile.cpp.

◆ removeAddressee()

void ResourceFile::removeAddressee ( const Addressee &  addr)
virtual

Remove a addressee from its source.

This method is mainly called by TDEABC::AddressBook.

Definition at line 390 of file resourcefile.cpp.

◆ requestSaveTicket()

Ticket * ResourceFile::requestSaveTicket ( )
virtual

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

Definition at line 113 of file resourcefile.cpp.

◆ save()

bool ResourceFile::save ( Ticket *  ticket)
virtual

Saves all addresses from address book to file.

Returns true if all addressees could be saved otherwise false.

Parameters
ticketThe ticket returned by requestSaveTicket()

Definition at line 255 of file resourcefile.cpp.

◆ setFileName()

void ResourceFile::setFileName ( const TQString &  fileName)

Set name of file to be used for saving.

Definition at line 343 of file resourcefile.cpp.

◆ setFormat()

void ResourceFile::setFormat ( const TQString &  name)

Sets a new format by name.

Definition at line 360 of file resourcefile.cpp.

◆ writeConfig()

void ResourceFile::writeConfig ( TDEConfig *  cfg)
virtual

Writes the config back.

Definition at line 101 of file resourcefile.cpp.


The documentation for this class was generated from the following files:
  • resourcefile.h
  • resourcefile.cpp

tdeabc

Skip menu "tdeabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.9.4
This website is maintained by Timothy Pearson.