kabc Library API Documentation

KABC::PhoneNumber Class Reference

Phonenumber information. More...

#include <phonenumber.h>

List of all members.

Public Types

enum  Types

Public Methods

 PhoneNumber ()
 PhoneNumber (const QString &number, int type=Home)
 ~PhoneNumber ()
void setId (const QString &id)
QString id () const
void setNumber (const QString &)
QString number () const
void setType (int)
int type () const
QString typeLabel () const
QString label () const

Static Public Methods

TypeList typeList ()
QString typeLabel (int type)
QString label (int type)


Detailed Description

Phonenumber information.

This class provides phone number information. A phone number is classified by a type. The following types are available, it's possible to use multiple types Types for a number by combining them through a logical or.

Definition at line 36 of file phonenumber.h.


Member Enumeration Documentation

enum KABC::PhoneNumber::Types
 

  • Home - Home number
  • Work - Office number
  • Msg - Messaging
  • Pref - Preferred number
  • Voice - Voice
  • Fax - Fax machine
  • Cell - Cell phone
  • Video - Video phone
  • Bbs - Mailbox
  • Modem - Modem
  • Car - Car phone
  • Isdn - ISDN connection
  • Pcs - Personal Communication Service
  • Pager - Pager

Definition at line 61 of file phonenumber.h.


Constructor & Destructor Documentation

PhoneNumber::PhoneNumber  
 

Create an empty phone number object.

Definition at line 28 of file phonenumber.cpp.

PhoneNumber::PhoneNumber const QString   number,
int    type = Home
 

Create a phonenumber object.

Parameters:
number  Number
type  Type as defined in enum. Multiple types can be specified by combining them by a logical or.

Definition at line 34 of file phonenumber.cpp.

PhoneNumber::~PhoneNumber  
 

Destructor.

Definition at line 40 of file phonenumber.cpp.


Member Function Documentation

void PhoneNumber::setId const QString   id
 

Sets the unique identifier.

Definition at line 62 of file phonenumber.cpp.

QString PhoneNumber::id  
 

Returns the unique identifier.

Definition at line 67 of file phonenumber.cpp.

Referenced by KABC::Addressee::insertPhoneNumber(), and KABC::Addressee::removePhoneNumber().

void PhoneNumber::setNumber const QString  
 

Sets the number.

Definition at line 72 of file phonenumber.cpp.

QString PhoneNumber::number  
 

Returns the number.

Definition at line 77 of file phonenumber.cpp.

Referenced by KABC::Addressee::insertPhoneNumber(), and KABC::Addressee::phoneNumber().

void PhoneNumber::setType int   
 

Sets the type.

Multiple types can be specified by combining them by a logical or.

Definition at line 82 of file phonenumber.cpp.

References type().

int PhoneNumber::type  
 

Returns the type.

Can be a multiple types combined by a logical or.

Definition at line 87 of file phonenumber.cpp.

Referenced by label(), setType(), and typeLabel().

QString PhoneNumber::typeLabel  
 

Returns a translated string of all types the address has.

Definition at line 92 of file phonenumber.cpp.

References QString::append(), QValueList::begin(), QValueList::end(), label(), type(), and typeList().

Referenced by label().

QString PhoneNumber::label  
 

Returns the translated label for phone number depending on its type.

Definition at line 111 of file phonenumber.cpp.

References type(), and typeLabel().

Referenced by typeLabel().

PhoneNumber::TypeList PhoneNumber::typeList   [static]
 

Returns a list of all available types.

Definition at line 116 of file phonenumber.cpp.

Referenced by typeLabel().

QString PhoneNumber::typeLabel int    type [static]
 

Returns the translated label for phone number type.

Definition at line 131 of file phonenumber.cpp.

References type().

QString PhoneNumber::label int    type [static]
 

Returns the translated label for phone number type.

Deprecated:

Definition at line 126 of file phonenumber.cpp.

References type(), and typeLabel().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kabc Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 22 14:25:37 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003