| 
    QGIS API Documentation
    3.26.3-Buenos Aires (65e4edfdad)
    
   | 
 
 
 
 
Go to the documentation of this file.
   16 #ifndef QGSSNAPPINGUTILS_H 
   17 #define QGSSNAPPINGUTILS_H 
   20 #include "qgis_core.h" 
  170     QList<QgsSnappingUtils::LayerConfig> 
layers()
 const { 
return mLayers; }
 
  190     void setEnableSnappingForInvisibleFeature( 
bool enable );
 
  204       mExtraSnapLayers.insert( vl );
 
  217       mExtraSnapLayers.remove( vl );
 
  230       return mExtraSnapLayers;
 
  246     void toggleEnabled();
 
  263     void clearAllLocators();
 
  268     void onInitFinished( 
bool ok );
 
  271     void onIndividualLayerSettingsChanged( 
const QHash<QgsVectorLayer *, QgsSnappingConfig::IndividualLayerSettings> &layerSettings );
 
  280     typedef QPair< QgsVectorLayer *, QgsRectangle > LayerAndAreaOfInterest;
 
  285     void prepareIndex( 
const QList<LayerAndAreaOfInterest> &layers, 
bool relaxed );
 
  295     IndexingStrategy mStrategy = IndexHybrid;
 
  296     QList<LayerConfig> mLayers;
 
  299     typedef QMap<QgsVectorLayer *, QgsPointLocator *> LocatorsMap;
 
  301     LocatorsMap mLocators;
 
  303     LocatorsMap mTemporaryLocators;
 
  305     QSet<QString> mHybridNonindexableLayers;
 
  307     QSet<QgsVectorLayer *> mExtraSnapLayers;
 
  321     QHash<QString, double> mHybridMaxAreaPerLayer;
 
  323     int mHybridPerLayerFeatureLimit = 50000;
 
  326     bool mEnableSnappingForInvisibleFeature = 
true;
 
  330 #endif // QGSSNAPPINGUTILS_H 
  
void setIndexingStrategy(IndexingStrategy strategy)
Sets a strategy for indexing geometry data - determines how fast and memory consuming the data struct...
 
double tolerance
The range around snapping targets in which snapping should occur.
 
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
 
void addExtraSnapLayer(QgsVectorLayer *vl)
Supply an extra snapping layer (typically a memory layer).
 
QgsMapSettings mapSettings() const
 
A rectangle specified with double values.
 
QgsVectorLayer * currentLayer() const
The current layer used if mode is SnapCurrentLayer.
 
@ IndexHybrid
For "big" layers using IndexNeverFull, for the rest IndexAlwaysFull. Compromise between speed and mem...
 
UnitType
Type of unit of tolerance value from settings.
 
virtual void prepareIndexStarting(int count)
Called when starting to index with snapToMap - can be overridden and e.g. progress dialog can be prov...
 
@ IndexNeverFull
For all layers only create temporary indexes of small extent. Low memory usage, slower queries.
 
QSet< QgsVectorLayer * > getExtraSnapLayers()
Returns the list of extra snapping layers.
 
This is a container for configuration of the snapping of the project.
 
bool operator==(const QgsSnappingUtils::LayerConfig &other) const
 
@ IndexAlwaysFull
For all layers build index of full extent. Uses more memory, but queries are faster.
 
This class represents a coordinate reference system (CRS).
 
This class has all the configuration of snapping and can return answers to snapping queries.
 
QgsTolerance::UnitType unit
The units in which the tolerance is specified.
 
A class to represent a 2D point.
 
QList< QgsSnappingUtils::LayerConfig > layers() const
Query layers used for snapping.
 
IndexingStrategy indexingStrategy() const
Find out which strategy is used for indexing - by default hybrid indexing is used.
 
Represents a vector layer which manages a vector based data sets.
 
The class defines interface for querying point location:
 
Interface that allows rejection of some matches in intersection queries (e.g.
 
QgsVectorLayer * layer
The layer to configure.
 
bool operator!=(const QgsSnappingUtils::LayerConfig &other) const
 
LayerConfig(QgsVectorLayer *l, QgsPointLocator::Types t, double tol, QgsTolerance::UnitType u)
Create a new configuration for a snapping layer.
 
void removeExtraSnapLayer(QgsVectorLayer *vl)
Removes an extra snapping layer.
 
The QgsMapSettings class contains configuration for rendering of the map. The rendering itself is don...
 
QgsPointLocator::Types type
To which geometry properties of this layers a snapping should happen.
 
Configures how a certain layer should be handled in a snapping operation.
 
virtual void prepareIndexProgress(int index)
Called when finished indexing a layer with snapToMap. When index == count the indexing is complete.