QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
15 #ifndef QGSGRADUATEDSYMBOLRENDERER_H
16 #define QGSGRADUATEDSYMBOLRENDERER_H
18 #include "qgis_core.h"
49 QString
dump()
const override;
62 bool updateRangeLabel(
int rangeIndex,
const QString &label );
63 bool updateRangeUpperValue(
int rangeIndex,
double value );
64 bool updateRangeLowerValue(
int rangeIndex,
double value );
66 bool updateRangeRenderState(
int rangeIndex,
bool render );
72 void addClass(
double lower,
double upper )
SIP_PYNAME( addClassLowerUpper );
82 void addBreak(
double breakValue,
bool updateSymbols =
true );
84 void deleteClass(
int idx );
85 void deleteAllClasses();
88 void moveClass(
int from,
int to );
95 bool rangesOverlap()
const;
102 bool rangesHaveGaps()
const;
104 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
105 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
155 Q_DECL_DEPRECATED
void setUseSymmetricMode(
bool useSymmetricMode )
SIP_DEPRECATED;
169 Q_DECL_DEPRECATED
void setSymmetryPoint(
double symmetryPoint )
SIP_DEPRECATED;
195 Q_DECL_DEPRECATED
static void makeBreaksSymmetric( QList<double> &breaks
SIP_INOUT,
double symmetryPoint,
bool astride )
SIP_DEPRECATED;
207 Q_DECL_DEPRECATED
static QList<double> calcEqualIntervalBreaks(
double minimum,
double maximum,
int classes,
bool useSymmetricMode,
double symmetryPoint,
bool astride )
SIP_DEPRECATED;
220 Q_DECL_DEPRECATED
void updateClasses(
QgsVectorLayer *vlayer, Mode mode,
int nclasses,
bool useSymmetricMode =
false,
double symmetryPoint = 0.0,
bool astride =
false )
SIP_DEPRECATED;
254 void calculateLabelPrecision(
bool updateRanges = true );
275 const QString &attrName,
281 bool useSymmetricMode = false,
282 double symmetryPoint = 0.0,
283 const QStringList &listForCboPrettyBreaks = QStringList(),
361 void setSymbolSizes(
double minSize,
double maxSize );
367 double minSymbolSize() const;
373 double maxSymbolSize() const;
429 void updateRangeLabels();
450 bool mCounting =
false;
457 QgsSymbol *symbolForValue(
double value )
const;
462 QString legendKeyForValue(
double value )
const;
490 friend class TestQgsGraduatedSymbolRenderer;
494 #endif // QGSGRADUATEDSYMBOLRENDERER_H
QgsFeatureRenderer::Capabilities capabilities() override
Returns details about internals of this renderer.
virtual void setLegendSymbolItem(const QString &key, QgsSymbol *symbol)
Sets the symbol to be used for a legend symbol item.
Abstract base class for color ramps.
@ Filter
Features may be filtered, i.e. some features may not be rendered (categorized, rule based ....
std::unique_ptr< QgsDataDefinedSizeLegend > mDataDefinedSizeLegend
virtual QgsSymbol * originalSymbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns symbol for feature.
QgsClassificationMethod is an abstract class for implementations of classification methods.
The class is used as a container of context for various read/write operations on other objects.
QString classAttribute() const
void setGraduatedMethod(GraduatedMethod method)
set the method used for graduation (either size or color)
std::unique_ptr< QgsSymbol > mSourceSymbol
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
Container of fields for a vector layer.
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
Contains information about the context of a rendering operation.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer.
An interface for classes which can visit style entity (e.g.
Abstract base class for all rendered symbols.
int ANALYSIS_EXPORT lower(int n, int i)
Lower function.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props=QgsStringMap()) const
used from subclasses to create SLD Rule elements following SLD v1.1 specs
Q_DECL_DEPRECATED double symmetryPoint() const
Returns the pivot value for symmetric classification.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual bool legendSymbolItemChecked(const QString &key)
items of symbology items in legend is checked
std::unique_ptr< QgsExpression > mExpression
virtual bool legendSymbolItemsCheckable() const
items of symbology items in legend should be checkable
std::shared_ptr< QgsClassificationMethod > mClassificationMethod
#define Q_NOWARN_DEPRECATED_POP
virtual bool filterNeedsGeometry() const
Returns true if this renderer requires the geometry to apply the filter.
QList< QgsRendererRange > QgsRangeList
virtual void checkLegendSymbolItem(const QString &key, bool state=true)
item in symbology was checked
Q_DECL_DEPRECATED Mode mode() const
QList< QgsSymbol * > QgsSymbolList
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
virtual QgsSymbolList symbols(QgsRenderContext &context) const
Returns list of symbols used by the renderer.
std::unique_ptr< QgsColorRamp > mSourceColorRamp
virtual QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const =0
To be overridden.
Q_DECL_DEPRECATED bool astride() const
Returns if we want to have a central class astride the pivot value.
const QgsRangeList & ranges() const
void setClassAttribute(const QString &attr)
QMap< QString, QString > QgsStringMap
Represents a vector layer which manages a vector based data sets.
Q_DECL_DEPRECATED bool useSymmetricMode() const
Returns if we want to classify symmetric around a given value.
GraduatedMethod graduatedMethod() const
Returns the method used for graduation (either size or color)
virtual QString dump() const
Returns debug information about this renderer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Class for parsing and evaluation of expressions (formerly called "search strings").
QList< QgsLegendSymbolItem > QgsLegendSymbolList
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
#define Q_NOWARN_DEPRECATED_PUSH
QString legendClassificationAttribute() const override
If supported by the renderer, return classification attribute for the use in legend.