kabc Library API Documentation

KABC::Field Class Reference

Collaboration diagram for KABC::Field:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< Field * > List
enum  FieldCategory {
  All = 0x0, Frequent = 0x01, Address = 0x02, Email = 0x04,
  Personal = 0x08, Organization = 0x10, CustomCategory = 0x20
}

Public Member Functions

virtual QString label ()
virtual int category ()
virtual QString value (const KABC::Addressee &)
virtual bool setValue (KABC::Addressee &, const QString &)
QString sortKey (const KABC::Addressee &)
virtual bool isCustom ()
virtual bool equals (Field *field)

Static Public Member Functions

static QString categoryLabel (int category)
static Field::List allFields ()
static Field::List defaultFields ()
static FieldcreateCustomField (const QString &label, int category, const QString &key, const QString &app)
static void deleteFields ()
static void saveFields (KConfig *cfg, const QString &identifier, const Field::List &fields)
static void saveFields (const QString &identifier, const Field::List &fields)
static Field::List restoreFields (KConfig *cfg, const QString &identifier)
static Field::List restoreFields (const QString &identifier)

Static Protected Member Functions

static void createField (int id, int category=0)
static void createDefaultField (int id, int category=0)

Friends

class FieldImpl

Detailed Description

Definition at line 33 of file field.h.


Member Enumeration Documentation

enum KABC::Field::FieldCategory
 

  • All -
  • Frequent -
  • Address -
  • Email -
  • Personal -
  • Organization -
  • CustomCategory -

Definition at line 50 of file field.h.


Member Function Documentation

virtual QString KABC::Field::label  )  [virtual]
 

Returns the translated label for this field.

virtual int KABC::Field::category  )  [virtual]
 

Returns the ored categories the field belongs to.

static QString KABC::Field::categoryLabel int  category  )  [static]
 

Returns the translated label for field category.

virtual QString KABC::Field::value const KABC::Addressee  )  [virtual]
 

Returns a string representation of the value the field has in the given Addressee.

Returns QString::null, if it is not possible to convert the value to a string.

Referenced by KABC::FieldSortMode::lesser().

virtual bool KABC::Field::setValue KABC::Addressee ,
const QString
[virtual]
 

Sets the value of the field in the given Addressee.

Returns true on success or false, if the given string couldn't be converted to a valid value.

QString KABC::Field::sortKey const KABC::Addressee  ) 
 

Returns a string, that can be used for sorting.

virtual bool KABC::Field::isCustom  )  [virtual]
 

Returns, if the field is a user-defined field.

virtual bool KABC::Field::equals Field field  )  [virtual]
 

Returns, if the field is equal with.

Parameters:
field. 

static Field::List KABC::Field::allFields  )  [static]
 

Returns a list of all fields.

static Field::List KABC::Field::defaultFields  )  [static]
 

Returns a list of the default fields.

static Field* KABC::Field::createCustomField const QString label,
int  category,
const QString key,
const QString app
[static]
 

Creates a custom field.

Parameters:
label The label for this field
category The category of this field
key Unique key for this field
app Unique app name for this field

static void KABC::Field::deleteFields  )  [static]
 

Delete all fields from list.

static void KABC::Field::saveFields KConfig cfg,
const QString identifier,
const Field::List fields
[static]
 

Save the field settings to a config file.

Parameters:
cfg The config file object
identifier The unique identifier
fields The list of the fields

static void KABC::Field::saveFields const QString identifier,
const Field::List fields
[static]
 

This is the same as above, with the difference, that the list is stored in KGlobal::config() in group "KABCFields".

static Field::List KABC::Field::restoreFields KConfig cfg,
const QString identifier
[static]
 

Load the field settings from a config file.

Parameters:
cfg The config file object
identifier The unique identifier

static Field::List KABC::Field::restoreFields const QString identifier  )  [static]
 

This is the same as above, with the difference, that the list is loaded from KGlobal::config() from group "KABCFields".


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for kabc Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 15 11:05:31 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003