PySide6.QtLocation.QPlaceCategory

class QPlaceCategory

The QPlaceCategory class represents a category that a QPlace can be associated with. More

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

Categories are used to search for places based on the categories they are associated with. The list/tree of available categories can be obtained from QPlaceManager . The setCategories() function can be used to limit the search results to places with the specified categories.

If the QGeoServiceProvider supports it, categories can be created and removed. This functionality is available in the QPlaceManager class.

__init__()

Constructs a category.

__init__(other)
Parameters:

otherQPlaceCategory

Constructs a category which is a copy of other.

categoryId()
Return type:

str

Returns the identifier of the category. The category identifier is a string which uniquely identifies this category within a particular QPlaceManager . The identifier is only meaningful to the QPlaceManager that generated it and is not transferable between managers.

See also

setCategoryId()

icon()
Return type:

QPlaceIcon

Returns the icon associated with the category.

See also

setIcon()

isEmpty()
Return type:

bool

Returns a boolean indicating whether the all the fields of the place category are empty or not.

name()
Return type:

str

Returns the name of category.

See also

setName()

__ne__(rhs)
Parameters:

rhsQPlaceCategory

Return type:

bool

Returns true if lhs is not equal to rhs; otherwise returns false.

__eq__(rhs)
Parameters:

rhsQPlaceCategory

Return type:

bool

Returns true if lhs is equal to rhs; otherwise returns false.

setCategoryId(identifier)
Parameters:

identifier – str

Sets the identifier of the category.

See also

categoryId()

setIcon(icon)
Parameters:

iconQPlaceIcon

Sets the icon of the category.

See also

icon()

setName(name)
Parameters:

name – str

Sets the name of the category.

See also

name()

swap(other)
Parameters:

otherQPlaceCategory