QPlaceSupplier Class

QPlaceSupplier 类表示地点或与地点相关内容的供应商。更多

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

属性

公共职能

QPlaceSupplier()
QPlaceSupplier(const QPlaceSupplier &other)
~QPlaceSupplier()
QPlaceIcon icon() const
bool isEmpty() const
QString name() const
void setIcon(const QPlaceIcon &icon)
void setName(const QString &name)
void setSupplierId(const QString &identifier)
void setUrl(const QUrl &url)
QString supplierId() const
QUrl url() const
QPlaceSupplier &operator=(const QPlaceSupplier &other)
bool operator!=(const QPlaceSupplier &lhs, const QPlaceSupplier &rhs)
bool operator==(const QPlaceSupplier &lhs, const QPlaceSupplier &rhs)

详细说明

每个实例代表一组有关供应商的数据,包括供应商名称、网址和图标。供应商通常是企业或组织。

注意:Places API 仅支持供应商作为 "仅检索 "对象。不支持将供应商提交给提供商的用例。

属性文档

icon : QPlaceIcon

该属性包含供应商的图标。

访问功能:

QPlaceIcon icon() const
void setIcon(const QPlaceIcon &icon)

name : QString

该属性包含可显示给用户的供应商名称。

该名称可以本地化。语言取决于设置它的实体,通常是QPlaceManagerQPlaceManager::locales() 字段定义了使用的语言。

访问功能:

QString name() const
void setName(const QString &name)

supplierId : QString

该属性包含供应商的标识符。

该标识符对于提供供应商的管理器后台来说是唯一的,一般不适合显示给用户。

访问功能:

QString supplierId() const
void setSupplierId(const QString &identifier)

url : QUrl

该属性包含供应商网站的 URL。

访问功能:

QUrl url() const
void setUrl(const QUrl &url)

成员函数文档

QPlaceSupplier::QPlaceSupplier()

构造一个新的供应商对象。

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

构造other 的副本。

[noexcept] QPlaceSupplier::~QPlaceSupplier()

销毁供应商对象。

bool QPlaceSupplier::isEmpty() const

如果地点供应商的所有字段都为 0,则返回 true;否则返回 false。

void QPlaceSupplier::setIcon(const QPlaceIcon &icon)

设置供应商的icon

注: 属性icon 的设置函数。

另请参阅 icon()。

void QPlaceSupplier::setName(const QString &name)

设置供应商的name

注: 属性name 的设置函数。

另请参阅 name()。

void QPlaceSupplier::setSupplierId(const QString &identifier)

设置供应商的identifier

注: 属性supplierId 的设置函数。

另请参阅 supplierId()。

void QPlaceSupplier::setUrl(const QUrl &url)

设置供应商网站的url

注: 属性url 的设置函数。

另请参阅 url().

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

other 指定为该供应商,并返回对该供应商的引用。

相关非会员

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

如果lhs 不等于rhs ,则返回 true,否则返回 false。

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

如果lhs 等于rhs ,则返回 true,否则返回 false。

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