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 中引入。
枚举 QLocation::Visibility
标志 QLocation::VisibilityScope
定义QPlace 或QPlaceCategory 的可见性。
常量 | 值 | 说明 |
---|---|---|
QLocation::UnspecifiedVisibility | 0x00 | 未定义明确的可见性。 |
QLocation::DeviceVisibility | 0x01 | 具有设备可见性(DeviceVisibility)的位置和类别只存储在本地设备上。 |
QLocation::PrivateVisibility | 0x02 | 具有私人可见性(PrivateVisibility)的地点和类别只对当前用户可见。数据可以存储在本地或远程服务中,也可以同时存储在本地和远程服务中。 |
QLocation::PublicVisibility | 0x04 | 具有公共可见性的地点和类别对所有人可见。 |
一个特定的管理器可以支持一个或多个可见性范围。例如,一个提供商的管理器可能只提供对所有人公开的地点,而另一个提供商可能同时提供公开和私人地点。
注: 未指定可见性的含义取决于使用的上下文。
保存地点或类别时,默认可见性为未指定,这意味着管理者会为项目选择一个适当的可见性范围。
在搜索地点时,未指定意味着会返回任何范围的地点。
VisibilityScope 类型是QFlags<Visibility> 的类型定义。它存储可见性值的 OR 组合。
© 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.