@@ -225,7 +225,63 @@ Tests whether classes assigned to the renderer have gaps between the ranges.
225
225
Mode mode() const;
226
226
void setMode( Mode mode );
227
227
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 );
229
285
%Docstring
230
286
Recalculate classes for a layer
231
287
@@ -234,6 +290,11 @@ Recalculate classes for a layer
234
290
:param nclasses: The number of classes to calculate (approximate for some modes)
235
291
236
292
.. 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
237
298
%End
238
299
239
300
const QgsRendererRangeLabelFormat &labelFormat() const;
@@ -266,6 +327,10 @@ Reset the label decimal places to a numberbased on the minimum class interval
266
327
const QString &attrName,
267
328
int classes,
268
329
Mode mode,
330
+ bool useSymmetricMode,
331
+ double symmetryPoint,
332
+ QStringList listForCboPrettyBreaks,
333
+ bool astride,
269
334
QgsSymbol *symbol /Transfer/,
270
335
QgsColorRamp *ramp /Transfer/,
271
336
const QgsRendererRangeLabelFormat &legendFormat = QgsRendererRangeLabelFormat() );
@@ -276,6 +341,10 @@ Creates a new graduated renderer.
276
341
:param attrName: attribute to classify
277
342
:param classes: number of classes
278
343
: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] )
279
348
:param symbol: base symbol
280
349
:param ramp: color ramp for classes
281
350
:param legendFormat:
@@ -440,6 +509,7 @@ Will return null if the functionality is disabled.
440
509
441
510
442
511
512
+
443
513
QgsSymbol *symbolForValue( double value ) const;
444
514
%Docstring
445
515
Gets the symbol which is used to represent ``value``.
0 commit comments