内容表

上一话题

QGeoSatelliteInfoSource

下一话题

QNmeaPositionInfoSource

QGeoShape

QGeoShape class defines a geographic area. 更多

Inheritance diagram of PySide2.QtPositioning.QGeoShape

继承者: QGeoCircle , QGeoPath , QGeoPolygon , QGeoRectangle

概要

函数

详细描述

This class is the base class for classes which specify a geographic area.

For the sake of consistency, subclasses should describe the specific details of the associated areas in terms of QGeoCoordinate instances and distances in meters.

This class is a Q_GADGET since Qt 5.5. It can be directly used from C++ and QML .

class QGeoShape

QGeoShape(other)

param other

QGeoShape

Constructs a new invalid geo shape of UnknownType .

Constructs a new geo shape which is a copy of other .

PySide2.QtPositioning.QGeoShape. ShapeType

Describes the type of the shape.

常量

描述

QGeoShape.UnknownType

A shape of unknown type

QGeoShape.RectangleType

A rectangular shape

QGeoShape.CircleType

A circular shape

QGeoShape.PathType

A path type

QGeoShape.PolygonType

A polygon type

PySide2.QtPositioning.QGeoShape. boundingGeoRectangle ( )
返回类型

QGeoRectangle

返回 QGeoRectangle representing the geographical bounding rectangle of the geo shape, that defines the latitudinal/longitudinal bounds of the geo shape.

PySide2.QtPositioning.QGeoShape. center ( )
返回类型

QGeoCoordinate

Returns the coordinate located at the geometric center of the geo shape.

PySide2.QtPositioning.QGeoShape. contains ( coordinate )
参数

coordinate QGeoCoordinate

返回类型

bool

Returns whether the coordinate coordinate is contained within this geo shape.

PySide2.QtPositioning.QGeoShape. extendShape ( coordinate )
参数

coordinate QGeoCoordinate

This method used to extend the geo shape to also cover the coordinate coordinate .

It currently only works for QGeoCircle and QGeoRectangle , on which the functionality remains, now also accessible through extendCircle and extendRectangle .

This method should therefore not be called on a generic QGeoShape any longer, as the behavior for other shape types is undefined.

PySide2.QtPositioning.QGeoShape. isEmpty ( )
返回类型

bool

Returns whether this geo shape is empty.

An empty geo shape is a region which has a geometrical area of 0.

PySide2.QtPositioning.QGeoShape. isValid ( )
返回类型

bool

Returns whether this geo shape is valid.

PySide2.QtPositioning.QGeoShape. __ne__ ( other )
参数

other QGeoShape

返回类型

bool

返回 true 若 other geo shape is not equivalent to this geo shape, otherwise returns false.

PySide2.QtPositioning.QGeoShape. __eq__ ( other )
参数

other QGeoShape

返回类型

bool

返回 true 若 other geo shape is equivalent to this geo shape, otherwise returns false.

PySide2.QtPositioning.QGeoShape. toString ( )
返回类型

unicode

Returns a string representation of this geo shape.

PySide2.QtPositioning.QGeoShape. type ( )
返回类型

ShapeType

Returns the type of this geo shape.