Feature request #2859

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

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

Assignee:Marco Hugentobler
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12919


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


#1 Updated by Marco Hugentobler over 12 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 12 years ago

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


#3 Updated by Martin Dobias over 12 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 12 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