QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Protected Attributes | List of all members
QgsPointLocator::Match Struct Reference

#include <qgspointlocator.h>

Public Member Functions

 Match ()
 construct invalid match More...
 
 Match (Type t, QgsVectorLayer *vl, QgsFeatureId fid, double dist, const QgsPoint &pt, int vertexIndex=0, QgsPoint *edgePoints=nullptr)
 
double distance () const
 for vertex / edge match units depending on what class returns it (geom.cache: layer units, map canvas snapper: dest crs units) More...
 
void edgePoints (QgsPoint &pt1, QgsPoint &pt2) const
 Only for a valid edge match - obtain endpoints of the edge. More...
 
QgsFeatureId featureId () const
 The id of the feature to which the snapped geometry belongs. More...
 
bool hasArea () const
 
bool hasEdge () const
 
bool hasVertex () const
 
bool isValid () const
 
QgsVectorLayerlayer () const
 The vector layer where the snap occurred. More...
 
QgsPoint point () const
 for vertex / edge match coords depending on what class returns it (geom.cache: layer coords, map canvas snapper: dest coords) More...
 
Type type () const
 
int vertexIndex () const
 for vertex / edge match (first vertex of the edge) More...
 

Protected Attributes

double mDist
 
QgsPoint mEdgePoints [2]
 
QgsFeatureId mFid
 
QgsVectorLayermLayer
 
QgsPoint mPoint
 
Type mType
 
int mVertexIndex
 

Detailed Description

Definition at line 98 of file qgspointlocator.h.

Constructor & Destructor Documentation

◆ Match() [1/2]

QgsPointLocator::Match::Match ( )
inline

construct invalid match

Definition at line 101 of file qgspointlocator.h.

◆ Match() [2/2]

QgsPointLocator::Match::Match ( Type  t,
QgsVectorLayer vl,
QgsFeatureId  fid,
double  dist,
const QgsPoint pt,
int  vertexIndex = 0,
QgsPoint edgePoints = nullptr 
)
inline

Definition at line 110 of file qgspointlocator.h.

Member Function Documentation

◆ distance()

double QgsPointLocator::Match::distance ( ) const
inline

for vertex / edge match units depending on what class returns it (geom.cache: layer units, map canvas snapper: dest crs units)

Definition at line 134 of file qgspointlocator.h.

◆ edgePoints()

void QgsPointLocator::Match::edgePoints ( QgsPoint pt1,
QgsPoint pt2 
) const
inline

Only for a valid edge match - obtain endpoints of the edge.

Definition at line 155 of file qgspointlocator.h.

◆ featureId()

QgsFeatureId QgsPointLocator::Match::featureId ( ) const
inline

The id of the feature to which the snapped geometry belongs.

Definition at line 152 of file qgspointlocator.h.

◆ hasArea()

bool QgsPointLocator::Match::hasArea ( ) const
inline

Definition at line 130 of file qgspointlocator.h.

◆ hasEdge()

bool QgsPointLocator::Match::hasEdge ( ) const
inline

Definition at line 129 of file qgspointlocator.h.

◆ hasVertex()

bool QgsPointLocator::Match::hasVertex ( ) const
inline

Definition at line 128 of file qgspointlocator.h.

◆ isValid()

bool QgsPointLocator::Match::isValid ( ) const
inline

Definition at line 127 of file qgspointlocator.h.

◆ layer()

QgsVectorLayer* QgsPointLocator::Match::layer ( ) const
inline

The vector layer where the snap occurred.

Will be null if the snap happened on an intersection.

Definition at line 147 of file qgspointlocator.h.

◆ point()

QgsPoint QgsPointLocator::Match::point ( ) const
inline

for vertex / edge match coords depending on what class returns it (geom.cache: layer coords, map canvas snapper: dest coords)

Definition at line 138 of file qgspointlocator.h.

◆ type()

Type QgsPointLocator::Match::type ( ) const
inline

Definition at line 125 of file qgspointlocator.h.

◆ vertexIndex()

int QgsPointLocator::Match::vertexIndex ( ) const
inline

for vertex / edge match (first vertex of the edge)

Definition at line 141 of file qgspointlocator.h.

Member Data Documentation

◆ mDist

double QgsPointLocator::Match::mDist
protected

Definition at line 163 of file qgspointlocator.h.

◆ mEdgePoints

QgsPoint QgsPointLocator::Match::mEdgePoints[2]
protected

Definition at line 168 of file qgspointlocator.h.

◆ mFid

QgsFeatureId QgsPointLocator::Match::mFid
protected

Definition at line 166 of file qgspointlocator.h.

◆ mLayer

QgsVectorLayer* QgsPointLocator::Match::mLayer
protected

Definition at line 165 of file qgspointlocator.h.

◆ mPoint

QgsPoint QgsPointLocator::Match::mPoint
protected

Definition at line 164 of file qgspointlocator.h.

◆ mType

Type QgsPointLocator::Match::mType
protected

Definition at line 162 of file qgspointlocator.h.

◆ mVertexIndex

int QgsPointLocator::Match::mVertexIndex
protected

Definition at line 167 of file qgspointlocator.h.


The documentation for this struct was generated from the following file: