• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

kabc

KABC::PhoneNumber

KABC::PhoneNumber Class Reference

Phonenumber information. More...

#include <phonenumber.h>

List of all members.


Public Types

typedef QList< PhoneNumber > List
enum  TypeFlag {
  Home = 1, Work = 2, Msg = 4, Pref = 8,
  Voice = 16, Fax = 32, Cell = 64, Video = 128,
  Bbs = 256, Modem = 512, Car = 1024, Isdn = 2048,
  Pcs = 4096, Pager = 8192
}
typedef QList< TypeFlag > TypeList

Public Member Functions

QString id () const
bool isEmpty () const
QString number () const
bool operator!= (const PhoneNumber &) const
PhoneNumber & operator= (const PhoneNumber &other)
bool operator== (const PhoneNumber &) const
 PhoneNumber (const PhoneNumber &other)
 PhoneNumber (const QString &number, Type type=Home)
 PhoneNumber ()
void setId (const QString &identifier)
void setNumber (const QString &number)
void setType (Type type)
QString toString () const
Type type () const
QString typeLabel () const
 ~PhoneNumber ()

Static Public Member Functions

static QString typeLabel (Type type)
static TypeList typeList ()

Friends

QDataStream & operator<< (QDataStream &, const PhoneNumber &)
QDataStream & operator>> (QDataStream &, PhoneNumber &)

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 38 of file phonenumber.h.


Member Typedef Documentation

typedef QList<PhoneNumber> KABC::PhoneNumber::List

List of phone numbers.

Definition at line 74 of file phonenumber.h.

typedef QList<TypeFlag> KABC::PhoneNumber::TypeList

List of phone number types.

Definition at line 69 of file phonenumber.h.


Member Enumeration Documentation

enum KABC::PhoneNumber::TypeFlag

Phone number types.

Enumerator:
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 47 of file phonenumber.h.


Constructor & Destructor Documentation

PhoneNumber::PhoneNumber (  ) 

Creates an empty phone number object.

Definition at line 57 of file phonenumber.cpp.

PhoneNumber::PhoneNumber ( const QString &  number,
Type  type = Home 
)

Creates a phone number 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 62 of file phonenumber.cpp.

PhoneNumber::PhoneNumber ( const PhoneNumber &  other  ) 

Copy constructor.

Fast operation, PhoneNumber's data is implicitly shared.

Parameters:
other The PhoneNumber object to copy from

Definition at line 68 of file phonenumber.cpp.

PhoneNumber::~PhoneNumber (  ) 

Destroys the phone number.

Definition at line 73 of file phonenumber.cpp.


Member Function Documentation

QString PhoneNumber::id (  )  const

Returns the unique identifier.

Definition at line 118 of file phonenumber.cpp.

bool PhoneNumber::isEmpty (  )  const

Returns true, if the phone number is empty.

Definition at line 108 of file phonenumber.cpp.

QString PhoneNumber::number (  )  const

Returns the phone number.

Definition at line 128 of file phonenumber.cpp.

bool PhoneNumber::operator!= ( const PhoneNumber &  other  )  const

Not-Equal operator.

Definition at line 94 of file phonenumber.cpp.

PhoneNumber & PhoneNumber::operator= ( const PhoneNumber &  other  ) 

Assignment operator.

Fast operation, PhoneNumber's data is implicitly shared.

Parameters:
other The PhoneNumber object to asssign to this

Definition at line 99 of file phonenumber.cpp.

bool PhoneNumber::operator== ( const PhoneNumber &  other  )  const

Equality operator.

Returns:
true if number, type and identifier are equal, otherwise false

Definition at line 77 of file phonenumber.cpp.

void PhoneNumber::setId ( const QString &  identifier  ) 

Sets the unique identifier.

Definition at line 113 of file phonenumber.cpp.

void PhoneNumber::setNumber ( const QString &  number  ) 

Sets the phone number.

Definition at line 123 of file phonenumber.cpp.

void PhoneNumber::setType ( Type  type  ) 

Sets the type.

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

Parameters:
type The Type of the phone number

Definition at line 133 of file phonenumber.cpp.

QString PhoneNumber::toString (  )  const

Returns a string representation of the phone number.

Definition at line 235 of file phonenumber.cpp.

PhoneNumber::Type PhoneNumber::type (  )  const

Returns the type.

Can be a multiple types combined by a logical or.

See also:
TypeFlag

typeLabel()

Definition at line 138 of file phonenumber.cpp.

QString PhoneNumber::typeLabel ( Type  type  )  [static]

Returns the translated label for phone number type.

Parameters:
type An OR'ed combination of TypeFlag
See also:
type()

Definition at line 175 of file phonenumber.cpp.

QString PhoneNumber::typeLabel (  )  const

Returns a translated string of the address' type.

Definition at line 143 of file phonenumber.cpp.

PhoneNumber::TypeList PhoneNumber::typeList (  )  [static]

Returns a list of all available types.

Definition at line 163 of file phonenumber.cpp.


Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  ,
const PhoneNumber &   
) [friend]

Serializes the phone number object into the stream.

Parameters:
stream The stream to write into
number The phone number object to serialize


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

kabc

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal