QLocation Namespace

The QLocation namespace contains miscellaneous identifiers used throughout the QtLocation 模块。 更多...

头: #include <QLocation>
qmake: QT += location

类型

(从 6.6 起) 枚举类 ReferenceSurface { Map, Globe }
enum Visibility { UnspecifiedVisibility, DeviceVisibility, PrivateVisibility, PublicVisibility }
flags VisibilityScope

详细描述

类型文档编制

[since 6.6] enum class QLocation:: ReferenceSurface

Defines the reference surface on which various map items (e.g. polygons, polylines) are defined.

常量 值 描述
QLocation::ReferenceSurface::Map 0 Items are defined on a map. This means, e.g. for a polyline that nodes are connected with straight lines on the map.
QLocation::ReferenceSurface::Globe 1 Items are defined on the globe. This means, e.g. for a polyine that nodes are connected with circle sections that represent the shortest connection between points on a sphere. This connection is also known as great circle path.

该枚举在 Qt 6.6 引入。

enum QLocation:: Visibility
flags QLocation:: VisibilityScope

Defines the visibility of a QPlace or QPlaceCategory .

常量 值 描述
QLocation::UnspecifiedVisibility 0x00 No explicit visibility has been defined.
QLocation::DeviceVisibility 0x01 Places and categories with DeviceVisibility are only stored on the local device.
QLocation::PrivateVisibility 0x02 Places and categories with PrivateVisibility are only visible to the current user. The data may be stored either locally or on a remote service or both.
QLocation::PublicVisibility 0x04 Places and categories with PublicVisibility are visible to everyone.

A particular manager may support one or more visibility scopes. For example a manager from one provider may only provide places that are public to everyone, whilst another may provide both public and private places.

注意: The meaning of unspecified visibility depends on the context it is used.

当 saving a place or category, the default visibility is unspecified meaning that the manager chooses an appropriate visibility scope for the item.

当 searching for places, unspecified means that places of any scope is returned.

The VisibilityScope type is a typedef for QFlags <Visibility>. It stores an OR combination of Visibility values.