• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

kabc

  • KABC
  • PhoneNumber
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
KABC::PhoneNumber Class Reference

#include <phonenumber.h>

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

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

Static Public Member Functions

static QString typeFlagLabel (TypeFlag type)
 
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
numberNumber
typeType 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
otherThe 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
otherThe 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
typeThe #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 259 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::typeFlagLabel ( TypeFlag  type)
static

Returns the translated label for phone number type.

Parameters
typeAn OR'ed combination of TypeFlag
See also
typeLabel()
Since
4.5

Definition at line 160 of file phonenumber.cpp.

QString PhoneNumber::typeLabel ( ) const

Returns a translated string of the address' type.

Definition at line 143 of file phonenumber.cpp.

QString PhoneNumber::typeLabel ( Type  type)
static

Returns the translated label for phone number type.

In opposite to typeFlagLabel( TypeFlag type ), it returns all types of the phone number concatenated by '/'.

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

Definition at line 210 of file phonenumber.cpp.

PhoneNumber::TypeList PhoneNumber::typeList ( )
static

Returns a list of all available types.

Definition at line 148 of file phonenumber.cpp.

Friends And Related Function Documentation

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

Serializes the phone number object into the stream.

Parameters
streamThe stream to write into
numberThe phone number object to serialize

The documentation for this class was generated from the following files:
  • phonenumber.h
  • phonenumber.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal