<div dir="ltr"><div>Hi,<br><br></div>I think the branch I have been working on for the labeling gui redesign and expression-based data definitions is ready to merge [0]. Here is the commit message:<br><br>Update labeling gui and add expression support as data defined value<br>
- Add QgsDataDefined class<br>- Add QgsDataDefinedButton class<br>- Add data defined Python support<br>- Add standalone SVG selector dialog to QgsSvgSelectorWidget class<br>- Fix for #4607, show only pertinent fields when setting a data defined value<br>
- Fix for #5048 and #5049, data defined settings are literally used<br>- Fix for #5726, number formatting does not work for expressions<br>- Fix for #7755, using bufferSize to enable/disable label buffer is confusing<br>- Fix for #7779, labels do not register in label collision engine; and for #4719, inactive options in labeling dialog<br>
- Prepare label text's expression upfront when preparing layer; makes rendering much faster<br>- Change name of 'feature obstacles' to appropriate terminology<br clear="all"><div><div><div><br></div><div>(Due to my workflow between 3 computers and constant rebasing, my branch was squashed down to one commit; sorry about that).<br>
<br></div><div>I would like to merge this branch sometime this weekend, but will hold off if someone objects. I can create a pull request if needed.<br></div><div><br></div><div>The goal of this redesign was to add expression-based data definitions, make a small data defined tool button with visual feedback that can be used in-line in any form layouts [1, 2], and bring all the new labeling features to a finished looking state for 2.0. Also, the redesign was done with the intent that it integrates well with an eventual move to rule-based labels and styles (2.0 >).<br>
<br></div><div>The work was mostly financed through a generous donation by a community member (thank you for the support).<br></div><div><br></div><div>Notes:<br><br></div><div>There were 83 labeling data defined options added or updated, with well over 100 basic label configuration combinations that need unit tests. Full data defined labeling Python support was just completed in this branch, so now a complete test suite for can finally be built for labeling. Currently there are no tests, so anyone who can help manually test this update would be greatly appreciated.<br>
<br></div><div>Enabling a label buffer is no longer triggered by it size. I have added code to compensate where it was used by older projects. Please let me know ASAP if there is an issue with any layer-level or data defined buffers in any new or converted projects.<br>
<br></div><div>The implementation of quadrant offset for 'Over point' has be changed to an enum setup. This feature was not in 1.8, but may have been set by users working with 1.9 projects. I can add code to update projects from 1.9 to 2.0, but it seemed extraneous given it was a change between releases. Users with 1.9 projects will have to manually reset quadrant choices.<br>
<br></div><div>The code for migrating index-based data defined project settings to name-based ones was updated. My tests show it is OK, but please contact me ASAP if you find opening any 1.8 project seems to have issues.</div>
<div><br>[0] <a href="https://github.com/dakcarto/Quantum-GIS/tree/labeling-gui_redesign">https://github.com/dakcarto/Quantum-GIS/tree/labeling-gui_redesign</a><br>[1] <a href="http://drive.dakotacarto.com/qgis/labeling-redesign_btn-tool-tip.png">http://drive.dakotacarto.com/qgis/labeling-redesign_btn-tool-tip.png</a><br>
[2] <a href="http://drive.dakotacarto.com/qgis/labeling-redesign_btn-menu.png">http://drive.dakotacarto.com/qgis/labeling-redesign_btn-menu.png</a><br><br></div><div>Regards,<br></div><div><br>Larry Shaffer<br>Dakota Cartography<br>
Black Hills, South Dakota</div>
</div></div></div>