16#ifndef QGSSNAPPINGUTILS_H 
   17#define QGSSNAPPINGUTILS_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;
 
 
MapToolUnit
Type of unit of tolerance value from settings.
 
This class represents a coordinate reference system (CRS).
 
The QgsMapSettings class contains configuration for rendering of the map.
 
The class defines interface for querying point location:
 
A class to represent a 2D point.
 
A rectangle specified with double values.
 
This is a container for configuration of the snapping of the project.
 
This class has all the configuration of snapping and can return answers to snapping queries.
 
@ IndexAlwaysFull
For all layers build index of full extent. Uses more memory, but queries are faster.
 
@ IndexHybrid
For "big" layers using IndexNeverFull, for the rest IndexAlwaysFull. Compromise between speed and mem...
 
@ IndexNeverFull
For all layers only create temporary indexes of small extent. Low memory usage, slower queries.
 
QgsMapSettings mapSettings() const
 
QSet< QgsVectorLayer * > getExtraSnapLayers()
Returns the list of extra snapping layers.
 
void addExtraSnapLayer(QgsVectorLayer *vl)
Supply an extra snapping layer (typically a memory layer).
 
virtual void prepareIndexProgress(int index)
Called when finished indexing a layer with snapToMap. When index == count the indexing is complete.
 
IndexingStrategy indexingStrategy() const
Find out which strategy is used for indexing - by default hybrid indexing is used.
 
void configChanged(const QgsSnappingConfig &snappingConfig)
Emitted when the snapping settings object changes.
 
void removeExtraSnapLayer(QgsVectorLayer *vl)
Removes an extra snapping layer.
 
void setIndexingStrategy(IndexingStrategy strategy)
Sets a strategy for indexing geometry data - determines how fast and memory consuming the data struct...
 
QgsVectorLayer * currentLayer() const
The current layer used if mode is SnapCurrentLayer.
 
QList< QgsSnappingUtils::LayerConfig > layers() const
Query layers used for snapping.
 
virtual void prepareIndexStarting(int count)
Called when starting to index with snapToMap - can be overridden and e.g. progress dialog can be prov...
 
Represents a vector layer which manages a vector based data sets.
 
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
 
Interface that allows rejection of some matches in intersection queries (e.g.
 
Configures how a certain layer should be handled in a snapping operation.
 
bool operator!=(const QgsSnappingUtils::LayerConfig &other) const
 
double tolerance
The range around snapping targets in which snapping should occur.
 
LayerConfig(QgsVectorLayer *l, QgsPointLocator::Types t, double tol, Qgis::MapToolUnit u)
Create a new configuration for a snapping layer.
 
QgsPointLocator::Types type
To which geometry properties of this layers a snapping should happen.
 
QgsVectorLayer * layer
The layer to configure.
 
Qgis::MapToolUnit unit
The units in which the tolerance is specified.
 
bool operator==(const QgsSnappingUtils::LayerConfig &other) const