Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::OPimContactAccess Class Reference

#include </home/clem/local/src/opie/libopie2/opiepim/core/ocontactaccess.h>

Inheritance diagram for Opie::OPimContactAccess:

Inheritance graph
[legend]
Collaboration diagram for Opie::OPimContactAccess:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SortFilter {
  DoNotShowWithoutChildren = FilterCustom<<1, DoNotShowWithoutAnniversary = FilterCustom<<2, DoNotShowWithoutBirthday = FilterCustom<<3, DoNotShowWithoutHomeAddress = FilterCustom<<4,
  DoNotShowWithoutBusinessAddress = FilterCustom<<5, DoNotShowWithCategory = FilterCustom << 6
}
enum  SortOrder {
  SortTitle = SortCustom, SortFirstName, SortMiddleName, SortLastName,
  SortSuffix, SortEmail, SortNickname, SortFileAsName,
  SortAnniversary, SortBirthday, SortGender, SortBirthdayWithoutYear,
  SortAnniversaryWithoutYear
}

Signals

void signalChanged (const OPimContactAccess *which)

Public Member Functions

 OPimContactAccess (const QString appname, const QString filename=0l, OPimContactAccessBackend *backend=0l, bool handlesync=true)
 ~OPimContactAccess ()
bool wasChangedExternally () const
bool save ()
int rtti () const

Private Slots

void copMessage (const QCString &msg, const QByteArray &data)

Private Attributes

OPimContactAccessBackendm_backEnd
bool m_loading:1
Private * d

Detailed Description

Class to access the contacts database. This is just a frontend for the real database handling which is done by the backend. This class is used to access the Contacts on a system. This class as any OPIE PIM class is backend independent.
Author:
Stefan Eilers, Holger Freyther
See also:
OPimAccessTemplate

Definition at line 58 of file ocontactaccess.h.


Member Enumeration Documentation

enum Opie::OPimContactAccess::SortFilter
 

Filter for sorted()

See also:
SortFilterBase in OPimBase
Enumeration values:
DoNotShowWithoutChildren  Don't return entries who don't have children
DoNotShowWithoutAnniversary  Don't return entries who don't have an anniversary
DoNotShowWithoutBirthday  Don't return entries who don't have a birthday
DoNotShowWithoutHomeAddress  Don't return entries who don't have a home address
DoNotShowWithoutBusinessAddress  Don't return entries who don't have a business address
DoNotShowWithCategory  Don't return entries which hava any category

Definition at line 67 of file ocontactaccess.h.

enum Opie::OPimContactAccess::SortOrder
 

Sort order for sorted()

See also:
SortOrderBase in OPimBase
Enumeration values:
SortTitle 
SortFirstName 
SortMiddleName 
SortLastName 
SortSuffix 
SortEmail 
SortNickname 
SortFileAsName 
SortAnniversary 
SortBirthday 
SortGender 
SortBirthdayWithoutYear 
SortAnniversaryWithoutYear 

Definition at line 86 of file ocontactaccess.h.


Constructor & Destructor Documentation

Opie::OPimContactAccess::OPimContactAccess const QString  appname,
const QString  filename = 0l,
OPimContactAccessBackend backend = 0l,
bool  handlesync = true
 

Create Database with contacts (addressbook).

Parameters:
appname Name of application which wants access to the database (i.e. "todolist")
filename The name of the database file. If not set, the default one is used.
backend Pointer to an alternative Backend. If not set, we will use the default backend.
handlesync If true the database stores the current state automatically if it receives the signals flush() and reload() which are used before and after synchronisation. If the application wants to react itself, it should be disabled by setting it to false
See also:
OPimContactAccessBackend

Definition at line 65 of file ocontactaccess.cpp.

References copMessage(), m_backEnd, and OPimAccessTemplate< T >::setBackEnd().

Opie::OPimContactAccess::~OPimContactAccess  ) 
 

Definition at line 92 of file ocontactaccess.cpp.

References save().


Member Function Documentation

void Opie::OPimContactAccess::copMessage const QCString msg,
const QByteArray data
[private, slot]
 

Definition at line 137 of file ocontactaccess.cpp.

References Opie::OPimAccessTemplate< OPimContact >::reload(), save(), and signalChanged().

Referenced by OPimContactAccess().

int Opie::OPimContactAccess::rtti  )  const [virtual]
 

Return identification of used records

Implements Opie::OPimBase.

Definition at line 149 of file ocontactaccess.cpp.

References Opie::OPimResolver::AddressBook.

bool Opie::OPimContactAccess::save  )  [virtual]
 

Save contacts database. Save is more a "commit". After calling this function, all changes are public available.

Returns:
true if successful

Reimplemented from Opie::OPimAccessTemplate< OPimContact >.

Definition at line 102 of file ocontactaccess.cpp.

References Opie::OPimAccessTemplate< OPimContact >::reload(), OPimAccessTemplate< T >::save(), and wasChangedExternally().

Referenced by copMessage(), AddressbookWindow::exportvCard(), AbView::save(), AbView::showPersonal(), AddressbookWindow::slotItemBeam(), and ~OPimContactAccess().

void Opie::OPimContactAccess::signalChanged const OPimContactAccess which  )  [signal]
 

Referenced by copMessage().

bool Opie::OPimContactAccess::wasChangedExternally  )  const
 

if the resource was changed externally. You should use the signal instead of polling possible changes !

Reimplemented from Opie::OPimAccessTemplate< OPimContact >.

Definition at line 131 of file ocontactaccess.cpp.

References m_backEnd, and Opie::OPimContactAccessBackend::wasChangedExternally().

Referenced by save().


Member Data Documentation

Private* Opie::OPimContactAccess::d [private]
 

Reimplemented from Opie::OPimAccessTemplate< OPimContact >.

Definition at line 157 of file ocontactaccess.h.

OPimContactAccessBackend* Opie::OPimContactAccess::m_backEnd [private]
 

Reimplemented from Opie::OPimAccessTemplate< OPimContact >.

Definition at line 150 of file ocontactaccess.h.

Referenced by OPimContactAccess(), and wasChangedExternally().

bool Opie::OPimContactAccess::m_loading [private]
 

Definition at line 151 of file ocontactaccess.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:59:34 2005 for OPIE by  doxygen 1.4.2