QGeoShape Class
The QGeoShape class defines a geographic area. More...
| Header: | #include <QGeoShape> |
| qmake: | QT += positioning |
| Since: | Qt 5.2 |
| Inherited By: |
This class was introduced in Qt 5.2.
Public Types
| enum | ShapeType { UnknownType, RectangleType, CircleType, PathType, PolygonType } |
Properties
Public Functions
Detailed Description
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.
Member Type Documentation
enum QGeoShape::ShapeType
Describes the type of the shape.
| Constant | Value | Description |
|---|---|---|
QGeoShape::UnknownType | 0 | A shape of unknown type |
QGeoShape::RectangleType | 1 | A rectangular shape |
QGeoShape::CircleType | 2 | A circular shape |
QGeoShape::PathType | 3 | A path type |
QGeoShape::PolygonType | 4 | A polygon type |
Property Documentation
isEmpty : const bool
This property defines whether this geo shape is empty.
An empty geo shape is a region which has a geometrical area of 0.
While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.
This property was introduced in Qt 5.5.
Access functions:
| bool | isEmpty() const |
isValid : const bool
This property holds the validity of the geo shape.
A geo shape is considered to be invalid if some of the data that is required to unambiguously describe the geo shape has not been set or has been set to an unsuitable value depending on the subclass of this object. The default constructed objects of this type are invalid.
While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.
This property was introduced in Qt 5.5.
Access functions:
| bool | isValid() const |
type : const ShapeType
This property holds the type of this geo shape.
While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.
This property was introduced in Qt 5.5.
Access functions:
| QGeoShape::ShapeType | type() const |