Feature request #2859

symbology: unique value/categorized -> allow data driven labels

Added by Giovanni Manghi over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Symbology
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12919

Description

it would be really useful to allow users define labels using the values of a column in the table of attributes.

It would be also useful to allow data driven symbol color RGB values.

100724_qgis_label.diff Magnifier (79.7 KB) Marco Hugentobler, 2010-07-23 11:57 PM

History

#1 Updated by Marco Hugentobler over 14 years ago

I'm currently working on data dependent labelling-ng (data dependent RGB values is something different. Probably it should be a ticket on its own)

#2 Updated by Marco Hugentobler over 14 years ago

The attached patch adds support for data defined font and buffer settings to the new labeling.
Martin, could you review it?

Thanks,
Marco

#3 Updated by Martin Dobias over 14 years ago

Marco, I've checked the patch and it looks fine.

I would also remove the legacy prepareLayer() call as I don't think we need to care about backwards compatibility here (labeling-ng is the only user of that interface). Additionally, I would use QList<in> instead of QSet<int> for the list of attribute indexes - a list is used also when passing the indexes to layer/provider.

#4 Updated by Marco Hugentobler over 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Applied in 33194f8a (SVN r13999). Thanks for reviewing, Martin.
I removed the legacy method but kept the QSet (it is a bit easier for the label engine to filter duplicated fields).

Also available in: Atom PDF