Skip to content

Commit a481687

Browse files
committed
Docstrings
1 parent b60cf05 commit a481687

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ namespace QgsGeometryCheckerUtils
4242
}
4343
}
4444

45+
const QgsFeature &LayerFeature::feature() const
46+
{
47+
return mFeature;
48+
}
49+
4550
QPointer<QgsVectorLayer> LayerFeature::layer() const
4651
{
4752
return mFeaturePool->layerPtr();
@@ -55,7 +60,6 @@ namespace QgsGeometryCheckerUtils
5560
const QgsGeometry &LayerFeature::geometry() const
5661
{
5762
return mGeometry;
58-
5963
}
6064

6165
QString LayerFeature::id() const

src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.h

+30-1
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,44 @@ namespace QgsGeometryCheckerUtils
3333
class LayerFeature
3434
{
3535
public:
36+
37+
/**
38+
* Create a new layer/feature combination.
39+
* The layer is defined by \a pool, \a feature needs to be from this layer.
40+
* If \a useMapCrs is True, geometries will be reprojected to the mapCrs defined
41+
* in \a context.
42+
*/
3643
LayerFeature( const QgsFeaturePool *pool, const QgsFeature &feature, QgsGeometryCheckerContext *context, bool useMapCrs );
37-
const QgsFeature &feature() const { return mFeature; }
44+
45+
/**
46+
* Returns the feature.
47+
* The geometry will not be reprojected regardless of useMapCrs.
48+
*/
49+
const QgsFeature &feature() const;
50+
51+
/**
52+
* The layer.
53+
*/
3854
QPointer<QgsVectorLayer> layer() const;
55+
56+
/**
57+
* The layer id.
58+
*/
3959
QString layerId() const;
60+
61+
/**
62+
* Returns the geometry of this feature.
63+
* If useMapCrs was specified, it will already be reprojected into the
64+
* CRS specified in the context specified in the constructor.
65+
*/
4066
const QgsGeometry &geometry() const;
4167
QString id() const;
4268
bool operator==( const LayerFeature &other ) const;
4369
bool operator!=( const LayerFeature &other ) const;
4470

71+
/**
72+
* Returns if the geometry is reprojected to the map CRS or not.
73+
*/
4574
bool useMapCrs() const;
4675

4776
private:

0 commit comments

Comments
 (0)