Skip to content
Permalink
Browse files

Remove unused SnapToMapMode in QgsSnappingUtils

  • Loading branch information
jef-n committed Jun 14, 2017
1 parent f5f0a29 commit 8333b71034a5018642ccfac0d9ddc7bffda508d4
Showing with 6 additions and 18 deletions.
  1. +5 −0 doc/api_break.dox
  2. +0 −8 python/core/qgssnappingutils.sip
  3. +1 −10 src/core/qgssnappingutils.h
@@ -2123,6 +2123,11 @@ QgsSnapper {#qgis_api_break_3_0_QgsSnapper}
- Constructor variant with QgsMapRenderer has been removed. Use the variant with QgsMapSettings.
- Signature for snapPoint() has changed.

QgsSnappingUtils {#qgis_api_break_3_0_QgsSnappingUtils}
----------------

- Snapping mode moved to QgsSnappingConfig

QgsSpatialIndex {#qgis_api_break_3_0_QgsSpatialIndex}
---------------

@@ -81,13 +81,6 @@ The current layer used if mode is SnapCurrentLayer
%End


enum SnapToMapMode
{
SnapCurrentLayer,
SnapAllLayers,
SnapAdvanced,
};

enum IndexingStrategy
{
IndexAlwaysFull,
@@ -120,7 +113,6 @@ snapping_layer1 = QgsSnappingUtils.LayerConfig(layer1, QgsPointLocator.Vertex, 1
snapping_layer2 = QgsSnappingUtils.LayerConfig(layer2, QgsPointLocator.Vertex and QgsPointLocator.Edge, 10, QgsTolerance.Pixels)

snapper.setLayers([snapping_layer1, snapping_layer2])
snapper.setSnapToMapMode(QgsSnappingUtils.SnapAdvanced)
```

\param l The vector layer for which this configuration is
@@ -58,7 +58,7 @@ class CORE_EXPORT QgsSnappingUtils : public QObject
//! Get a point locator for the given layer. If such locator does not exist, it will be created
QgsPointLocator *locatorForLayer( QgsVectorLayer *vl );

//! Snap to map according to the current configuration (mode). Optional filter allows discarding unwanted matches.
//! Snap to map according to the current configuration. Optional filter allows discarding unwanted matches.
QgsPointLocator::Match snapToMap( QPoint point, QgsPointLocator::MatchFilter *filter = nullptr );
QgsPointLocator::Match snapToMap( const QgsPointXY &pointMap, QgsPointLocator::MatchFilter *filter = nullptr );

@@ -78,14 +78,6 @@ class CORE_EXPORT QgsSnappingUtils : public QObject

// configuration

//! modes for "snap to background"
enum SnapToMapMode
{
SnapCurrentLayer, //!< Snap just to current layer (tolerance and type from defaultSettings())
SnapAllLayers, //!< Snap to all rendered layers (tolerance and type from defaultSettings())
SnapAdvanced, //!< Snap according to the configuration set in setLayers()
};

enum IndexingStrategy
{
IndexAlwaysFull, //!< For all layers build index of full extent. Uses more memory, but queries are faster.
@@ -115,7 +107,6 @@ class CORE_EXPORT QgsSnappingUtils : public QObject
snapping_layer2 = QgsSnappingUtils.LayerConfig(layer2, QgsPointLocator.Vertex and QgsPointLocator.Edge, 10, QgsTolerance.Pixels)
snapper.setLayers([snapping_layer1, snapping_layer2])
snapper.setSnapToMapMode(QgsSnappingUtils.SnapAdvanced)
```
* \param l The vector layer for which this configuration is

0 comments on commit 8333b71

Please sign in to comment.
You can’t perform that action at this time.