[Qgis-user] How to get a new 'the_geom' into the 'Init function' of an 'Edit UI'?

Jürgen E. Fischer jef at norbit.de
Thu Jan 27 04:29:54 PST 2011


Hi Knut,

On Fri, 03. Dec 2010 at 23:17:49 +0100, Jürgen E. Fischer wrote:
> The init function is used to initialize the dialog (not the feature), so that
> you can add new widgets, connect signals and the like.  You can also overwrite
> the QGIS' widget initialization.

The init function gets the dialog, layerid and featureid:

  def __init__(self, dialog, layerid, id)


To get the layer for the layerid use:

 layer = QgsMapLayerRegistry.instance().mapLayer(layerid)



Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502




More information about the Qgis-user mailing list