[Qgis-developer] set snap option from python
wonder.sk at gmail.com
Fri Jun 11 06:55:21 EDT 2010
On Wed, Jun 9, 2010 at 4:36 PM, Simon Keller <simonkeller at gmx.ch> wrote:
> can someone tell me, how I can set the snapping option from python.
> Which are shown in the menu "Settings", "Project Properties" -> "Snapping
you could get these settings from QgsProject instance by querying the
list of layers, list of snapping tolerances etc. You can find out more
in QgsMapCanvasSnapper class:
(look into snapToBackgroundLayers function, starting at line 128)
A word of caution: the entries related to snapping in QgsProject are
not a part of public API, so their semantics may change without a
prior notice (though I don't expect this to happen anytime soon).
More information about the Qgis-developer