/************************************************************************ * This file has been generated automatically from * * * * src/core/symbology/qgsgraduatedsymbolrenderer.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/ class QgsGraduatedSymbolRenderer : QgsFeatureRenderer { %TypeHeaderCode #include "qgsgraduatedsymbolrenderer.h" %End public: QgsGraduatedSymbolRenderer( const QString &attrName = QString(), const QgsRangeList &ranges = QgsRangeList() ); ~QgsGraduatedSymbolRenderer(); virtual QgsSymbol *symbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const; virtual QgsSymbol *originalSymbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const; virtual void startRender( QgsRenderContext &context, const QgsFields &fields ); virtual void stopRender( QgsRenderContext &context ); virtual QSet usedAttributes( const QgsRenderContext &context ) const; virtual bool filterNeedsGeometry() const; virtual QString dump() const; virtual QgsGraduatedSymbolRenderer *clone() const /Factory/; virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const; virtual QgsFeatureRenderer::Capabilities capabilities(); virtual QgsSymbolList symbols( QgsRenderContext &context ) const; virtual bool accept( QgsStyleEntityVisitorInterface *visitor ) const; QString classAttribute() const; void setClassAttribute( const QString &attr ); const QgsRangeList &ranges() const; bool updateRangeSymbol( int rangeIndex, QgsSymbol *symbol /Transfer/ ); bool updateRangeLabel( int rangeIndex, const QString &label ); bool updateRangeUpperValue( int rangeIndex, double value ); bool updateRangeLowerValue( int rangeIndex, double value ); bool updateRangeRenderState( int rangeIndex, bool render ); %Docstring .. versionadded:: 2.5 %End void addClass( QgsSymbol *symbol ); void addClass( const QgsRendererRange &range ) /PyName=addClassRange/; %Docstring .. note:: available in Python bindings as addClassRange %End void addClass( double lower, double upper ) /PyName=addClassLowerUpper/; %Docstring .. note:: available in Python bindings as addClassLowerUpper %End void addBreak( double breakValue, bool updateSymbols = true ); %Docstring Add a breakpoint by splitting existing classes so that the specified value becomes a break between two classes. :param breakValue: position to insert break :param updateSymbols: set to ``True`` to reapply ramp colors to the new symbol ranges .. versionadded:: 2.9 %End void deleteClass( int idx ); void deleteAllClasses(); void moveClass( int from, int to ); %Docstring Moves the category at index position from to index position to. %End bool rangesOverlap() const; %Docstring Tests whether classes assigned to the renderer have ranges which overlap. :return: ``True`` if ranges overlap .. versionadded:: 2.10 %End bool rangesHaveGaps() const; %Docstring Tests whether classes assigned to the renderer have gaps between the ranges. :return: ``True`` if ranges have gaps .. versionadded:: 2.10 %End void sortByValue( Qt::SortOrder order = Qt::AscendingOrder ); void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder ); QgsClassificationMethod *classificationMethod() const; %Docstring Returns the classification method .. versionadded:: 3.10 %End void setClassificationMethod( QgsClassificationMethod *method /Transfer/ ); %Docstring Defines the classification method This will take ownership of the method .. versionadded:: 3.10 %End enum Mode { EqualInterval, Quantile, Jenks, StdDev, Pretty, Custom }; Mode mode() const /Deprecated/; %Docstring .. deprecated:: QGIS 3.10 use classficationMethod instead %End void setMode( Mode mode ) /Deprecated/; %Docstring .. deprecated:: QGIS 3.10 use classficationMethod instead %End bool useSymmetricMode() const /Deprecated/; %Docstring Returns if we want to classify symmetric around a given value .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use classficationMethod instead %End void setUseSymmetricMode( bool useSymmetricMode ) /Deprecated/; %Docstring Set if we want to classify symmetric around a given value .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use classficationMethod instead %End double symmetryPoint() const /Deprecated/; %Docstring Returns the pivot value for symmetric classification .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use classficationMethod instead %End void setSymmetryPoint( double symmetryPoint ) /Deprecated/; %Docstring Set the pivot point .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use classficationMethod instead %End bool astride() const /Deprecated/; %Docstring Returns if we want to have a central class astride the pivot value .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use classficationMethod instead %End void setAstride( bool astride ) /Deprecated/; %Docstring Set if we want a central class astride the pivot value .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use classficationMethod instead %End static void makeBreaksSymmetric( QList &breaks /In,Out/, double symmetryPoint, bool astride ) /Deprecated/; %Docstring Remove the breaks that are above the existing opposite sign classes to keep colors symmetrically balanced around symmetryPoint Does not put a break on the symmetryPoint. This is done before. :param breaks: The breaks of an already-done classification :param symmetryPoint: The point around which we want a symmetry :param astride: A bool indicating if the symmetry is made astride the symmetryPoint or not ( [-1,1] vs. [-1,0][0,1] ) .. versionadded:: 3.4 .. deprecated:: QGIS 3.10 use QgsClassificationMethod.makeBreaksSymmetric instead %End static QList calcEqualIntervalBreaks( double minimum, double maximum, int classes, bool useSymmetricMode, double symmetryPoint, bool astride ) /Deprecated/; %Docstring Compute the equal interval classification :param minimum: The minimum value of the distribution :param maximum: The maximum value of the distribution :param classes: The number of classes desired :param useSymmetricMode: A bool indicating if we want to have classes and hence colors ramp symmetric around a value :param symmetryPoint: The point around which we want a symmetry :param astride: A bool indicating if the symmetry is made astride the symmetryPoint or not ( [-1,1] vs. [-1,0][0,1] ) .. deprecated:: QGIS 3.10 use QgsClassificationEqualInterval class instead %End void updateClasses( QgsVectorLayer *vlayer, Mode mode, int nclasses, bool useSymmetricMode = false, double symmetryPoint = 0.0, bool astride = false ) /Deprecated/; %Docstring Recalculate classes for a layer :param vlayer: The layer being rendered (from which data values are calculated) :param mode: The calculation mode :param nclasses: The number of classes to calculate (approximate for some modes) :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:: 2.6 .. deprecated:: QGIS 3.10 %End void updateClasses( const QgsVectorLayer *vl, int nclasses ); %Docstring Recalculate classes for a layer :param vl: The layer being rendered (from which data values are calculated) :param nclasses: the number of classes %End QgsRendererRangeLabelFormat labelFormat() const /Deprecated/; %Docstring Returns the label format used to generate default classification labels .. versionadded:: 2.6 .. deprecated:: QGIS 3.10 use classificationMethod() and QgsClassificationMethod.setLabelFormat instead %End void setLabelFormat( const QgsRendererRangeLabelFormat &labelFormat, bool updateRanges = false ) /Deprecated/; %Docstring Set the label format used to generate default classification labels :param labelFormat: The string appended to classification labels :param updateRanges: If ``True`` then ranges ending with the old unit string are updated to the new. .. versionadded:: 2.6 .. deprecated:: QGIS 3.10 use classificationMethod() and QgsClassificationMethod.setLabelFormat instead %End void calculateLabelPrecision( bool updateRanges = true ); %Docstring Reset the label decimal places to a numberbased on the minimum class interval :param updateRanges: if ``True`` then ranges currently using the default label will be updated .. versionadded:: 2.6 %End static QgsGraduatedSymbolRenderer *createRenderer( QgsVectorLayer *vlayer, const QString &attrName, int classes, Mode mode, QgsSymbol *symbol /Transfer/, QgsColorRamp *ramp /Transfer/, const QgsRendererRangeLabelFormat &legendFormat = QgsRendererRangeLabelFormat(), bool useSymmetricMode = false, double symmetryPoint = 0.0, const QStringList &listForCboPrettyBreaks = QStringList(), bool astride = false ) /Deprecated/; %Docstring Creates a new graduated renderer. :param vlayer: vector layer :param attrName: attribute to classify :param classes: number of classes :param mode: classification mode :param symbol: base symbol :param ramp: color ramp for classes :param legendFormat: :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] ) :return: new QgsGraduatedSymbolRenderer object .. deprecated:: QGIS 3.10 %End static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/; %Docstring create renderer from XML element %End virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ); virtual QgsLegendSymbolList legendSymbolItems() const; virtual QSet< QString > legendKeysForFeature( const QgsFeature &feature, QgsRenderContext &context ) const; QgsSymbol *sourceSymbol(); %Docstring Returns the renderer's source symbol, which is the base symbol used for the each classes' symbol before applying the classes' color. .. seealso:: :py:func:`setSourceSymbol` .. seealso:: :py:func:`sourceColorRamp` %End void setSourceSymbol( QgsSymbol *sym /Transfer/ ); %Docstring Sets the source symbol for the renderer, which is the base symbol used for the each classes' symbol before applying the classes' color. :param sym: source symbol, ownership is transferred to the renderer .. seealso:: :py:func:`sourceSymbol` .. seealso:: :py:func:`setSourceColorRamp` %End QgsColorRamp *sourceColorRamp(); %Docstring Returns the source color ramp, from which each classes' color is derived. .. seealso:: :py:func:`setSourceColorRamp` .. seealso:: :py:func:`sourceSymbol` %End void setSourceColorRamp( QgsColorRamp *ramp /Transfer/ ); %Docstring Sets the source color ramp. :param ramp: color ramp. Ownership is transferred to the renderer %End void updateColorRamp( QgsColorRamp *ramp /Transfer/ = 0 ); %Docstring Update the color ramp used. Also updates all symbols colors. Doesn't alter current breaks. :param ramp: color ramp. Ownership is transferred to the renderer %End void updateSymbols( QgsSymbol *sym ); %Docstring Update all the symbols but leave breaks and colors. This method also sets the source symbol for the renderer. :param sym: source symbol to use for classes. Ownership is not transferred. .. seealso:: :py:func:`setSourceSymbol` %End void setSymbolSizes( double minSize, double maxSize ); %Docstring set varying symbol size for classes .. note:: the classes must already be set so that symbols exist .. versionadded:: 2.10 %End double minSymbolSize() const; %Docstring Returns the min symbol size when graduated by size .. versionadded:: 2.10 %End double maxSymbolSize() const; %Docstring Returns the max symbol size when graduated by size .. versionadded:: 2.10 %End enum GraduatedMethod { GraduatedColor, GraduatedSize }; GraduatedMethod graduatedMethod() const; %Docstring Returns the method used for graduation (either size or color) .. versionadded:: 2.10 %End void setGraduatedMethod( GraduatedMethod method ); %Docstring set the method used for graduation (either size or color) .. versionadded:: 2.10 %End virtual bool legendSymbolItemsCheckable() const; virtual bool legendSymbolItemChecked( const QString &key ); virtual void checkLegendSymbolItem( const QString &key, bool state = true ); virtual void setLegendSymbolItem( const QString &key, QgsSymbol *symbol /Transfer/ ); virtual QString legendClassificationAttribute() const; static QgsGraduatedSymbolRenderer *convertFromRenderer( const QgsFeatureRenderer *renderer ) /Factory/; %Docstring creates a QgsGraduatedSymbolRenderer from an existing renderer. :return: a new renderer if the conversion was possible, otherwise 0. .. versionadded:: 2.6 %End void setDataDefinedSizeLegend( QgsDataDefinedSizeLegend *settings /Transfer/ ); %Docstring Configures appearance of legend when renderer is configured to use data-defined size for marker symbols. This allows configuring for which values (symbol sizes) should be shown in the legend, whether to display different symbol sizes collapsed in one legend node or separated across multiple legend nodes etc. When renderer does not use data-defined size or does not use marker symbols, these settings will be ignored. Takes ownership of the passed settings objects. ``None`` is a valid input that disables data-defined size legend. .. versionadded:: 3.0 %End QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const; %Docstring Returns configuration of appearance of legend when using data-defined size for marker symbols. Will return ``None`` if the functionality is disabled. .. versionadded:: 3.0 %End void updateRangeLabels(); %Docstring Updates the labels of the ranges .. versionadded:: 3.10 %End const QgsRendererRange *rangeForValue( double value ) const; %Docstring Returns the renderer range matching the provided ``value``, or ``None`` if no range matches the value. .. versionadded:: 3.10.1 %End protected: QgsSymbol *symbolForValue( double value ) const; %Docstring Gets the symbol which is used to represent ``value``. %End QString legendKeyForValue( double value ) const; %Docstring Returns the matching legend key for a value. %End private: QgsGraduatedSymbolRenderer( const QgsGraduatedSymbolRenderer & ); QgsGraduatedSymbolRenderer &operator=( const QgsGraduatedSymbolRenderer & ); }; /************************************************************************ * This file has been generated automatically from * * * * src/core/symbology/qgsgraduatedsymbolrenderer.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/