Remove unused SnapToMapMode in QgsSnappingUtils

This commit is contained in:
Juergen E. Fischer 2017-06-14 10:47:34 +02:00
parent f5f0a299c2
commit 8333b71034
3 changed files with 6 additions and 18 deletions

View File

@ -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}
---------------

View File

@ -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

View File

@ -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