Skip to content

Commit

Permalink
classify symmetric squashed (17 commits) to rebase easily on master; …
Browse files Browse the repository at this point in the history
…13 may 2018
  • Loading branch information
pierreloicq authored and nyalldawson committed Sep 14, 2018
1 parent 05f35f2 commit fe049d3
Show file tree
Hide file tree
Showing 8 changed files with 1,134 additions and 57 deletions.
Expand Up @@ -225,7 +225,63 @@ Tests whether classes assigned to the renderer have gaps between the ranges.
Mode mode() const;
void setMode( Mode mode );

void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses );
bool useSymmetricMode();
%Docstring
get mUseSymmetricMode, which says if we want to classify symmetric around a given value

.. versionadded:: 3.2
%End

void setUseSymmetricMode( bool useSymmetricMode );
%Docstring
set mUseSymmetricMode, which says if we want to classify symmetric around a given value

.. versionadded:: 3.2
%End

double symmetryPoint();
%Docstring
get mSymmetryPoint, the pivot value for symmetric classification

.. versionadded:: 3.2
%End

void setSymmetryPoint( double symmetryPoint );
%Docstring
set the pivot point

.. versionadded:: 3.2
%End

QStringList listForCboPrettyBreaks();
%Docstring
get mListForCboPrettyBreaks, which is need to recover this list in saved configuration, or when property window in closed and reopened

.. versionadded:: 3.2
%End

void setListForCboPrettyBreaks( QStringList listForCboPrettyBreaks );
%Docstring
set mListForCboPrettyBreaks, which is need to recover this list in saved configuration, or when property window in closed and reopened

.. versionadded:: 3.2
%End

bool astride();
%Docstring
get mAstride, a bool saying if we want to have a central class astride the pivot value

.. versionadded:: 3.2
%End

void setAstride( bool astride );
%Docstring
set mAstride, a bool saying if we want to have a central class astride the pivot value

.. versionadded:: 3.2
%End

void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses, bool useSymmetricMode = false, double symmetryPoint = 0.0, bool astride = false );
%Docstring
Recalculate classes for a layer

Expand All @@ -234,6 +290,11 @@ Recalculate classes for a layer
:param nclasses: The number of classes to calculate (approximate for some modes)

.. versionadded:: 2.6
:param useSymmetricMode: A bool indicating if we want to have classes and hence colors ramp symmetric around a value
:param symmetryPoint: The value around which the classes will be symmetric if useSymmetricMode is checked
:param astride: A bool indicating if the symmetry is made astride the symmetryPoint or not ( [-1,1] vs. [-1,0][0,1] )

.. versionadded:: 3.2
%End

const QgsRendererRangeLabelFormat &labelFormat() const;
Expand Down Expand Up @@ -266,6 +327,10 @@ Reset the label decimal places to a numberbased on the minimum class interval
const QString &attrName,
int classes,
Mode mode,
bool useSymmetricMode,
double symmetryPoint,
QStringList listForCboPrettyBreaks,
bool astride,
QgsSymbol *symbol /Transfer/,
QgsColorRamp *ramp /Transfer/,
const QgsRendererRangeLabelFormat &legendFormat = QgsRendererRangeLabelFormat() );
Expand All @@ -276,6 +341,10 @@ Creates a new graduated renderer.
:param attrName: attribute to classify
:param classes: number of classes
:param mode: classification mode
:param useSymmetricMode: A bool indicating if we want to have classes and hence colors ramp symmetric around a value
:param symmetryPoint: The value around which the classes will be symmetric if useSymmetricMode is checked
:param listForCboPrettyBreaks: The list of potential pivot values for symmetric mode with prettybreaks mode
:param astride: A bool indicating if the symmetry is made astride the symmetryPoint or not ( [-1,1] vs. [-1,0][0,1] )
:param symbol: base symbol
:param ramp: color ramp for classes
:param legendFormat:
Expand Down Expand Up @@ -440,6 +509,7 @@ Will return null if the functionality is disabled.




QgsSymbol *symbolForValue( double value ) const;
%Docstring
Gets the symbol which is used to represent ``value``.
Expand Down

0 comments on commit fe049d3

Please sign in to comment.