16 #ifndef QGSSNAPPINGUTILS_H
17 #define QGSSNAPPINGUTILS_H
125 void readConfigFromProject();
134 void onLayersWillBeRemoved(
QStringList layerIds );
141 void clearAllLocators();
159 SnapToMapMode mSnapToMapMode;
160 IndexingStrategy mStrategy;
162 double mDefaultTolerance;
165 bool mSnapOnIntersection;
170 LocatorsMap mLocators;
172 LocatorsMap mTemporaryLocators;
178 #endif // QGSSNAPPINGUTILS_H
SnapToMapMode snapToMapMode() const
Find out how the snapping to map is done.
The class defines interface for querying point location:
void setSnapOnIntersections(bool enabled)
Set whether to consider intersections of nearby segments for snapping.
void setCurrentLayer(QgsVectorLayer *layer)
set current layer so that if mode is SnapCurrentLayer we know which layer to use
virtual void prepareIndexProgress(int index)
Called when finished indexing a layer. When index == count the indexing is complete.
snap to all rendered layers (tolerance and type from defaultSettings())
UnitType
Type of unit of tolerance value from settings.
IndexingStrategy indexingStrategy() const
Find out which strategy is used for indexing - by default hybrid indexing is used.
Interface that allows rejection of some matches in intersection queries (e.g.
void setIndexingStrategy(IndexingStrategy strategy)
Set a strategy for indexing geometry data - determines how fast and memory consuming the data structu...
The QgsMapSettings class contains configuration for rendering of the map.
QList< LayerConfig > layers() const
Query layers used for snapping.
For all layers build index of full extent. Uses more memory, but queries are faster.
void setSnapToMapMode(SnapToMapMode mode)
Set how the snapping to map is done.
QgsTolerance::UnitType unit
bool snapOnIntersections() const
Query whether to consider intersections of nearby segments for snapping.
snap according to the configuration set in setLayers()
A class to represent a point.
const QgsMapSettings & mapSettings() const
For all layers only create temporary indexes of small extent. Low memory usage, slower queries...
virtual void prepareIndexStarting(int count)
Called when starting to index - can be overridden and e.g. progress dialog can be provided...
Class for storing a coordinate reference system (CRS)
This class has all the configuration of snapping and can return answers to snapping queries...
LayerConfig(QgsVectorLayer *l, int t, double tol, QgsTolerance::UnitType u)
QgsVectorLayer * currentLayer() const
snap just to current layer (tolerance and type from defaultSettings())
Represents a vector layer which manages a vector based data sets.
void setLayers(const QList< LayerConfig > &layers)
Set layers which will be used for snapping.
SnapToMapMode
modes for "snap to background"