[Qgis-user] How to define advanced labeling fields from API?
HAUBOURG
regis.haubourg at eau-adour-garonne.fr
Fri Oct 14 05:16:01 PDT 2011
Hi list,
firsts steps for me with Qgis Python Api. I'm developping a Plugin that does following actions:
- get active layer and duplicate it in a memory layer . OK
- creates geometry as centroid of original features . OK
- adds fields that will store advanced labeling values (size, color, x, y.. ). OK
- enable labeling on one field . OK
- set labeling advanced options .. NotOK ! I don't understand how to use QgsLabel Class to set the values described in the enumeration here: http://doc.qgis.org/stable/classQgsLabel.html#f5d80f0748e1ebca6666d1a202681634
Looking at C classes didn't help.. Any Idea?
- activate Editing for that layer, in order to activate the advanced labeling toolbar. > not OK again
No problem to set my layer with layer.startEditing() .. But, it doesn't activate the edit toolbar.. Something to do with iface.toggleEditing() ? Any Idea again?
Thanks a lot folks,
Régis
More information about the Qgis-user
mailing list