Skip to content

Commit

Permalink
Docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 11, 2018
1 parent b60cf05 commit a481687
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
Expand Up @@ -42,6 +42,11 @@ namespace QgsGeometryCheckerUtils
}
}

const QgsFeature &LayerFeature::feature() const
{
return mFeature;
}

QPointer<QgsVectorLayer> LayerFeature::layer() const
{
return mFeaturePool->layerPtr();
Expand All @@ -55,7 +60,6 @@ namespace QgsGeometryCheckerUtils
const QgsGeometry &LayerFeature::geometry() const
{
return mGeometry;

}

QString LayerFeature::id() const
Expand Down
31 changes: 30 additions & 1 deletion src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.h
Expand Up @@ -33,15 +33,44 @@ namespace QgsGeometryCheckerUtils
class LayerFeature
{
public:

/**
* Create a new layer/feature combination.
* The layer is defined by \a pool, \a feature needs to be from this layer.
* If \a useMapCrs is True, geometries will be reprojected to the mapCrs defined
* in \a context.
*/
LayerFeature( const QgsFeaturePool *pool, const QgsFeature &feature, QgsGeometryCheckerContext *context, bool useMapCrs );
const QgsFeature &feature() const { return mFeature; }

/**
* Returns the feature.
* The geometry will not be reprojected regardless of useMapCrs.
*/
const QgsFeature &feature() const;

/**
* The layer.
*/
QPointer<QgsVectorLayer> layer() const;

/**
* The layer id.
*/
QString layerId() const;

/**
* Returns the geometry of this feature.
* If useMapCrs was specified, it will already be reprojected into the
* CRS specified in the context specified in the constructor.
*/
const QgsGeometry &geometry() const;
QString id() const;
bool operator==( const LayerFeature &other ) const;
bool operator!=( const LayerFeature &other ) const;

/**
* Returns if the geometry is reprojected to the map CRS or not.
*/
bool useMapCrs() const;

private:
Expand Down

0 comments on commit a481687

Please sign in to comment.