kabc
#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
Phone number types.
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.
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, otherwisefalse
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 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.
Returns the translated label for phone number type
.
- Parameters
-
type An 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.
|
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
-
type An OR'ed combination of TypeFlag
- See also
- type()
Definition at line 210 of file phonenumber.cpp.
|
static |
Returns a list of all available types.
Definition at line 148 of file phonenumber.cpp.
Friends And Related Function Documentation
|
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:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.