|
QGIS API Documentation
2.8.2-Wien
|
Snapping utils instance that is connected to a canvas and updates the configuration (map settings + current layer) whenever that is changed in the canvas. More...
#include <qgsmapcanvassnappingutils.h>

Public Member Functions | |
| QgsMapCanvasSnappingUtils (QgsMapCanvas *canvas, QObject *parent=0) | |
Public Member Functions inherited from QgsSnappingUtils | |
| QgsSnappingUtils (QObject *parent=0) | |
| ~QgsSnappingUtils () | |
| QgsVectorLayer * | currentLayer () const |
| void | defaultSettings (int &type, double &tolerance, QgsTolerance::UnitType &unit) |
| query options used when the mode is snap to current layer | |
| IndexingStrategy | indexingStrategy () const |
| Find out which strategy is used for indexing - by default hybrid indexing is used. | |
| QList< LayerConfig > | layers () const |
| Query layers used for snapping. | |
| QgsPointLocator * | locatorForLayer (QgsVectorLayer *vl) |
| get a point locator for the given layer. | |
| const QgsMapSettings & | mapSettings () const |
| void | setCurrentLayer (QgsVectorLayer *layer) |
| set current layer so that if mode is SnapCurrentLayer we know which layer to use | |
| void | setDefaultSettings (int type, double tolerance, QgsTolerance::UnitType unit) |
| configure options used when the mode is snap to current layer | |
| void | setIndexingStrategy (IndexingStrategy strategy) |
| Set a strategy for indexing geometry data - determines how fast and memory consuming the data structures will be. | |
| void | setLayers (const QList< LayerConfig > &layers) |
| Set layers which will be used for snapping. | |
| void | setMapSettings (const QgsMapSettings &settings) |
| assign current map settings to the utils - used for conversion between screen coords to map coords | |
| void | setSnapOnIntersections (bool enabled) |
| Set whether to consider intersections of nearby segments for snapping. | |
| void | setSnapToMapMode (SnapToMapMode mode) |
| Set how the snapping to map is done. | |
| bool | snapOnIntersections () const |
| Query whether to consider intersections of nearby segments for snapping. | |
| QgsPointLocator::Match | snapToCurrentLayer (const QPoint &point, int type, QgsPointLocator::MatchFilter *filter=0) |
| snap to current layer | |
| QgsPointLocator::Match | snapToMap (const QPoint &point, QgsPointLocator::MatchFilter *filter=0) |
| snap to map according to the current configuration (mode). | |
| QgsPointLocator::Match | snapToMap (const QgsPoint &pointMap, QgsPointLocator::MatchFilter *filter=0) |
| SnapToMapMode | snapToMapMode () const |
| Find out how the snapping to map is done. | |
Protected Member Functions | |
| virtual void | prepareIndexProgress (int index) override |
| Called when finished indexing a layer. When index == count the indexing is complete. | |
| virtual void | prepareIndexStarting (int count) override |
| Called when starting to index - can be overridden and e.g. progress dialog can be provided. | |
Additional Inherited Members | |
Public Types inherited from QgsSnappingUtils | |
| enum | IndexingStrategy { IndexAlwaysFull, IndexNeverFull, IndexHybrid } |
| enum | SnapToMapMode { SnapCurrentLayer, SnapAllLayers, SnapAdvanced } |
| modes for "snap to background" More... | |
Public Slots inherited from QgsSnappingUtils | |
| void | readConfigFromProject () |
| Read snapping configuration from the project. | |
Snapping utils instance that is connected to a canvas and updates the configuration (map settings + current layer) whenever that is changed in the canvas.
Definition at line 14 of file qgsmapcanvassnappingutils.h.
| QgsMapCanvasSnappingUtils::QgsMapCanvasSnappingUtils | ( | QgsMapCanvas * | canvas, |
| QObject * | parent = 0 |
||
| ) |
Definition at line 9 of file qgsmapcanvassnappingutils.cpp.
|
overrideprotectedvirtual |
Called when finished indexing a layer. When index == count the indexing is complete.
Reimplemented from QgsSnappingUtils.
Definition at line 39 of file qgsmapcanvassnappingutils.cpp.
|
overrideprotectedvirtual |
Called when starting to index - can be overridden and e.g. progress dialog can be provided.
Reimplemented from QgsSnappingUtils.
Definition at line 32 of file qgsmapcanvassnappingutils.cpp.
1.8.1.2