Nesta página

QPlaceCategory Class

A classe QPlaceCategory representa uma categoria à qual um objeto ` QPlace ` pode ser associado. Mais...

Header: #include <QPlaceCategory>
qmake: QT += location

Funções públicas

QPlaceCategory()
QPlaceCategory(const QPlaceCategory &other)
QPlaceCategory(QPlaceCategory &&other)
~QPlaceCategory()
QString categoryId() const
QPlaceIcon icon() const
bool isEmpty() const
QString name() const
void setCategoryId(const QString &identifier)
void setIcon(const QPlaceIcon &icon)
void setName(const QString &name)
void setVisibility(QLocation::Visibility visibility)
QLocation::Visibility visibility() const
QPlaceCategory &operator=(const QPlaceCategory &other)
bool operator!=(const QPlaceCategory &lhs, const QPlaceCategory &rhs)
bool operator==(const QPlaceCategory &lhs, const QPlaceCategory &rhs)

Descrição detalhada

As categorias são usadas para pesquisar locais com base nas categorias às quais estão associados. A lista/árvore de categorias disponíveis pode ser obtida em QPlaceManager. A função QPlaceSearchRequest::setCategories() pode ser usada para limitar os resultados da pesquisa aos locais com as categorias especificadas.

Se o QGeoServiceProvider for compatível, é possível criar e remover categorias. Essa funcionalidade está disponível na classe QPlaceManager.

Documentação das funções-membro

QPlaceCategory::QPlaceCategory()

Cria uma categoria.

[noexcept] QPlaceCategory::QPlaceCategory(const QPlaceCategory &other)

Cria uma categoria que é uma cópia de other.

[constexpr noexcept default] QPlaceCategory::QPlaceCategory(QPlaceCategory &&other)

Move cria uma instância de ` QPlaceCategory`.

[noexcept] QPlaceCategory::~QPlaceCategory()

Exclui a categoria.

QString QPlaceCategory::categoryId() const

Retorna o identificador da categoria. O identificador da categoria é uma sequência de caracteres que identifica essa categoria de forma exclusiva dentro de um determinado QPlaceManager. O identificador só tem significado para o QPlaceManager que o gerou e não é transferível entre gerentes.

Veja também setCategoryId().

QPlaceIcon QPlaceCategory::icon() const

Retorna o ícone associado à categoria.

Veja também setIcon().

bool QPlaceCategory::isEmpty() const

Retorna um valor booleano que indica se todos os campos da categoria do local estão vazios ou não.

QString QPlaceCategory::name() const

Retorna o nome da categoria.

Veja também setName().

void QPlaceCategory::setCategoryId(const QString &identifier)

Define o identifier da categoria.

Veja também categoryId().

void QPlaceCategory::setIcon(const QPlaceIcon &icon)

Define o icon da categoria.

Veja também icon().

void QPlaceCategory::setName(const QString &name)

Define o name da categoria.

Veja também name().

void QPlaceCategory::setVisibility(QLocation::Visibility visibility)

Define o “ visibility ” da categoria.

Veja também visibility().

QLocation::Visibility QPlaceCategory::visibility() const

Retorna a visibilidade da categoria.

Veja também setVisibility().

[noexcept] QPlaceCategory &QPlaceCategory::operator=(const QPlaceCategory &other)

Atribui ` other ` a esta categoria e retorna uma referência a esta categoria.

Não-membros relacionados

[noexcept] bool operator!=(const QPlaceCategory &lhs, const QPlaceCategory &rhs)

Retorna `true` se ` lhs ` não for igual a ` rhs`; caso contrário, retorna `false`.

[noexcept] bool operator==(const QPlaceCategory &lhs, const QPlaceCategory &rhs)

Retorna `true` se ` lhs ` for igual a ` rhs`; caso contrário, retorna `false`.

© 2026 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.