.TH "KABC::Address" kde3 "11 Jun 2005" "Version Version 3.4.1" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::Address \- Postal address information.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <address.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBQValueList\fP< \fBAddress\fP > \fBList\fP"
.br
.ti -1c
.RI "typedef \fBQValueList\fP< int > \fBTypeList\fP"
.br
.ti -1c
.RI "enum \fBType\fP { \fBDom\fP =  1, \fBIntl\fP =  2, \fBPostal\fP =  4, \fBParcel\fP =  8, \fBHome\fP =  16, \fBWork\fP =  32, \fBPref\fP =  64 }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBAddress\fP ()"
.br
.ti -1c
.RI "\fBAddress\fP (int)"
.br
.ti -1c
.RI "bool \fBoperator==\fP (const \fBAddress\fP &) const "
.br
.ti -1c
.RI "bool \fBoperator!=\fP (const \fBAddress\fP &) const "
.br
.ti -1c
.RI "bool \fBisEmpty\fP () const "
.br
.ti -1c
.RI "void \fBclear\fP ()"
.br
.ti -1c
.RI "void \fBsetId\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBid\fP () const "
.br
.ti -1c
.RI "void \fBsetType\fP (int type)"
.br
.ti -1c
.RI "int \fBtype\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBtypeLabel\fP () const "
.br
.ti -1c
.RI "void \fBsetPostOfficeBox\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBpostOfficeBox\fP () const "
.br
.ti -1c
.RI "void \fBsetExtended\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBextended\fP () const "
.br
.ti -1c
.RI "void \fBsetStreet\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBstreet\fP () const "
.br
.ti -1c
.RI "void \fBsetLocality\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBlocality\fP () const "
.br
.ti -1c
.RI "void \fBsetRegion\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBregion\fP () const "
.br
.ti -1c
.RI "void \fBsetPostalCode\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBpostalCode\fP () const "
.br
.ti -1c
.RI "void \fBsetCountry\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBcountry\fP () const "
.br
.ti -1c
.RI "void \fBsetLabel\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBlabel\fP () const "
.br
.ti -1c
.RI "void \fBdump\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBformattedAddress\fP (const \fBQString\fP &realName=QString::null, const \fBQString\fP &orgaName=QString::null) const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQString\fP \fBpostOfficeBoxLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBextendedLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBstreetLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBlocalityLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBregionLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBpostalCodeLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBcountryLabel\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBlabelLabel\fP ()"
.br
.ti -1c
.RI "static \fBTypeList\fP \fBtypeList\fP ()"
.br
.ti -1c
.RI "static \fBQString\fP \fBtypeLabel\fP (int type)"
.br
.ti -1c
.RI "static \fBQString\fP \fBcountryToISO\fP (const \fBQString\fP &cname)"
.br
.ti -1c
.RI "static \fBQString\fP \fBISOtoCountry\fP (const \fBQString\fP &ISOname)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "KABC_EXPORT \fBQDataStream\fP & \fBoperator<<\fP (\fBQDataStream\fP &, const \fBAddress\fP &)"
.br
.ti -1c
.RI "KABC_EXPORT \fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &, \fBAddress\fP &)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Postal address information. 

This class represents information about a postal address. 
.PP
Definition at line 55 of file address.h.
.SH "Member Typedef Documentation"
.PP 
.SS "typedef \fBQValueList\fP<\fBAddress\fP> \fBKABC::Address::List\fP"
.PP
List of addresses. 
.PP
Definition at line 64 of file address.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKABC::Address::Type\fP"
.PP
\fBAddress\fP types:. 
.PP
.PD 0
.IP "\(bu" 2
\fCDom\fP - domestic 
.IP "\(bu" 2
\fCIntl\fP - international 
.IP "\(bu" 2
\fCPostal\fP - postal 
.IP "\(bu" 2
\fCParcel\fP - parcel 
.IP "\(bu" 2
\fCHome\fP - home address 
.IP "\(bu" 2
\fCWork\fP - address at work 
.IP "\(bu" 2
\fCPref\fP - preferred address 
.PP

.PP
Definition at line 78 of file address.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "Address::Address ()"
.PP
Constructor that creates an empty \fBAddress\fP, which is initialized with a unique id (see id()). 
.PP
Definition at line 37 of file address.cpp.
.PP
References KApplication::randomString().
.PP
Referenced by clear().
.SS "Address::Address (int)"
.PP
This is like \fBAddress()\fP just above, with the difference that you can specify the type. 
.PP
Definition at line 43 of file address.cpp.
.PP
References KApplication::randomString().
.SH "Member Function Documentation"
.PP 
.SS "bool Address::isEmpty () const"
.PP
Returns true, if the address is empty. 
.PP
Definition at line 68 of file address.cpp.
.PP
References QString::isEmpty().
.PP
Referenced by formattedAddress().
.SS "void Address::clear ()"
.PP
Clears all entries of the address. 
.PP
Definition at line 83 of file address.cpp.
.PP
References Address().
.SS "void Address::setId (const \fBQString\fP &)"
.PP
Sets the unique id. 
.PP
Definition at line 88 of file address.cpp.
.SS "void Address::setType (int type)"
.PP
Sets the type of address. 
.PP
See enum for definiton of types.
.PP
\fBParameters:\fP
.RS 4
\fItype\fP type, can be a bitwise or of multiple types. 
.RE
.PP

.PP
Definition at line 100 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "int Address::type () const"
.PP
Returns the type of address. 
.PP
Can be a bitwise or of multiple types. 
.PP
Definition at line 107 of file address.cpp.
.PP
Referenced by typeLabel().
.SS "\fBQString\fP Address::typeLabel () const"
.PP
Returns a translated string of all types the address has. 
.PP
Definition at line 112 of file address.cpp.
.PP
References QString::append(), QValueList::begin(), QValueList::end(), label(), type(), and typeList().
.SS "void Address::setPostOfficeBox (const \fBQString\fP &)"
.PP
Sets the post office box. 
.PP
Definition at line 131 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::postOfficeBox () const"
.PP
Returns the post office box. 
.PP
Definition at line 138 of file address.cpp.
.SS "\fBQString\fP Address::postOfficeBoxLabel ()\fC [static]\fP"
.PP
Returns the translated label for post office box field. 
.PP
Definition at line 143 of file address.cpp.
.SS "void Address::setExtended (const \fBQString\fP &)"
.PP
Sets the extended address information. 
.PP
Definition at line 149 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::extended () const"
.PP
Returns the extended address information. 
.PP
Definition at line 156 of file address.cpp.
.PP
Referenced by dump().
.SS "\fBQString\fP Address::extendedLabel ()\fC [static]\fP"
.PP
Returns the translated label for extended field. 
.PP
Definition at line 161 of file address.cpp.
.SS "void Address::setStreet (const \fBQString\fP &)"
.PP
Sets the street (including number). 
.PP
Definition at line 167 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::street () const"
.PP
Returns the street. 
.PP
Definition at line 174 of file address.cpp.
.PP
Referenced by dump().
.SS "\fBQString\fP Address::streetLabel ()\fC [static]\fP"
.PP
Returns the translated label for street field. 
.PP
Definition at line 179 of file address.cpp.
.SS "void Address::setLocality (const \fBQString\fP &)"
.PP
Sets the locality, e.g. 
.PP
city. 
.PP
Definition at line 185 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::locality () const"
.PP
Returns the locality. 
.PP
Definition at line 192 of file address.cpp.
.PP
Referenced by dump().
.SS "\fBQString\fP Address::localityLabel ()\fC [static]\fP"
.PP
Returns the translated label for locality field. 
.PP
Definition at line 197 of file address.cpp.
.SS "void Address::setRegion (const \fBQString\fP &)"
.PP
Sets the region, e.g. 
.PP
state. 
.PP
Definition at line 203 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::region () const"
.PP
Returns the region. 
.PP
Definition at line 210 of file address.cpp.
.SS "\fBQString\fP Address::regionLabel ()\fC [static]\fP"
.PP
Returns the translated label for region field. 
.PP
Definition at line 215 of file address.cpp.
.SS "void Address::setPostalCode (const \fBQString\fP &)"
.PP
Sets the postal code. 
.PP
Definition at line 221 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::postalCode () const"
.PP
Returns the postal code. 
.PP
Definition at line 228 of file address.cpp.
.PP
Referenced by dump().
.SS "\fBQString\fP Address::postalCodeLabel ()\fC [static]\fP"
.PP
Returns the translated label for postal code field. 
.PP
Definition at line 233 of file address.cpp.
.SS "void Address::setCountry (const \fBQString\fP &)"
.PP
Sets the country. 
.PP
Definition at line 239 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readAddressFromQStringList().
.SS "\fBQString\fP Address::country () const"
.PP
Returns the country. 
.PP
Definition at line 246 of file address.cpp.
.PP
Referenced by countryToISO(), and formattedAddress().
.SS "\fBQString\fP Address::countryLabel ()\fC [static]\fP"
.PP
Returns the translated label for country field. 
.PP
Definition at line 251 of file address.cpp.
.SS "void Address::setLabel (const \fBQString\fP &)"
.PP
Sets the delivery label. 
.PP
This is the literal text to be used as label. 
.PP
Definition at line 257 of file address.cpp.
.PP
Referenced by KABC::VCard21Parser::readFromString().
.SS "\fBQString\fP Address::label () const"
.PP
Returns the delivery label. 
.PP
Definition at line 264 of file address.cpp.
.PP
Referenced by typeLabel().
.SS "\fBQString\fP Address::labelLabel ()\fC [static]\fP"
.PP
Returns the translated label for delivery label field. 
.PP
Definition at line 269 of file address.cpp.
.SS "\fBAddress::TypeList\fP Address::typeList ()\fC [static]\fP"
.PP
Returns the list of available types. 
.PP
Definition at line 274 of file address.cpp.
.PP
References QValueList::isEmpty().
.PP
Referenced by typeLabel().
.SS "\fBQString\fP Address::typeLabel (int type)\fC [static]\fP"
.PP
Returns the translated label for a special type. 
.PP
Definition at line 284 of file address.cpp.
.SS "void Address::dump () const"
.PP
Used for debug output. 
.PP
Definition at line 317 of file address.cpp.
.PP
References endl(), extended(), kdDebug(), locality(), postalCode(), and street().
.SS "\fBQString\fP Address::formattedAddress (const \fBQString\fP & realName = \fCQString::null\fP, const \fBQString\fP & orgaName = \fCQString::null\fP) const"
.PP
Returns this address formatted according to the country-specific address formatting rules. 
.PP
The formatting rules applied depend on either the addresses \fBcountry\fP field, or (if the latter is empty) on the system country setting. If companyName is provided, an available business address format will be preferred.
.PP
\fBParameters:\fP
.RS 4
\fIrealName\fP the formatted name of the contact 
.br
\fIorgaName\fP the name of the organization or company 
.RE
.PP
\fBReturns:\fP
.RS 4
the formatted address (containing newline characters) 
.RE
.PP

.PP
Definition at line 329 of file address.cpp.
.PP
References KLocale::country(), country(), countryToISO(), endl(), QString::isEmpty(), isEmpty(), kdWarning(), KGlobal::locale(), locate(), KConfigBase::readEntry(), KConfigBase::setGroup(), and QString::upper().
.SS "\fBQString\fP Address::countryToISO (const \fBQString\fP & cname)\fC [static]\fP"
.PP
Returns ISO code for a localized country name. 
.PP
Only localized country names will be understood. This might be replaced by a \fBKLocale\fP method in the future. 
.PP
\fBParameters:\fP
.RS 4
\fIcname\fP name of the country 
.RE
.PP
\fBReturns:\fP
.RS 4
two digit ISO code 
.RE
.PP

.PP
Definition at line 510 of file address.cpp.
.PP
References QFile::close(), KLocale::country(), country(), KGlobal::dirs(), QMap::end(), QMap::find(), KStandardDirs::findResource(), QMap::insert(), QString::isNull(), KGlobal::locale(), QFile::open(), QTextStream::readLine(), KStaticDeleter< type >::setObject(), and QStringList::split().
.PP
Referenced by formattedAddress().
.SS "\fBQString\fP Address::ISOtoCountry (const \fBQString\fP & ISOname)\fC [static]\fP"
.PP
Returns a localized country name for a ISO code. 
.PP
This might be replaced by a \fBKLocale\fP method in the future. 
.PP
\fBParameters:\fP
.RS 4
\fIISOname\fP two digit ISO code 
.RE
.PP
\fBReturns:\fP
.RS 4
localized name of the country 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 547 of file address.cpp.
.PP
References QFile::close(), KGlobal::dirs(), QString::find(), KStandardDirs::findResource(), QString::isNull(), QString::left(), QString::lower(), QFile::open(), QTextStream::readLine(), QString::simplifyWhiteSpace(), and QString::utf8().

.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
