QGeoAddress¶
The
QGeoAddress
class represents an address of aQGeoLocation
. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
city
()def
clear
()def
country
()def
countryCode
()def
county
()def
district
()def
isEmpty
()def
isTextGenerated
()def
postalCode
()def
setCity
(city)def
setCountry
(country)def
setCountryCode
(countryCode)def
setCounty
(county)def
setDistrict
(district)def
setPostalCode
(postalCode)def
setState
(state)def
setStreet
(street)def
setText
(text)def
state
()def
street
()def
text
()
Detailed Description¶
The address’ attributes are normalized to US feature names and can be mapped to the local feature levels (for example State matches “Bundesland” in Germany).
The address contains a
text()
for displaying purposes and additional properties to access the components of an address:
- class PySide2.QtPositioning.QGeoAddress¶
PySide2.QtPositioning.QGeoAddress(other)
- param other:
Default constructor.
Constructs a copy of
other
.
- PySide2.QtPositioning.QGeoAddress.clear()¶
Clears all of the address’ data fields.
- PySide2.QtPositioning.QGeoAddress.country()¶
- Return type:
str
Returns the country name.
See also
- PySide2.QtPositioning.QGeoAddress.countryCode()¶
- Return type:
str
Returns the country code according to ISO 3166-1 alpha-3
See also
- PySide2.QtPositioning.QGeoAddress.county()¶
- Return type:
str
Returns the county. The county is considered the second subdivision below country.
See also
- PySide2.QtPositioning.QGeoAddress.district()¶
- Return type:
str
Returns the district. The district is considered the subdivison below city.
See also
- PySide2.QtPositioning.QGeoAddress.isEmpty()¶
- Return type:
bool
Returns whether this address is empty. An address is considered empty if all of its fields are empty.
- PySide2.QtPositioning.QGeoAddress.isTextGenerated()¶
- Return type:
bool
Returns true if
text()
is automatically generated from address elements, otherwise returns false iftext()
has been explicitly assigned.
- PySide2.QtPositioning.QGeoAddress.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns true if this address is not equal to
other
, otherwise returns false.
- PySide2.QtPositioning.QGeoAddress.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns true if this address is equal to
other
, otherwise returns false.
- PySide2.QtPositioning.QGeoAddress.postalCode()¶
- Return type:
str
Returns the postal code.
See also
- PySide2.QtPositioning.QGeoAddress.setCity(city)¶
- Parameters:
city – str
Sets the
city
.See also
- PySide2.QtPositioning.QGeoAddress.setCountry(country)¶
- Parameters:
country – str
Sets the
country
name.See also
- PySide2.QtPositioning.QGeoAddress.setCountryCode(countryCode)¶
- Parameters:
countryCode – str
Sets the
countryCode
according to ISO 3166-1 alpha-3See also
- PySide2.QtPositioning.QGeoAddress.setCounty(county)¶
- Parameters:
county – str
Sets the
county
.See also
- PySide2.QtPositioning.QGeoAddress.setDistrict(district)¶
- Parameters:
district – str
Sets the
district
.See also
- PySide2.QtPositioning.QGeoAddress.setPostalCode(postalCode)¶
- Parameters:
postalCode – str
Sets the
postalCode
.See also
- PySide2.QtPositioning.QGeoAddress.setState(state)¶
- Parameters:
state – str
Sets the
state
.See also
- PySide2.QtPositioning.QGeoAddress.setStreet(street)¶
- Parameters:
street – str
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.
See also
- PySide2.QtPositioning.QGeoAddress.setText(text)¶
- Parameters:
text – str
If
text
is not empty, explicitly assignstext
as the string to be returned bytext()
.isTextGenerated()
will return false.If
text
is empty, indicates thattext()
should be automatically generated from the address elements.isTextGenerated()
will return true.See also
- PySide2.QtPositioning.QGeoAddress.state()¶
- Return type:
str
Returns the state. The state is considered the first subdivision below country.
See also
- PySide2.QtPositioning.QGeoAddress.street()¶
- Return type:
str
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.
See also
- PySide2.QtPositioning.QGeoAddress.text()¶
- Return type:
str
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 address text is either automatically generated or explicitly assigned. This can be determined by checking
isTextGenerated
.If an empty string is provided to
setText()
, thenisTextGenerated()
will be set to true and will return a string which is locally formatted according tocountryCode()
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 ,setStreet()
, may return different strings for each invocation of .If a non-empty string is provided to
setText()
, thenisTextGenerated()
will be set to false and will always return the explicitly assigned string. Calls to modify other elements such assetStreet()
,setCity()
and so on will not affect the resultant string from .See also
© 2022 The Qt Company Ltd. 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. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.