[Qgis-developer] Ellipse renderer

Martin Dobias wonder.sk at gmail.com
Mon Jul 11 05:48:13 EDT 2011


Hi Marco

>> One more technical issue: in the ellipse symbol layer you store
>> indexes together with the field names. This is suboptimal and the
>> field indexes should be resolved in startRender() method.
>
> I agree, storing only the name would be more robust towards attribute changes
> (e.g. storing projects, inserting fields into the db with external programs,
> then reopen again).
> Is there a way to resolve the indexes from within the symbol layer? Maybe it's
> something obvious that I just don't see. The symbollayer needs to know
> attribute name and index (name to say which attributes it needs, index in
> renderPoint). However, it does not know the vectorlayer to get the relation
> between name and index.

Right now there is no such possibility since the symbol layers were
originally designed not to know anything about vector layers. Probably
we should optionally pass QgsFieldMap or QgsVectorLayer to startRender
method like we do in QgsFeatureRendererV2.

Martin


More information about the Qgis-developer mailing list