QPlaceAttributeclass represents generic attribute information about a place. 更多 …
A
QPlaceAttributeinstance stores an additional piece of information about a place that is not otherwise exposed through theQPlaceclass. AQPlaceAttributeencapsulates a localized label which describes the attribute and rich text string representing the attribute’s value. Generally, both are intended to be displayed to the end-user as is.Some plugins may not support attributes at all, others may only support a certain set, others still may support a dynamically changing set of attributes over time or even allow attributes to be arbitrarily defined by the client application. The attributes could also vary on a place by place basis, for example one place may have opening hours while another does not. Consult the plugin references 了解细节。
QPlaceAttributeclass defines some constant strings which characterize standard attribute types .
QPlaceAttribute::OpeningHours
QPlaceAttribute::Payment
QPlaceAttribute::Provider
There is a class of attribute types of the format x_id_<provider> for example x_id_here. This class of attributes is a set of alternative identifiers of the place, from the specified provider’s perspective.
The above types are used to access and modify attributes in
QPlacevia:attribute type is a string type so that providers are able to introduce new attributes as necessary. Custom attribute types should always be prefixed by a qualifier in order to avoid conflicts.
Some attributes may not be intended to be readable by end users, the label field of such attributes are empty to indicate this fact.
QPlaceAttribute
¶
QPlaceAttribute(other)
- param other
Constructs an attribute.
Creates a copy of
other
.
PySide2.QtLocation.QPlaceAttribute.
OpeningHours
¶
PySide2.QtLocation.QPlaceAttribute.
Payment
¶
PySide2.QtLocation.QPlaceAttribute.
Provider
¶
PySide2.QtLocation.QPlaceAttribute.
isEmpty
(
)
¶
bool
Returns a boolean indicating whether the all the fields of the place attribute are empty or not.
PySide2.QtLocation.QPlaceAttribute.
label
(
)
¶
unicode
Returns a localized label describing the attribute.
另请参阅
PySide2.QtLocation.QPlaceAttribute.
__ne__
(
other
)
¶
other
–
QPlaceAttribute
bool
返回 true 若
other
is not equal to this attribute, otherwise returns false.
PySide2.QtLocation.QPlaceAttribute.
__eq__
(
other
)
¶
other
–
QPlaceAttribute
bool
返回 true 若
other
is equal to this attribute, otherwise returns false.
PySide2.QtLocation.QPlaceAttribute.
setLabel
(
label
)
¶
label – unicode
设置
label
of the attribute.
另请参阅
PySide2.QtLocation.QPlaceAttribute.
setText
(
text
)
¶
text – unicode
设置
text
of the attribute.
另请参阅