Categorized renderer fixes

@NathanW2 @nyalldawson  @leyan

Three fixes to categorized renderer

1) Fixed interaction between model reordering and link boundaries option so that link boundaries will sort before relinking
2) Changed label formatting to use QString.replace instead of QString.args to ensure that %1 and %2 are replaced by lower and upper bounds string respectively.  Also added tool tips and moved label format options down in GUI to reflect significance and position in grid below
3) Changed decimalPlaces to precision and allowed negative values as per Nyall's suggestion
Hi Nathan

This API didn't exist in 2.4 (in fact the QgsRendererRangeV2LabelFormat only came into existence less than a week ago)- surely that's why we want to get it right now?  Or have I misunderstood something)

In terms of the new API - I am bothered that I called this LabelFormat, when it should be LegendFormat (as should the references in the renderer API, and the categorized and graduated UI).

I was going to send you an email suggesting changing this (and deprecating references to Label when we mean Legend).  Would you support such a change?

Cheers

From: Nathan Woodrow [mailto:notifications@github.com]
Sent: Wednesday, 1 October 2014 11:49 a.m.
To: qgis/QGIS
Cc: Chris Crook
Subject: Re: [QGIS] Categorized renderer fixes (#1599)


In python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip:

> @@ -54,8 +54,8 @@ class QgsRendererRangeV2LabelFormat

>      QString format() const;

>      void setFormat( QString format );

>

> -    int decimalPlaces() const;

> -    void setDecimalPlaces( int decimalPlaces );

This breaks a API. Both methods will have to stay.

—
Reply to this email directly or view it on GitHub<https://github.com/qgis/QGIS/pull/1599/files#r18252692>.

________________________________
This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.