15 #ifndef QGSGRADUATEDSYMBOLRENDERER_H 16 #define QGSGRADUATEDSYMBOLRENDERER_H 18 #include "qgis_core.h" 50 QString
dump()
const override;
63 bool updateRangeLabel(
int rangeIndex,
const QString &label );
64 bool updateRangeUpperValue(
int rangeIndex,
double value );
65 bool updateRangeLowerValue(
int rangeIndex,
double value );
67 bool updateRangeRenderState(
int rangeIndex,
bool render );
73 void addClass(
double lower,
double upper )
SIP_PYNAME( addClassLowerUpper );
83 void addBreak(
double breakValue,
bool updateSymbols =
true );
85 void deleteClass(
int idx );
86 void deleteAllClasses();
89 void moveClass(
int from,
int to );
96 bool rangesOverlap()
const;
103 bool rangesHaveGaps()
const;
105 void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
106 void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );
149 Q_DECL_DEPRECATED
bool useSymmetricMode() const SIP_DEPRECATED {
return mClassificationMethod->symmetricModeEnabled(); }
156 Q_DECL_DEPRECATED
void setUseSymmetricMode(
bool useSymmetricMode )
SIP_DEPRECATED;
163 Q_DECL_DEPRECATED
double symmetryPoint() const SIP_DEPRECATED {
return mClassificationMethod->symmetryPoint(); }
170 Q_DECL_DEPRECATED
void setSymmetryPoint(
double symmetryPoint )
SIP_DEPRECATED;
178 Q_DECL_DEPRECATED
bool astride() const SIP_DEPRECATED {
return mClassificationMethod->symmetryAstride(); }
196 Q_DECL_DEPRECATED
static void makeBreaksSymmetric( QList<double> &breaks
SIP_INOUT,
double symmetryPoint,
bool astride )
SIP_DEPRECATED;
208 Q_DECL_DEPRECATED
static QList<double> calcEqualIntervalBreaks(
double minimum,
double maximum,
int classes,
bool useSymmetricMode,
double symmetryPoint,
bool astride )
SIP_DEPRECATED;
221 Q_DECL_DEPRECATED
void updateClasses(
QgsVectorLayer *vlayer,
Mode mode,
int nclasses,
bool useSymmetricMode =
false,
double symmetryPoint = 0.0,
bool astride =
false )
SIP_DEPRECATED;
255 void calculateLabelPrecision(
bool updateRanges = true );
276 const QString &attrName,
282 bool useSymmetricMode = false,
283 double symmetryPoint = 0.0,
284 const QStringList &listForCboPrettyBreaks = QStringList(),
285 bool astride = false ) SIP_DEPRECATED;
319 void setSourceSymbol(
QgsSymbol *sym SIP_TRANSFER );
340 void setSourceColorRamp(
QgsColorRamp *ramp SIP_TRANSFER );
347 void updateColorRamp(
QgsColorRamp *ramp SIP_TRANSFER =
nullptr );
362 void setSymbolSizes(
double minSize,
double maxSize );
368 double minSymbolSize() const;
374 double maxSymbolSize() const;
430 void updateRangeLabels();
443 bool mCounting =
false;
450 QgsSymbol *symbolForValue(
double value )
const;
455 QString legendKeyForValue(
double value )
const;
484 #endif // QGSGRADUATEDSYMBOLRENDERER_H The class is used as a container of context for various read/write operations on other objects...
std::unique_ptr< QgsSymbol > mSourceSymbol
QList< QgsRendererRange > QgsRangeList
QList< QgsLegendSymbolItem > QgsLegendSymbolList
Abstract base class for all rendered symbols.
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
Features may be filtered, i.e. some features may not be rendered (categorized, rule based ...
QString classAttribute() const
Abstract base class for color ramps.
#define Q_NOWARN_DEPRECATED_PUSH
void setGraduatedMethod(GraduatedMethod method)
set the method used for graduation (either size or color)
Container of fields for a vector layer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
An interface for classes which can visit style entity (e.g.
std::unique_ptr< QgsExpression > mExpression
QMap< QString, QString > QgsStringMap
virtual QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const =0
To be overridden.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer.
Q_DECL_DEPRECATED double symmetryPoint() const
Returns the pivot value for symmetric classification.
QList< QgsSymbol * > QgsSymbolList
Q_DECL_DEPRECATED Mode mode() const
virtual QgsSymbol * originalSymbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns symbol for feature.
virtual bool legendSymbolItemChecked(const QString &key)
items of symbology items in legend is checked
std::shared_ptr< QgsClassificationMethod > mClassificationMethod
virtual void checkLegendSymbolItem(const QString &key, bool state=true)
item in symbology was checked
virtual void setLegendSymbolItem(const QString &key, QgsSymbol *symbol)
Sets the symbol to be used for a legend symbol item.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
#define Q_NOWARN_DEPRECATED_POP
Contains information about the context of a rendering operation.
Q_DECL_DEPRECATED bool useSymmetricMode() const
Returns if we want to classify symmetric around a given value.
virtual QgsSymbolList symbols(QgsRenderContext &context) const
Returns list of symbols used by the renderer.
GraduatedMethod graduatedMethod() const
Returns the method used for graduation (either size or color)
Q_DECL_DEPRECATED bool astride() const
Returns if we want to have a central class astride the pivot value.
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
QString legendClassificationAttribute() const override
If supported by the renderer, return classification attribute for the use in legend.
virtual bool legendSymbolItemsCheckable() const
items of symbology items in legend should be checkable
int ANALYSIS_EXPORT lower(int n, int i)
Lower function.
std::unique_ptr< QgsColorRamp > mSourceColorRamp
virtual bool filterNeedsGeometry() const
Returns true if this renderer requires the geometry to apply the filter.
void setClassAttribute(const QString &attr)
Represents a vector layer which manages a vector based data sets.
Object that keeps configuration of appearance of marker symbol's data-defined size in legend...
std::unique_ptr< QgsDataDefinedSizeLegend > mDataDefinedSizeLegend
QgsFeatureRenderer::Capabilities capabilities() override
Returns details about internals of this renderer.
const QgsRangeList & ranges() const
QgsClassificationMethod is an abstract class for implementations of classification methods...
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
virtual QString dump() const
Returns debug information about this renderer.