ContactPostalAddress
#include <bb/pim/contacts/ContactPostalAddress>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The ContactPostalAddress class represents a postal address for a contact.
This class contains information about a postal address that's associated with a Contact, such as city, country, postal code, latitude, and longitude.
You can retrieve a list of postal addresses for a contact by using Contact::postalAddresses(). You can add or delete a postal address for a contact by using ContactBuilder::addPostalAddress() and ContactBuilder::deletePostalAddress(), respectively. You can create a new ContactPostalAddress and specify values for an existing ContactPostalAddress by using a ContactPostalAddressBuilder.
BlackBerry 10.0.0
Public Static Attributes Index
| double | InvalidLatitude |
| double | InvalidLongitude |
Public Functions Index
| ContactPostalAddress () | |
| ~ContactPostalAddress () | |
| ContactPostalAddress (const ContactPostalAddress ©) | |
| ContactPostalAddress & | operator= (const ContactPostalAddress ©) |
| bool | operator== (const ContactPostalAddress &operand) const |
| bool | operator!= (const ContactPostalAddress &operand) const |
| int | id () const |
| QString | label () const |
| QString | line1 () const |
| QString | line2 () const |
| QString | city () const |
| QString | region () const |
| QString | country () const |
| QString | postalCode () const |
| double | latitude () const |
| double | longitude () const |
| bool | isValidLatitudeLongitude () const |
| AttributeSubKind::Type | subKind () const |
| bool | isValid () const |
| ContactPostalAddressBuilder | edit () |
Public Static Attributes
double
Represents a default invalid latitude value.
When a default instance of ContactPostalAddress is created, the latitude is set to InvalidLatitude.
BlackBerry 10.0.0
double
Represents a default invalid longitude value.
When a default instance of ContactPostalAddress is created, the latitude is set to InvalidLongitude.
BlackBerry 10.0.0
Public Functions
Destructor.
BlackBerry 10.0.0
Copy constructor.
This function constructs a ContactPostalAddress containing exactly the same values as the provided ContactPostalAddress.
| Parameters | |
|---|---|
| copy |
The ContactPostalAddress to be copied. |
BlackBerry 10.0.0
ContactPostalAddress &
Assignment operator.
This operator copies all values from the provided ContactPostalAddress into this ContactPostalAddress.
| Parameters | |
|---|---|
| copy |
The ContactPostalAddress from which to copy all values. |
A ContactPostalAddress with all copied data
BlackBerry 10.0.0
bool
Equality operator.
This operator determines if this ContactPostalAddress has the same values as another ContactPostalAddress.
| Parameters | |
|---|---|
| operand |
The ContactPostalAddress from which to compare. |
true if the values are considered equal, false otherwise.
BlackBerry 10.0.0
bool
Inequality operator.
This operator determines if this ContactPostalAddress has any different values from another ContactPostalAddress.
| Parameters | |
|---|---|
| operand |
The ContactPostalAddress from which to compare. |
true if any of the values are not considered equal, false otherwise.
BlackBerry 10.0.0
int
Retrieves the internal ID of this ContactPostalAddress.
The internal ID is set only if the data is retrieved by the ContactService.
The internal ID of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the label of this ContactPostalAddress.
You can use this value as a custom label for the ContactPostalAddress, if needed.
The label of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the first address line field of this ContactPostalAddress.
The first address line field of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the second address line field of this ContactPostalAddress.
The second address line field of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the city field of this ContactPostalAddress.
The city field of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the region field of this ContactPostalAddress.
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.
The region field of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the country field of this ContactPostalAddress.
The country field of this ContactPostalAddress.
BlackBerry 10.0.0
QString
Retrieves the postal code field of this ContactPostalAddress.
The postal code field of this ContactPostalAddress.
BlackBerry 10.0.0
double
Retrieves the latitude field of this ContactPostalAddress.
The value of this field should be in the range of +- 90.0 degrees. A positive number indicates a location that's north of the equator, and a negative number indicates a location that's south of the equator.
The latitude field of this ContactPostalAddress.
BlackBerry 10.0.0
double
Retrieves the longitude field of this ContactPostalAddress.
The value of this field should be in the range of +- 180.0 degrees. A positive number indicates a location that's east of the prime meridian, and a negative number indicates a location that's west of the prime meridian.
The longitude field of this ContactPostalAddress.
BlackBerry 10.0.0
bool
Indicates whether the latitude and longitude values of this ContactPostalAddress are valid.
If either the latitude or longitude are outside of their allowed ranges, then this function returns false.
true if the latitude and longitude values of this ContactPostalAddress are valid, false otherwise.
BlackBerry 10.0.0
AttributeSubKind::Type
Retrieves the sub-kind of this ContactPostalAddress.
The valid sub-kinds of a ContactPostalAddress are AttributeSubKind::Home, AttributeSubKind::Work, or AttributeSubKind::Other.
The sub-kind of this ContactPostalAddress.
BlackBerry 10.0.0
bool
Indicates whether this ContactPostalAddress is valid.
A ContactPostalAddress is considered invalid if all fields are empty and the latitude and longitude values are invalid. You should use this function to determine if a ContactPostalAddress is valid before you use it.
true if this ContactPostalAddress is valid, false otherwise.
BlackBerry 10.0.0
ContactPostalAddressBuilder
Edits the contents of this ContactPostalAddress.
This function returns a ContactPostalAddressBuilder that you can use to change the values of this ContactPostalAddress.
A ContactPostalAddressBuilder that you can use to change the values of this ContactPostalAddress.
BlackBerry 10.0.0