• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

  • TDEABC
  • Address
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
TDEABC::Address Class Reference

#include <address.h>

Public Types

enum  Type {
  Dom = 1 , Intl = 2 , Postal = 4 , Parcel = 8 ,
  Home = 16 , Work = 32 , Pref = 64
}
 
typedef TQValueList< Address > List
 
typedef TQValueList< int > TypeList
 

Public Member Functions

 Address ()
 
 Address (int)
 
bool operator== (const Address &) const
 
bool operator!= (const Address &) const
 
bool isEmpty () const
 
void clear ()
 
void setId (const TQString &)
 
TQString id () const
 
void setType (int type)
 
int type () const
 
TQString typeLabel () const
 
void setPostOfficeBox (const TQString &)
 
TQString postOfficeBox () const
 
void setExtended (const TQString &)
 
TQString extended () const
 
void setStreet (const TQString &)
 
TQString street () const
 
void setLocality (const TQString &)
 
TQString locality () const
 
void setRegion (const TQString &)
 
TQString region () const
 
void setPostalCode (const TQString &)
 
TQString postalCode () const
 
void setCountry (const TQString &)
 
TQString country () const
 
void setLabel (const TQString &)
 
TQString label () const
 
void dump () const
 
TQString formattedAddress (const TQString &realName=TQString::null, const TQString &orgaName=TQString::null) const
 

Static Public Member Functions

static TQString postOfficeBoxLabel ()
 
static TQString extendedLabel ()
 
static TQString streetLabel ()
 
static TQString localityLabel ()
 
static TQString regionLabel ()
 
static TQString postalCodeLabel ()
 
static TQString countryLabel ()
 
static TQString labelLabel ()
 
static TypeList typeList ()
 
static TQString typeLabel (int type)
 
static TQString countryToISO (const TQString &cname)
 
static TQString ISOtoCountry (const TQString &ISOname)
 

Friends

KABC_EXPORT TQDataStream & operator<< (TQDataStream &, const Address &)
 
KABC_EXPORT TQDataStream & operator>> (TQDataStream &, Address &)
 

Detailed Description

Postal address information.

This class represents information about a postal address.

Definition at line 55 of file address.h.

Member Typedef Documentation

◆ List

typedef TQValueList<Address> TDEABC::Address::List

List of addresses.

Definition at line 64 of file address.h.

◆ TypeList

typedef TQValueList<int> TDEABC::Address::TypeList

Definition at line 65 of file address.h.

Member Enumeration Documentation

◆ Type

enum TDEABC::Address::Type

Address types:

  • Dom - domestic
  • Intl - international
  • Postal - postal
  • Parcel - parcel
  • Home - home address
  • Work - address at work
  • Pref - preferred address

Definition at line 78 of file address.h.

Constructor & Destructor Documentation

◆ Address() [1/2]

Address::Address ( )

Constructor that creates an empty Address, which is initialized with a unique id (see id()).

Definition at line 37 of file address.cpp.

◆ Address() [2/2]

Address::Address ( int  type)

This is like Address() just above, with the difference that you can specify the type.

Definition at line 43 of file address.cpp.

Member Function Documentation

◆ clear()

void Address::clear ( )

Clears all entries of the address.

Definition at line 83 of file address.cpp.

◆ country()

TQString Address::country ( ) const

Returns the country.

Definition at line 246 of file address.cpp.

◆ countryLabel()

TQString Address::countryLabel ( )
static

Returns the translated label for country field.

Definition at line 251 of file address.cpp.

◆ countryToISO()

TQString Address::countryToISO ( const TQString &  cname)
static

Returns ISO code for a localized country name.

Only localized country names will be understood. This might be replaced by a TDELocale method in the future.

Parameters
cnamename of the country
Returns
two digit ISO code

Definition at line 510 of file address.cpp.

◆ dump()

void Address::dump ( ) const

Used for debug output.

Definition at line 317 of file address.cpp.

◆ extended()

TQString Address::extended ( ) const

Returns the extended address information.

Definition at line 156 of file address.cpp.

◆ extendedLabel()

TQString Address::extendedLabel ( )
static

Returns the translated label for extended field.

Definition at line 161 of file address.cpp.

◆ formattedAddress()

TQString Address::formattedAddress ( const TQString &  realName = TQString::null,
const TQString &  orgaName = TQString::null 
) const

Returns this address formatted according to the country-specific address formatting rules.

The formatting rules applied depend on either the addresses country field, or (if the latter is empty) on the system country setting. If companyName is provided, an available business address format will be preferred.

Parameters
realNamethe formatted name of the contact
orgaNamethe name of the organization or company
Returns
the formatted address (containing newline characters)

Definition at line 329 of file address.cpp.

◆ id()

TQString Address::id ( ) const

Definition at line 95 of file address.cpp.

◆ isEmpty()

bool Address::isEmpty ( ) const

Returns true, if the address is empty.

Definition at line 68 of file address.cpp.

◆ ISOtoCountry()

TQString Address::ISOtoCountry ( const TQString &  ISOname)
static

Returns a localized country name for a ISO code.

This might be replaced by a TDELocale method in the future.

Parameters
ISOnametwo digit ISO code
Returns
localized name of the country
Since
3.2

Definition at line 547 of file address.cpp.

◆ label()

TQString Address::label ( ) const

Returns the delivery label.

Definition at line 264 of file address.cpp.

◆ labelLabel()

TQString Address::labelLabel ( )
static

Returns the translated label for delivery label field.

Definition at line 269 of file address.cpp.

◆ locality()

TQString Address::locality ( ) const

Returns the locality.

Definition at line 192 of file address.cpp.

◆ localityLabel()

TQString Address::localityLabel ( )
static

Returns the translated label for locality field.

Definition at line 197 of file address.cpp.

◆ operator!=()

bool Address::operator!= ( const Address &  a) const

Definition at line 63 of file address.cpp.

◆ operator==()

bool Address::operator== ( const Address &  a) const

Definition at line 49 of file address.cpp.

◆ postalCode()

TQString Address::postalCode ( ) const

Returns the postal code.

Definition at line 228 of file address.cpp.

◆ postalCodeLabel()

TQString Address::postalCodeLabel ( )
static

Returns the translated label for postal code field.

Definition at line 233 of file address.cpp.

◆ postOfficeBox()

TQString Address::postOfficeBox ( ) const

Returns the post office box.

Definition at line 138 of file address.cpp.

◆ postOfficeBoxLabel()

TQString Address::postOfficeBoxLabel ( )
static

Returns the translated label for post office box field.

Definition at line 143 of file address.cpp.

◆ region()

TQString Address::region ( ) const

Returns the region.

Definition at line 210 of file address.cpp.

◆ regionLabel()

TQString Address::regionLabel ( )
static

Returns the translated label for region field.

Definition at line 215 of file address.cpp.

◆ setCountry()

void Address::setCountry ( const TQString &  s)

Sets the country.

Definition at line 239 of file address.cpp.

◆ setExtended()

void Address::setExtended ( const TQString &  s)

Sets the extended address information.

Definition at line 149 of file address.cpp.

◆ setId()

void Address::setId ( const TQString &  id)

Sets the unique id.

Definition at line 88 of file address.cpp.

◆ setLabel()

void Address::setLabel ( const TQString &  s)

Sets the delivery label.

This is the literal text to be used as label.

Definition at line 257 of file address.cpp.

◆ setLocality()

void Address::setLocality ( const TQString &  s)

Sets the locality, e.g.

city.

Definition at line 185 of file address.cpp.

◆ setPostalCode()

void Address::setPostalCode ( const TQString &  s)

Sets the postal code.

Definition at line 221 of file address.cpp.

◆ setPostOfficeBox()

void Address::setPostOfficeBox ( const TQString &  s)

Sets the post office box.

Definition at line 131 of file address.cpp.

◆ setRegion()

void Address::setRegion ( const TQString &  s)

Sets the region, e.g.

state.

Definition at line 203 of file address.cpp.

◆ setStreet()

void Address::setStreet ( const TQString &  s)

Sets the street (including number).

Definition at line 167 of file address.cpp.

◆ setType()

void Address::setType ( int  type)

Sets the type of address.

See enum for definiton of types.

Parameters
typetype, can be a bitwise or of multiple types.

Definition at line 100 of file address.cpp.

◆ street()

TQString Address::street ( ) const

Returns the street.

Definition at line 174 of file address.cpp.

◆ streetLabel()

TQString Address::streetLabel ( )
static

Returns the translated label for street field.

Definition at line 179 of file address.cpp.

◆ type()

int Address::type ( ) const

Returns the type of address.

Can be a bitwise or of multiple types.

Definition at line 107 of file address.cpp.

◆ typeLabel() [1/2]

TQString Address::typeLabel ( ) const

Returns a translated string of all types the address has.

Definition at line 112 of file address.cpp.

◆ typeLabel() [2/2]

TQString Address::typeLabel ( int  type)
static

Returns the translated label for a special type.

Definition at line 284 of file address.cpp.

◆ typeList()

Address::TypeList Address::typeList ( )
static

Returns the list of available types.

Definition at line 274 of file address.cpp.


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

tdeabc

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

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.9.4
This website is maintained by Timothy Pearson.