16#ifndef QGSSNAPPINGUTILS_H 
   17#define QGSSNAPPINGUTILS_H 
  169    QList<QgsSnappingUtils::LayerConfig> 
layers()
 const { 
return mLayers; }
 
  188    void setEnableSnappingForInvisibleFeature( 
bool enable );
 
  202      mExtraSnapLayers.insert( vl );
 
 
  215      mExtraSnapLayers.remove( vl );
 
 
  228      return mExtraSnapLayers;
 
 
  243    void toggleEnabled();
 
  260    void clearAllLocators();
 
  265    void onInitFinished( 
bool ok );
 
  268    void onIndividualLayerSettingsChanged( 
const QHash<QgsVectorLayer *, QgsSnappingConfig::IndividualLayerSettings> &layerSettings );
 
  277    typedef QPair< QgsVectorLayer *, QgsRectangle > LayerAndAreaOfInterest;
 
  282    void prepareIndex( 
const QList<LayerAndAreaOfInterest> &layers, 
bool relaxed );
 
  292    IndexingStrategy mStrategy = IndexHybrid;
 
  293    QList<LayerConfig> mLayers;
 
  296    typedef QMap<QgsVectorLayer *, QgsPointLocator *> LocatorsMap;
 
  298    LocatorsMap mLocators;
 
  300    LocatorsMap mTemporaryLocators;
 
  302    QSet<QString> mHybridNonindexableLayers;
 
  304    QSet<QgsVectorLayer *> mExtraSnapLayers;
 
  318    QHash<QString, double> mHybridMaxAreaPerLayer;
 
  320    int mHybridPerLayerFeatureLimit = 50000;
 
  323    bool mEnableSnappingForInvisibleFeature = 
true;
 
  325    friend class TestQgsSnappingUtils;
 
 
MapToolUnit
Type of unit of tolerance value from settings.
 
Represents a coordinate reference system (CRS).
 
Contains configuration for rendering maps.
 
Defines the interface for querying point locations.
 
A rectangle specified with double values.
 
Stores configuration of snapping settings for the project.
 
Contains 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 dataset.
 
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