Skip to content

Class QgsGeometryWrapper

ClassList > QgsGeometryWrapper

The QgsGeometryWrapper class wraps QGIS geometry and CRS classes to have their contents available from QML.

  • #include <qgsgeometrywrapper.h>

Inherits the following classes: QObject

Public Properties

Type Name
property QgsCoordinateReferenceSystem crs
property QgsGeometry qgsGeometry

Public Signals

Type Name
signal void crsChanged
signal void qgsGeometryChanged

Public Functions

Type Name
QgsGeometryWrapper (QObject * parent=nullptr)
QgsGeometryWrapper (const QgsGeometry & geometry, QgsCoordinateReferenceSystem crs, QObject * parent=nullptr)
Q_INVOKABLE void clear ()
Clear the wrapper by setting empty geometry and invalid CRS.
QgsCoordinateReferenceSystem crs () const
Q_INVOKABLE QVariantList pointList () const
Returns a list of points if the geometry has point type (point, multipoint), an empty list otherwise.
QgsGeometry qgsGeometry () const
void setCrs (const QgsCoordinateReferenceSystem & crs)
void setQgsGeometry (const QgsGeometry & qgsGeometry)

Public Properties Documentation

property crs [1/2]

QgsCoordinateReferenceSystem QgsGeometryWrapper::crs;

property qgsGeometry [1/2]

QgsGeometry QgsGeometryWrapper::qgsGeometry;

Public Signals Documentation

signal crsChanged

void QgsGeometryWrapper::crsChanged;

signal qgsGeometryChanged

void QgsGeometryWrapper::qgsGeometryChanged;

Public Functions Documentation

function QgsGeometryWrapper [1/2]

inline explicit QgsGeometryWrapper::QgsGeometryWrapper (
    QObject * parent=nullptr
) 

function QgsGeometryWrapper [2/2]

inline QgsGeometryWrapper::QgsGeometryWrapper (
    const QgsGeometry & geometry,
    QgsCoordinateReferenceSystem crs,
    QObject * parent=nullptr
) 

function clear

Clear the wrapper by setting empty geometry and invalid CRS.

Q_INVOKABLE void QgsGeometryWrapper::clear () 

function crs [2/2]

QgsCoordinateReferenceSystem QgsGeometryWrapper::crs () const

function pointList

Returns a list of points if the geometry has point type (point, multipoint), an empty list otherwise.

Q_INVOKABLE QVariantList QgsGeometryWrapper::pointList () const

function qgsGeometry [2/2]

QgsGeometry QgsGeometryWrapper::qgsGeometry () const

function setCrs

void QgsGeometryWrapper::setCrs (
    const QgsCoordinateReferenceSystem & crs
) 

function setQgsGeometry

void QgsGeometryWrapper::setQgsGeometry (
    const QgsGeometry & qgsGeometry
) 


The documentation for this class was generated from the following file src/core/qgsgeometrywrapper.h