QGeoShape Class
The QGeoShape class defines a geographic area. More...
Header: | #include <QGeoShape> |
qmake: | QT += positioning |
Since: | Qt 5.2 |
Inherited By: | QGeoCircle and QGeoRectangle. |
Public Types
enum | ShapeType { UnknownType, RectangleType, CircleType } |
Public Functions
QGeoShape() | |
QGeoShape(const QGeoShape & other) | |
~QGeoShape() | |
bool | contains(const QGeoCoordinate & coordinate) const |
void | extendShape(const QGeoCoordinate & coordinate) |
bool | isEmpty() const |
bool | isValid() const |
ShapeType | type() const |
bool | operator!=(const QGeoShape & other) const |
QGeoShape & | operator=(const QGeoShape & other) |
bool | operator==(const QGeoShape & other) const |
Detailed Description
The QGeoShape class defines a geographic area.
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.
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. |
Member Function Documentation
QGeoShape::QGeoShape()
Constructs a new invalid geo shape of UnknownType.
QGeoShape::QGeoShape(const QGeoShape & other)
Constructs a new geo shape which is a copy of other.
QGeoShape::~QGeoShape()
Destroys this geo shape.
bool QGeoShape::contains(const QGeoCoordinate & coordinate) const
Returns whether the coordinate coordinate is contained within this geo shape.
void QGeoShape::extendShape(const QGeoCoordinate & coordinate)
Extends the geo shape to also cover the coordinate coordinate
bool QGeoShape::isEmpty() const
Returns whether this geo shape is empty.
An empty geo shape is a region which has a geometrical area of 0.
bool QGeoShape::isValid() const
Returns whether this geo shape is valid.
An 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.
ShapeType QGeoShape::type() const
Returns the type of this geo shape.
bool QGeoShape::operator!=(const QGeoShape & other) const
Returns true if the other geo shape is not equivalent to this geo shape, otherwise returns false.
QGeoShape & QGeoShape::operator=(const QGeoShape & other)
Assigns other to this geo shape and returns a reference to this geo shape.
bool QGeoShape::operator==(const QGeoShape & other) const
Returns true if the other geo shape is equivalent to this geo shape, otherwise returns false.
© 2015 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.