ContactPostalAddressBuilder
#include <bb/pim/contacts/ContactPostalAddressBuilder>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The ContactPostalAddressBuilder class lets you create, and specify properties for, a new ContactPostalAddress or edit an existing ContactPostalAddress.
You can use this class to set properties, such as city, country, postal code, and so on, for a ContactPostalAddress. This class uses the builder pattern to create a ContactPostalAddress and set its properties. Each of the set*() functions returns a self reference to the builder, allowing you to chain function calls together. For example, here's how to create a ContactPostalAddress with a first address line, city, region, and country using the builder pattern:
ContactPostalAddress address = ContactPostalAddressBuilder()
.setLine1("419 Phillip St.")
.setCity("Waterloo")
.setRegion("Ontario")
.setCountry("Canada");
BlackBerry 10.0.0
Public Functions Index
| ContactPostalAddressBuilder () | |
| ~ContactPostalAddressBuilder () | |
| ContactPostalAddressBuilder (const ContactPostalAddressBuilder ©) | |
| ContactPostalAddressBuilder (ContactPostalAddress &address) | |
| ContactPostalAddressBuilder & | operator= (const ContactPostalAddressBuilder &operand) |
| ContactPostalAddressBuilder & | setLabel (const QString &label) |
| ContactPostalAddressBuilder & | setLine1 (const QString &line1) |
| ContactPostalAddressBuilder & | setLine2 (const QString &line2) |
| ContactPostalAddressBuilder & | setCity (const QString &city) |
| ContactPostalAddressBuilder & | setRegion (const QString ®ion) |
| ContactPostalAddressBuilder & | setCountry (const QString &country) |
| ContactPostalAddressBuilder & | setPostalCode (const QString &postalCode) |
| ContactPostalAddressBuilder & | setLatitude (double latitude) |
| ContactPostalAddressBuilder & | setLongitude (double longitude) |
| ContactPostalAddressBuilder & | setSubKind (AttributeSubKind::Type subkind) |
| operator ContactPostalAddress () |
Public Functions
Destructor.
BlackBerry 10.0.0
Copy constructor.
This function constructs a ContactPostalAddressBuilder containing exactly the same values as the provided ContactPostalAddressBuilder.
| Parameters | |
|---|---|
| copy |
The ContactPostalAddressBuilder to be copied. |
BlackBerry 10.0.0
Edits the provided ContactPostalAddress.
You can use this function to edit the properties of an existing ContactPostalAddress, as an alternative to calling ContactPostalAddress::edit().
| Parameters | |
|---|---|
| address |
The ContactPostalAddress to edit. |
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Assignment operator.
This operator copies all values from the provided ContactPostalAddressBuilder into this ContactPostalAddressBuilder.
| Parameters | |
|---|---|
| operand |
The ContactPostalAddressBuilder from which to copy all values. |
A ContactPostalAddressBuilder with all copied data
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the label for the postal address.
You can use this value as a custom label for the ContactPostalAddress, if needed.
| Parameters | |
|---|---|
| label |
The label to set. |
A ContactPostalAddressBuilder with the provided custom label.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the first address line field of the postal address.
| Parameters | |
|---|---|
| line1 |
The first address line value to set. |
A ContactPostalAddressBuilder with the provided first address line value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the second address line field of the postal address.
| Parameters | |
|---|---|
| line2 |
The second address line value to set. |
A ContactPostalAddressBuilder with the provided second address line value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the city field of the postal address.
| Parameters | |
|---|---|
| city |
The city value to set. |
A ContactPostalAddressBuilder with the provided city value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the region field of the postal address.
The region field might contain different values for different countries. For example, for a US postal address, this field would contain the state. For a Canadian postal address, this field would contain the province.
| Parameters | |
|---|---|
| region |
The region value to set. |
A ContactPostalAddressBuilder with the provided region value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the country field of the postal address.
| Parameters | |
|---|---|
| country |
The country value to set. |
A ContactPostalAddressBuilder with the provided country value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the postal code field of the postal address.
| Parameters | |
|---|---|
| postalCode |
The postal code value to set. |
A ContactPostalAddressBuilder with the provided postal code value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the latitude field of the postal address.
| Parameters | |
|---|---|
| latitude |
The latitude value to set. |
A ContactPostalAddressBuilder with the provided latitude value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the longitude field of the postal address.
| Parameters | |
|---|---|
| longitude |
The longitude value to set. |
A ContactPostalAddressBuilder with the provided longitude value.
BlackBerry 10.0.0
ContactPostalAddressBuilder &
Sets the sub-kind field of the postal address.
The valid sub-kinds of a ContactPostalAddress are AttributeSubKind::Home, AttributeSubKind::Work, or AttributeSubKind::Other.
| Parameters | |
|---|---|
| subkind |
The sub-kind value to set. |
A ContactPostalAddressBuilder with the provided sub-kind value.
BlackBerry 10.0.0
Cast operator.
This operator casts an object to the ContactPostalAddress type.
BlackBerry 10.0.0