16 #ifndef QGSSNAPPINGUTILS_H 17 #define QGSSNAPPINGUTILS_H 135 void setSnapOnIntersections(
bool enabled );
146 void readConfigFromProject();
152 void configChanged();
161 void onLayersWillBeRemoved(
const QStringList& layerIds );
168 void clearAllLocators();
191 double mDefaultTolerance;
194 bool mSnapOnIntersection;
199 LocatorsMap mLocators;
201 LocatorsMap mTemporaryLocators;
214 int mHybridPerLayerFeatureLimit;
221 #endif // QGSSNAPPINGUTILS_H
The class defines interface for querying point location:
SnapToMapMode snapToMapMode() const
Find out how the snapping to map is done.
A rectangle specified with double values.
bool operator!=(const LayerConfig &other) const
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())
QList< LayerConfig > layers() const
Query layers used for snapping.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QgsVectorLayer * currentLayer() const
bool snapOnIntersections() const
Query whether to consider intersections of nearby segments for snapping.
LayerConfig(QgsVectorLayer *l, const QgsPointLocator::Types &t, double tol, QgsTolerance::UnitType u)
UnitType
Type of unit of tolerance value from settings.
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...
bool operator==(const LayerConfig &other) const
The QgsMapSettings class contains configuration for rendering of the map.
For all layers build index of full extent. Uses more memory, but queries are faster.
QgsTolerance::UnitType unit
The units in which the tolerance is specified.
snap according to the configuration set in setLayers()
IndexingStrategy indexingStrategy() const
Find out which strategy is used for indexing - by default hybrid indexing is used.
A class to represent a point.
double tolerance
The range around snapping targets in which snapping should occur.
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...
QgsVectorLayer * layer
The layer to configure.
Configures how a certain layer should be handled in a snapping operation.
Class for storing a coordinate reference system (CRS)
This class has all the configuration of snapping and can return answers to snapping queries...
QgsPointLocator::Types type
To which geometry properties of this layers a snapping should happen.
const QgsMapSettings & mapSettings() const
snap just to current layer (tolerance and type from defaultSettings())
Represents a vector layer which manages a vector based data sets.
SnapToMapMode
modes for "snap to background"