[Qgis-developer] Python: how to set snapping options?

Andreas Neumann a.neumann at carto.net
Wed Nov 23 11:56:22 EST 2011


 Thanks for the pointer Marco!

 If I set the Project settings - are the snapping settings automatically 
 active and ready to use?

 Andreas

 On Wed, 23 Nov 2011 17:02:29 +0100, Marco Hugentobler wrote:
> Hi Andreas
>
> It can be done using QgsProject::instance()->writeEntry(...). You may
> look in the class src/app/qgssnappingdialog.cpp how QGIS does it.
>
> Regards,
> Marco
>
> On 23.11.2011 14:42, Andreas Neumann wrote:
>> Hi,
>>
>> I'd like to programmatically set the snapping option I just added 
>> with my python plugin:
>> * turn on snapping within its own layer
>> * set avoid intersection
>>
>> Does anyone have a hint or code how to accomplish this?
>>
>> Thanks,
>> Andreas
>>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland


More information about the Qgis-developer mailing list