Skip to content

Commit fe049d3

Browse files
pierreloicqnyalldawson
authored andcommittedSep 14, 2018
classify symmetric squashed (17 commits) to rebase easily on master; 13 may 2018
1 parent 05f35f2 commit fe049d3

File tree

8 files changed

+1134
-57
lines changed

8 files changed

+1134
-57
lines changed
 

‎python/core/auto_generated/symbology/qgsgraduatedsymbolrenderer.sip.in

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,63 @@ Tests whether classes assigned to the renderer have gaps between the ranges.
225225
Mode mode() const;
226226
void setMode( Mode mode );
227227

228-
void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses );
228+
bool useSymmetricMode();
229+
%Docstring
230+
get mUseSymmetricMode, which says if we want to classify symmetric around a given value
231+
232+
.. versionadded:: 3.2
233+
%End
234+
235+
void setUseSymmetricMode( bool useSymmetricMode );
236+
%Docstring
237+
set mUseSymmetricMode, which says if we want to classify symmetric around a given value
238+
239+
.. versionadded:: 3.2
240+
%End
241+
242+
double symmetryPoint();
243+
%Docstring
244+
get mSymmetryPoint, the pivot value for symmetric classification
245+
246+
.. versionadded:: 3.2
247+
%End
248+
249+
void setSymmetryPoint( double symmetryPoint );
250+
%Docstring
251+
set the pivot point
252+
253+
.. versionadded:: 3.2
254+
%End
255+
256+
QStringList listForCboPrettyBreaks();
257+
%Docstring
258+
get mListForCboPrettyBreaks, which is need to recover this list in saved configuration, or when property window in closed and reopened
259+
260+
.. versionadded:: 3.2
261+
%End
262+
263+
void setListForCboPrettyBreaks( QStringList listForCboPrettyBreaks );
264+
%Docstring
265+
set mListForCboPrettyBreaks, which is need to recover this list in saved configuration, or when property window in closed and reopened
266+
267+
.. versionadded:: 3.2
268+
%End
269+
270+
bool astride();
271+
%Docstring
272+
get mAstride, a bool saying if we want to have a central class astride the pivot value
273+
274+
.. versionadded:: 3.2
275+
%End
276+
277+
void setAstride( bool astride );
278+
%Docstring
279+
set mAstride, a bool saying if we want to have a central class astride the pivot value
280+
281+
.. versionadded:: 3.2
282+
%End
283+
284+
void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses, bool useSymmetricMode = false, double symmetryPoint = 0.0, bool astride = false );
229285
%Docstring
230286
Recalculate classes for a layer
231287

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

236292
.. versionadded:: 2.6
293+
:param useSymmetricMode: A bool indicating if we want to have classes and hence colors ramp symmetric around a value
294+
:param symmetryPoint: The value around which the classes will be symmetric if useSymmetricMode is checked
295+
:param astride: A bool indicating if the symmetry is made astride the symmetryPoint or not ( [-1,1] vs. [-1,0][0,1] )
296+
297+
.. versionadded:: 3.2
237298
%End
238299

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

441510

442511

512+
443513
QgsSymbol *symbolForValue( double value ) const;
444514
%Docstring
445515
Gets the symbol which is used to represent ``value``.

0 commit comments

Comments
 (0)