@@ -72,13 +72,16 @@ class CORE_EXPORT QgsPointLocator : public QObject
72
72
// ! @note added in QGIS 2.14
73
73
void setExtent ( const QgsRectangle* extent );
74
74
75
+ /* *
76
+ * The type of a snap result or the filter type for a snap request.
77
+ */
75
78
enum Type
76
79
{
77
- Invalid = 0 ,
78
- Vertex = 1 ,
79
- Edge = 2 ,
80
- Area = 4 ,
81
- All = Vertex | Edge | Area
80
+ Invalid = 0 , // !< Invalid
81
+ Vertex = 1 , // !< Snapped to a vertex. Can be a vertex of the geometry or an intersection.
82
+ Edge = 2 , // !< Snapped to an edge
83
+ Area = 4 , // !< Snapped to an area
84
+ All = Vertex | Edge | Area // !< Conmbination of vertex, edge and area
82
85
};
83
86
84
87
Q_DECLARE_FLAGS ( Types, Type )
@@ -125,9 +128,15 @@ class CORE_EXPORT QgsPointLocator : public QObject
125
128
// ! for vertex / edge match (first vertex of the edge)
126
129
int vertexIndex () const { return mVertexIndex ; }
127
130
128
- // ! reference vector layer
131
+ /* *
132
+ * The vector layer where the snap occurred.
133
+ * Will be null if the snap happened on an intersection.
134
+ */
129
135
QgsVectorLayer* layer () const { return mLayer ; }
130
136
137
+ /* *
138
+ * The id of the feature to which the snapped geometry belongs.
139
+ */
131
140
QgsFeatureId featureId () const { return mFid ; }
132
141
133
142
// ! Only for a valid edge match - obtain endpoints of the edge
0 commit comments