QLocation Namespace
QLocation 命名空间包含QtLocation 模块中广泛使用的各种标识符。更多内容...
| Header: | #include <QLocation> |
| qmake: | QT += location |
类型
(since 6.6) enum class | ReferenceSurface { Map, Globe } |
| enum | Visibility { UnspecifiedVisibility, DeviceVisibility, PrivateVisibility, PublicVisibility } |
| flags | VisibilityScope |
类型文档
[since 6.6] enum class QLocation::ReferenceSurface
定义了用于定义各种地图要素(例如多边形、折线)的参考面。
| 常量 | 值 | 描述 |
|---|---|---|
QLocation::ReferenceSurface::Map | 0 | 项目在地图上定义。这意味着,例如对于一条多线段,其节点在地图上通过直线连接。 |
QLocation::ReferenceSurface::Globe | 1 | 项目定义在地球上。这意味着,例如对于一条多线,其节点通过圆弧段连接,这些圆弧段代表球面上两点之间的最短连接路径。这种连接也称为大圆路径。 |
该枚举类型于 Qt 6.6 版本中引入。
enum QLocation::Visibility
flags QLocation::VisibilityScope
定义QPlace 或QPlaceCategory 的可见性。
| 常量 | 值 | 描述 |
|---|---|---|
QLocation::UnspecifiedVisibility | 0x00 | 未显式定义可见性。 |
QLocation::DeviceVisibility | 0x01 | 具有 DeviceVisibility 的地点和类别仅存储在本地设备上。 |
QLocation::PrivateVisibility | 0x02 | 具有 PrivateVisibility 的地点和类别仅对当前用户可见。数据可能存储在本地、远程服务上,或两者兼有。 |
QLocation::PublicVisibility | 0x04 | 具有 PublicVisibility 的地点和类别对所有人可见。 |
某个管理器可能支持一种或多种可见性范围。例如,某提供商的管理器可能只提供对所有人公开的地点,而另一提供商的管理器则可能同时提供公开和私有的地点。
注意: 未指定可见性的含义 取决于其使用上下文。
保存地点或类别时,默认可见性为“未指定”,这意味着管理器会为该项目选择适当的可见性范围。
在搜索地点时,“未指定”意味着将返回任何可见性范围的地点。
VisibilityScope 类型是QFlags<Visibility> 的 typedef。它存储 Visibility 值的 OR 组合。
© 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.