QGeoAddress
Since: 1.1
#include <QtLocationSubset/QGeoAddress>
The QGeoAddress class represents an address.
This class represents an address of a location. Note that the methods text(), setText() and isTextGenerated() have been included here from the Qt 5.0 version of QGeoAddress, to satisfy the requirements of the BB10 QGeoServiceProvider (BbGeoServices).
Overview
Public Functions Index
QGeoAddress () | |
QGeoAddress (const QGeoAddress &other) | |
~QGeoAddress () | |
QString | city () const |
void | clear () |
QString | country () const |
QString | countryCode () const |
QString | county () const |
QString | district () const |
bool | isEmpty () const |
bool | isTextGenerated () const |
bool | operator!= (const QGeoAddress &other) const |
QGeoAddress & | operator= (const QGeoAddress &other) |
bool | operator== (const QGeoAddress &other) const |
QString | postcode () const |
void | setCity (const QString &city) |
void | setCountry (const QString &country) |
void | setCountryCode (const QString &countryCode) |
void | setCounty (const QString &county) |
void | setDistrict (const QString &district) |
void | setPostcode (const QString &postcode) |
void | setState (const QString &state) |
void | setStreet (const QString &street) |
void | setText (const QString &text) |
QString | state () const |
QString | street () const |
QString | text () const |
Public Functions
Default constructor.
Constructs a copy of other.
Destructor.
QString
Returns the city.
void
Clears all the address' data fields.
QString
Returns the country name.
QString
Returns the country code according to ISO 3166-1 alpha-3.
bool
Returns whether this address is empty.
An address is considered empty if all of its fields are empty.
bool
Returns true if QGeoAddress::text() is automatically generated from address elements, otherwise returns false if text() has been explicitly assigned.
text(), setText() Note that this method has been included here from the Qt 5.0 version of QGeoAddress, to satisfy the requirements of the BB10 QGeoServiceProvider (BbGeoServices).
bool
Returns true if this address is not equal to other, otherwise returns false.
QGeoAddress &
Assigns the given address to this address and returns a reference to this address.
bool
Returns true if this address is equal to other, otherwise returns false.
QString
Returns the postal code.
void
Sets the city.
void
Sets the country name.
void
Sets the countryCode according to ISO 3166-1 alpha-3.
void
Sets the county.
void
Sets the district.
void
Sets the postcode.
void
Sets the state.
void
Sets the street-level component of the address to street.
This typically includes a street number and street name but may also contain things like a unit number, a building name, or anything else that might be used to distinguish one address from another.
void
If text is not empty, explicitly assigns text as the string to be returned by text().
isTextGenerated() will return false. If text is empty, indicates that text() should be automatically generated from the address elements. isTextGenerated() will return true. Note that this method has been included here from the Qt 5.0 version of QGeoAddress, to satisfy the requirements of the BB10 QGeoServiceProvider (BbGeoServices).
QString
Returns the street-level component of the address.
This typically includes a street number and street name but may also contain things like a unit number, a building name, or anything else that might be used to distinguish one address from another.
QString
Returns the address as a single formatted string.
It is the recommended string to use to display the address to the user. It typically takes the format of an address as found on an envelope, but this is not always necessarily the case. The adddress text is either automatically generated or explicitly assigned. This can be determined by checking {QGeoAddress::isTextGenerated()} {isTextGenerated}. If an empty string is provided to setText(), then isTextGenerated() will be set to true and text() will return a string which is locally formatted according to countryCode() and based on the elements of the address such as street, city and so on. Because the text string is generated from the address elements, a sequence of calls such as text(), setStreet(), text() may return different strings for each invocation of text(). If a non-empty string is provided to setText(), then isTextGenerated() will be set to false and text() will always return the explicitly assigned string. Calls to modify other elements such as setStreet(), setCity() and so on will not affect the resultant string from text(). Note that this method has been included here from the Qt 5.0 version of QGeoAddress, to satisfy the requirements of the BB10 QGeoServiceProvider (BbGeoServices).
© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Documentation sources may be obtained from www.qt-project.org.
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy