QContactAddress Class

The QContactAddress class contains an address of a contact. More...

Header: #include <QContactAddress>
Inherits: QContactDetail

Public Types

enum AddressField { FieldStreet, FieldLocality, FieldRegion, FieldPostcode, ..., FieldSubTypes }
enum SubType { SubTypeParcel, SubTypePostal, SubTypeDomestic, SubTypeInternational }

Public Functions

QString country() const
QString locality() const
QString postOfficeBox() const
QString postcode() const
QString region() const
void setCountry(const QString &country)
void setLocality(const QString &locality)
void setPostOfficeBox(const QString &postOfficeBox)
void setPostcode(const QString &postcode)
void setRegion(const QString &region)
void setStreet(const QString &street)
void setSubTypes(const QList<int> &subTypes)
QString street() const
QList<int> subTypes() const

Static Public Members

const DetailType Type
QContactFilter match(const QString &subString)

Detailed Description

The QContactAddress class contains an address of a contact.

The fields in the QContactAddress class are based on the segments of the ADR property of a Versit vCard file. Versit ® is a trademark of the Internet Mail Consortium.

Member Type Documentation

enum QContactAddress::AddressField

This enumeration defines the fields supported by QContactAddress.

ConstantValueDescription
QContactAddress::FieldStreet0The value stored in this field contains the street number and street name of the address.
QContactAddress::FieldLocality1The value stored in this field contains the name of the city, town or suburb of the address.
QContactAddress::FieldRegion2The value stored in this field contains the region segment. The region segment contains the name or identifier of the state, province or region of the address.
QContactAddress::FieldPostcode3The value stored in this field contains the postcode segment. The postcode segment contains the postal code for the address.
QContactAddress::FieldCountry4The value stored in this field contains the country segment. The country segment contains the name of the country of the address.
QContactAddress::FieldPostOfficeBox6The value stored in this field contains the post office box segment. The post office box segment contains the post office box identifier of the mailing address.
QContactAddress::FieldSubTypes5The value stored in this field contains the sub types of a QContactAddress.

See also street(), setStreet(), locality(), setLocality(), region(), setRegion(), postcode(), setPostcode(), country(), setCountry(), postOfficeBox(), and setPostOfficeBox().

enum QContactAddress::SubType

This enumeration defines the predefined enum constants for a sub type value of a QContactAddress.

ConstantValueDescription
QContactAddress::SubTypeParcel0The value stored contains an address for parcel delivery.
QContactAddress::SubTypePostal1The value stored contains an address for postal delivery.
QContactAddress::SubTypeDomestic2The value stored contains an address for domestic mail delivery.
QContactAddress::SubTypeInternational3The value stored contains an address for international mail delivery.

See also subTypes() and setSubTypes().

Member Function Documentation

QString QContactAddress::country() const

Returns the country segment of the address stored in this detail.

See also setCountry().

QString QContactAddress::locality() const

Returns the locality segment of the address stored in this detail.

See also setLocality().

[static] QContactFilter QContactAddress::match(const QString &subString)

Returns a filter suitable for finding contacts with an address which contains the given subString in any of its fields.

QString QContactAddress::postOfficeBox() const

Returns the post office box segment of the address stored in this detail.

See also setPostOfficeBox().

QString QContactAddress::postcode() const

Returns the postcode segment of the address stored in this detail.

See also setPostcode().

QString QContactAddress::region() const

Returns the region segment of the address stored in this detail.

See also setRegion().

void QContactAddress::setCountry(const QString &country)

Sets the country segment of the address stored in this detail to country.

See also country().

void QContactAddress::setLocality(const QString &locality)

Sets the locality segment of the address stored in this detail to locality.

See also locality().

void QContactAddress::setPostOfficeBox(const QString &postOfficeBox)

Sets the post office box segment of the address stored in this detail to postOfficeBox.

See also postOfficeBox().

void QContactAddress::setPostcode(const QString &postcode)

Sets the postcode segment of the address stored in this detail to postcode.

See also postcode().

void QContactAddress::setRegion(const QString &region)

Sets the region segment of the address stored in this detail to region.

See also region().

void QContactAddress::setStreet(const QString &street)

Sets the street segment of the address stored in this detail to street.

See also street().

void QContactAddress::setSubTypes(const QList<int> &subTypes)

Sets the subtypes which this detail implements to be those contained in the list of given subTypes.

See also subTypes().

QString QContactAddress::street() const

Returns the street segment of the address stored in this detail.

See also setStreet().

QList<int> QContactAddress::subTypes() const

Returns the list of subtypes that this detail implements.

See also setSubTypes().

Member Variable Documentation

const DetailType QContactAddress::Type

The enum constant for the type identifier of QContactAddress details.