QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
#include <qgsgraduatedsymbolrendererv2.h>
Public Types | |
enum | GraduatedMethod { GraduatedColor = 0, GraduatedSize = 1 } |
enum | Mode { EqualInterval, Quantile, Jenks, StdDev, Pretty, Custom } |
Public Types inherited from QgsFeatureRendererV2 | |
enum | Capabilities { SymbolLevels = 1, RotationField = 1 << 1, MoreSymbolsPerFeature = 1 << 2, Filter = 1 << 3, ScaleDependent = 1 << 4 } |
Public Member Functions | |
QgsGraduatedSymbolRendererV2 (const QString &attrName=QString(), const QgsRangeList &ranges=QgsRangeList()) | |
virtual | ~QgsGraduatedSymbolRendererV2 () |
void | addBreak (double breakValue, bool updateSymbols=true) |
Add a breakpoint by splitting existing classes so that the specified value becomes a break between two classes. More... | |
void | addClass (QgsSymbolV2 *symbol) |
void | addClass (const QgsRendererRangeV2 &range) |
void | addClass (double lower, double upper) |
void | calculateLabelPrecision (bool updateRanges=true) |
Reset the label decimal places to a numberbased on the minimum class interval. More... | |
virtual int | capabilities () override |
returns bitwise OR-ed capabilities of the renderer More... | |
virtual void | checkLegendSymbolItem (const QString &key, bool state=true) override |
item in symbology was checked More... | |
QString | classAttribute () const |
virtual QgsGraduatedSymbolRendererV2 * | clone () const override |
void | deleteAllClasses () |
void | deleteClass (int idx) |
virtual QString | dump () const override |
for debugging More... | |
Q_DECL_DEPRECATED QList< double > | getDataValues (QgsVectorLayer *vlayer) |
Evaluates the data expression and returns the list of values from the layer. More... | |
GraduatedMethod | graduatedMethod () const |
return the method used for graduation (either size or color) More... | |
bool | invertedColorRamp () |
const QgsRendererRangeV2LabelFormat & | labelFormat () const |
Return the label format used to generate default classification labels. More... | |
virtual QString | legendClassificationAttribute () const override |
If supported by the renderer, return classification attribute for the use in legend. More... | |
virtual QSet< QString > | legendKeysForFeature (QgsFeature &feature, QgsRenderContext &context) override |
Return legend keys matching a specified feature. More... | |
virtual bool | legendSymbolItemChecked (const QString &key) override |
item in symbology was checked More... | |
virtual QgsLegendSymbolList | legendSymbolItems (double scaleDenominator=-1, const QString &rule=QString()) override |
return a list of item text / symbol More... | |
virtual bool | legendSymbolItemsCheckable () const override |
items of symbology items in legend should be checkable More... | |
QgsLegendSymbolListV2 | legendSymbolItemsV2 () const override |
virtual QgsLegendSymbologyList | legendSymbologyItems (QSize iconSize) override |
return a list of symbology items for the legend More... | |
double | maxSymbolSize () const |
return the max symbol size when graduated by size More... | |
double | minSymbolSize () const |
return the min symbol size when graduated by size More... | |
Mode | mode () const |
void | moveClass (int from, int to) |
Moves the category at index position from to index position to. More... | |
virtual QgsSymbolV2 * | originalSymbolForFeature (QgsFeature &feature, QgsRenderContext &context) override |
const QgsRangeList & | ranges () const |
bool | rangesHaveGaps () const |
Tests whether classes assigned to the renderer have gaps between the ranges. More... | |
bool | rangesOverlap () const |
Tests whether classes assigned to the renderer have ranges which overlap. More... | |
Q_DECL_DEPRECATED QString | rotationField () const override |
return rotation field name (or empty string if not set or not supported by renderer) More... | |
virtual QDomElement | save (QDomDocument &doc) override |
store renderer info to XML element More... | |
QgsSymbolV2::ScaleMethod | scaleMethod () const |
void | setClassAttribute (const QString &attr) |
void | setGraduatedMethod (GraduatedMethod method) |
set the method used for graduation (either size or color) More... | |
void | setInvertedColorRamp (bool inverted) |
void | setLabelFormat (const QgsRendererRangeV2LabelFormat &labelFormat, bool updateRanges=false) |
Set the label format used to generate default classification labels. More... | |
virtual void | setLegendSymbolItem (const QString &key, QgsSymbolV2 *symbol) override |
Sets the symbol to be used for a legend symbol item. More... | |
void | setMode (Mode mode) |
Q_DECL_DEPRECATED void | setRotationField (const QString &fieldOrExpression) override |
sets rotation field of renderer (if supported by the renderer) More... | |
void | setScaleMethod (QgsSymbolV2::ScaleMethod scaleMethod) |
void | setSizeScaleField (const QString &fieldOrExpression) |
void | setSourceColorRamp (QgsVectorColorRampV2 *ramp) |
Sets the source color ramp. More... | |
void | setSourceSymbol (QgsSymbolV2 *sym) |
Sets the source symbol for the renderer, which is the base symbol used for the each classes' symbol before applying the classes' color. More... | |
void | setSymbolSizes (double minSize, double maxSize) |
set varying symbol size for classes More... | |
QString | sizeScaleField () const |
void | sortByLabel (Qt::SortOrder order=Qt::AscendingOrder) |
void | sortByValue (Qt::SortOrder order=Qt::AscendingOrder) |
QgsVectorColorRampV2 * | sourceColorRamp () |
Returns the source color ramp, from which each classes' color is derived. More... | |
QgsSymbolV2 * | sourceSymbol () |
Returns the renderer's source symbol, which is the base symbol used for the each classes' symbol before applying the classes' color. More... | |
virtual void | startRender (QgsRenderContext &context, const QgsFields &fields) override |
Needs to be called when a new render cycle is started. More... | |
virtual void | stopRender (QgsRenderContext &context) override |
Needs to be called when a render cycle has finished to clean up. More... | |
virtual QgsSymbolV2 * | symbolForFeature (QgsFeature &feature, QgsRenderContext &context) override |
virtual QgsSymbolV2List | symbols (QgsRenderContext &context) override |
virtual void | toSld (QDomDocument &doc, QDomElement &element) const override |
Writes the SLD element following the SLD v1.1 specs. More... | |
virtual void | toSld (QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const override |
Writes the SLD element following the SLD v1.1 specs. More... | |
void | updateClasses (QgsVectorLayer *vlayer, Mode mode, int nclasses) |
Recalculate classes for a layer. More... | |
void | updateColorRamp (QgsVectorColorRampV2 *ramp=nullptr, bool inverted=false) |
Update the color ramp used. More... | |
bool | updateRangeLabel (int rangeIndex, const QString &label) |
bool | updateRangeLowerValue (int rangeIndex, double value) |
bool | updateRangeRenderState (int rangeIndex, bool render) |
bool | updateRangeSymbol (int rangeIndex, QgsSymbolV2 *symbol) |
bool | updateRangeUpperValue (int rangeIndex, double value) |
void | updateSymbols (QgsSymbolV2 *sym) |
Update all the symbols but leave breaks and colors. More... | |
virtual QList< QString > | usedAttributes () override |
Returns a set of attributes required for this renderer. More... | |
Public Member Functions inherited from QgsFeatureRendererV2 | |
virtual | ~QgsFeatureRendererV2 () |
virtual const QgsFeatureRendererV2 * | embeddedRenderer () const |
Returns the current embedded renderer (subrenderer) for this feature renderer. More... | |
virtual QString | filter (const QgsFields &fields=QgsFields()) |
If a renderer does not require all the features this method may be overridden and return an expression used as where clause. More... | |
virtual bool | filterNeedsGeometry () const |
Returns true if this renderer requires the geometry to apply the filter. More... | |
bool | forceRasterRender () const |
Returns whether the renderer must render as a raster. More... | |
virtual void | modifyRequestExtent (QgsRectangle &extent, QgsRenderContext &context) |
Allows for a renderer to modify the extent of a feature request prior to rendering. More... | |
QgsFeatureRequest::OrderBy | orderBy () const |
Get the order in which features shall be processed by this renderer. More... | |
bool | orderByEnabled () const |
Returns whether custom ordering will be applied before features are processed by this renderer. More... | |
virtual Q_DECL_DEPRECATED QgsSymbolV2 * | originalSymbolForFeature (QgsFeature &feature) |
Return symbol for feature. More... | |
virtual Q_DECL_DEPRECATED QgsSymbolV2List | originalSymbolsForFeature (QgsFeature &feat) |
Equivalent of originalSymbolsForFeature() call extended to support renderers that may use more symbols per feature - similar to symbolsForFeature() More... | |
virtual QgsSymbolV2List | originalSymbolsForFeature (QgsFeature &feat, QgsRenderContext &context) |
Equivalent of originalSymbolsForFeature() call extended to support renderers that may use more symbols per feature - similar to symbolsForFeature() More... | |
QgsPaintEffect * | paintEffect () const |
Returns the current paint effect for the renderer. More... | |
virtual bool | renderFeature (QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) |
Render a feature using this renderer in the given context. More... | |
virtual void | setEmbeddedRenderer (QgsFeatureRendererV2 *subRenderer) |
Sets an embedded renderer (subrenderer) for this feature renderer. More... | |
void | setForceRasterRender (bool forceRaster) |
Sets whether the renderer should be rendered to a raster destination. More... | |
void | setOrderBy (const QgsFeatureRequest::OrderBy &orderBy) |
Define the order in which features shall be processed by this renderer. More... | |
void | setOrderByEnabled (bool enabled) |
Sets whether custom ordering should be applied before features are processed by this renderer. More... | |
void | setPaintEffect (QgsPaintEffect *effect) |
Sets the current paint effect for the renderer. More... | |
void | setUsingSymbolLevels (bool usingSymbolLevels) |
void | setVertexMarkerAppearance (int type, int size) |
set type and size of editing vertex markers for subsequent rendering More... | |
virtual Q_DECL_DEPRECATED void | startRender (QgsRenderContext &context, const QgsVectorLayer *vlayer) |
virtual Q_DECL_DEPRECATED QgsSymbolV2 * | symbolForFeature (QgsFeature &feature) |
To be overridden. More... | |
virtual Q_DECL_DEPRECATED QgsSymbolV2List | symbols () |
For symbol levels. More... | |
virtual Q_DECL_DEPRECATED QgsSymbolV2List | symbolsForFeature (QgsFeature &feat) |
Returns list of symbols used for rendering the feature. More... | |
virtual QgsSymbolV2List | symbolsForFeature (QgsFeature &feat, QgsRenderContext &context) |
Returns list of symbols used for rendering the feature. More... | |
QString | type () const |
bool | usingSymbolLevels () const |
virtual Q_DECL_DEPRECATED bool | willRenderFeature (QgsFeature &feat) |
Returns whether the renderer will render a feature or not. More... | |
virtual bool | willRenderFeature (QgsFeature &feat, QgsRenderContext &context) |
Returns whether the renderer will render a feature or not. More... | |
virtual Q_DECL_DEPRECATED QDomElement | writeSld (QDomDocument &doc, const QgsVectorLayer &layer) const |
create the SLD UserStyle element following the SLD v1.1 specs More... | |
virtual QDomElement | writeSld (QDomDocument &doc, const QString &styleName) const |
create the SLD UserStyle element following the SLD v1.1 specs with the given name More... | |
virtual QDomElement | writeSld (QDomDocument &doc, const QString &styleName, const QgsStringMap &props) const |
create the SLD UserStyle element following the SLD v1.1 specs with the given name More... | |
Static Public Member Functions | |
static QgsGraduatedSymbolRendererV2 * | convertFromRenderer (const QgsFeatureRendererV2 *renderer) |
creates a QgsGraduatedSymbolRendererV2 from an existing renderer. More... | |
static QgsFeatureRendererV2 * | create (QDomElement &element) |
create renderer from XML element More... | |
static QgsGraduatedSymbolRendererV2 * | createRenderer (QgsVectorLayer *vlayer, const QString &attrName, int classes, Mode mode, QgsSymbolV2 *symbol, QgsVectorColorRampV2 *ramp, bool inverted=false, const QgsRendererRangeV2LabelFormat &legendFormat=QgsRendererRangeV2LabelFormat()) |
Static Public Member Functions inherited from QgsFeatureRendererV2 | |
static QgsFeatureRendererV2 * | defaultRenderer (QGis::GeometryType geomType) |
return a new renderer - used by default in vector layers More... | |
static QgsFeatureRendererV2 * | load (QDomElement &symbologyElem) |
create a renderer from XML element More... | |
static QgsFeatureRendererV2 * | loadSld (const QDomNode &node, QGis::GeometryType geomType, QString &errorMessage) |
Create a new renderer according to the information contained in the UserStyle element of a SLD style document. More... | |
Protected Member Functions | |
QString | legendKeyForValue (double value) const |
Returns the matching legend key for a value. More... | |
QgsSymbolV2 * | symbolForValue (double value) |
Protected Member Functions inherited from QgsFeatureRendererV2 | |
QgsFeatureRendererV2 (const QString &type) | |
Q_DECL_DEPRECATED void | copyPaintEffect (QgsFeatureRendererV2 *destRenderer) const |
Copies paint effect of this renderer to another renderer. More... | |
void | copyRendererData (QgsFeatureRendererV2 *destRenderer) const |
Clones generic renderer data to another renderer. More... | |
void | renderFeatureWithSymbol (QgsFeature &feature, QgsSymbolV2 *symbol, QgsRenderContext &context, int layer, bool selected, bool drawVertexMarker) |
void | renderVertexMarker (QPointF pt, QgsRenderContext &context) |
render editing vertex marker at specified point More... | |
void | renderVertexMarkerPolygon (QPolygonF &pts, QList< QPolygonF > *rings, QgsRenderContext &context) |
render editing vertex marker for a polygon More... | |
void | renderVertexMarkerPolyline (QPolygonF &pts, QgsRenderContext &context) |
render editing vertex marker for a polyline More... | |
void | setScaleMethodToSymbol (QgsSymbolV2 *symbol, int scaleMethod) |
Static Protected Member Functions | |
static const char * | graduatedMethodStr (GraduatedMethod method) |
Static Protected Member Functions inherited from QgsFeatureRendererV2 | |
static QgsConstWkbPtr | _getLineString (QPolygonF &pts, QgsRenderContext &context, QgsConstWkbPtr &wkb, bool clipToExtent=true) |
Creates a line string in screen coordinates from a wkb string in map coordinates. More... | |
static QgsConstWkbPtr | _getPoint (QPointF &pt, QgsRenderContext &context, QgsConstWkbPtr &wkb) |
Creates a point in screen coordinates from a wkb string in map coordinates. More... | |
static QgsConstWkbPtr | _getPolygon (QPolygonF &pts, QList< QPolygonF > &holes, QgsRenderContext &context, QgsConstWkbPtr &wkb, bool clipToExtent=true) |
Creates a polygon in screen coordinates from a wkb string in map coordinates. More... | |
static void | convertSymbolRotation (QgsSymbolV2 *symbol, const QString &field) |
static void | convertSymbolSizeScale (QgsSymbolV2 *symbol, QgsSymbolV2::ScaleMethod method, const QString &field) |
Definition at line 132 of file qgsgraduatedsymbolrendererv2.h.
Enumerator | |
---|---|
GraduatedColor | |
GraduatedSize |
Definition at line 339 of file qgsgraduatedsymbolrendererv2.h.
Enumerator | |
---|---|
EqualInterval | |
Quantile | |
Jenks | |
StdDev | |
Pretty | |
Custom |
Definition at line 214 of file qgsgraduatedsymbolrendererv2.h.
QgsGraduatedSymbolRendererV2::QgsGraduatedSymbolRendererV2 | ( | const QString & | attrName = QString() , |
const QgsRangeList & | ranges = QgsRangeList() |
||
) |
Definition at line 286 of file qgsgraduatedsymbolrendererv2.cpp.
|
virtual |
Definition at line 309 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::addBreak | ( | double | breakValue, |
bool | updateSymbols = true |
||
) |
Add a breakpoint by splitting existing classes so that the specified value becomes a break between two classes.
breakValue | position to insert break |
updateSymbols | set to true to reapply ramp colors to the new symbol ranges |
Definition at line 1525 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::addClass | ( | QgsSymbolV2 * | symbol | ) |
Definition at line 1511 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::addClass | ( | const QgsRendererRangeV2 & | range | ) |
Definition at line 1564 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::addClass | ( | double | lower, |
double | upper | ||
) |
Definition at line 1518 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::calculateLabelPrecision | ( | bool | updateRanges = true | ) |
Reset the label decimal places to a numberbased on the minimum class interval.
updateRanges | if true then ranges currently using the default label will be updated |
Definition at line 1592 of file qgsgraduatedsymbolrendererv2.cpp.
|
inlineoverridevirtual |
returns bitwise OR-ed capabilities of the renderer
Reimplemented from QgsFeatureRendererV2.
Definition at line 161 of file qgsgraduatedsymbolrendererv2.h.
|
overridevirtual |
item in symbology was checked
Reimplemented from QgsFeatureRendererV2.
Definition at line 1493 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
Definition at line 166 of file qgsgraduatedsymbolrendererv2.h.
|
overridevirtual |
Implements QgsFeatureRendererV2.
Definition at line 543 of file qgsgraduatedsymbolrendererv2.cpp.
|
static |
creates a QgsGraduatedSymbolRendererV2 from an existing renderer.
Definition at line 1722 of file qgsgraduatedsymbolrendererv2.cpp.
|
static |
create renderer from XML element
Definition at line 986 of file qgsgraduatedsymbolrendererv2.cpp.
|
static |
Definition at line 844 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::deleteAllClasses | ( | ) |
Definition at line 1574 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::deleteClass | ( | int | idx | ) |
Definition at line 1569 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
for debugging
Reimplemented from QgsFeatureRendererV2.
Definition at line 535 of file qgsgraduatedsymbolrendererv2.cpp.
QList< double > QgsGraduatedSymbolRendererV2::getDataValues | ( | QgsVectorLayer * | vlayer | ) |
Evaluates the data expression and returns the list of values from the layer.
vlayer | The layer for which to evaluate the expression |
Definition at line 866 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
return the method used for graduation (either size or color)
Definition at line 343 of file qgsgraduatedsymbolrendererv2.h.
|
staticprotected |
Definition at line 1762 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
Definition at line 309 of file qgsgraduatedsymbolrendererv2.h.
|
inline |
Return the label format used to generate default classification labels.
Definition at line 241 of file qgsgraduatedsymbolrendererv2.h.
|
inlineoverridevirtual |
If supported by the renderer, return classification attribute for the use in legend.
Reimplemented from QgsFeatureRendererV2.
Definition at line 374 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Returns the matching legend key for a value.
Definition at line 330 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Return legend keys matching a specified feature.
Reimplemented from QgsFeatureRendererV2.
Definition at line 1282 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
item in symbology was checked
Reimplemented from QgsFeatureRendererV2.
Definition at line 1483 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
return a list of item text / symbol
Reimplemented from QgsFeatureRendererV2.
Definition at line 1298 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
items of symbology items in legend should be checkable
Reimplemented from QgsFeatureRendererV2.
Definition at line 1478 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Reimplemented from QgsFeatureRendererV2.
Definition at line 1232 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
return a list of symbology items for the legend
Reimplemented from QgsFeatureRendererV2.
Definition at line 1218 of file qgsgraduatedsymbolrendererv2.cpp.
double QgsGraduatedSymbolRendererV2::maxSymbolSize | ( | ) | const |
return the max symbol size when graduated by size
Definition at line 1347 of file qgsgraduatedsymbolrendererv2.cpp.
double QgsGraduatedSymbolRendererV2::minSymbolSize | ( | ) | const |
return the min symbol size when graduated by size
Definition at line 1332 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
Definition at line 224 of file qgsgraduatedsymbolrendererv2.h.
void QgsGraduatedSymbolRendererV2::moveClass | ( | int | from, |
int | to | ||
) |
Moves the category at index position from to index position to.
Definition at line 1621 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Reimplemented from QgsFeatureRendererV2.
Definition at line 396 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
Definition at line 169 of file qgsgraduatedsymbolrendererv2.h.
bool QgsGraduatedSymbolRendererV2::rangesHaveGaps | ( | ) | const |
Tests whether classes assigned to the renderer have gaps between the ranges.
Definition at line 1678 of file qgsgraduatedsymbolrendererv2.cpp.
bool QgsGraduatedSymbolRendererV2::rangesOverlap | ( | ) | const |
Tests whether classes assigned to the renderer have ranges which overlap.
Definition at line 1650 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
return rotation field name (or empty string if not set or not supported by renderer)
Reimplemented from QgsFeatureRendererV2.
Definition at line 1446 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
store renderer info to XML element
Reimplemented from QgsFeatureRendererV2.
Definition at line 1115 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
Definition at line 356 of file qgsgraduatedsymbolrendererv2.h.
|
inline |
Definition at line 167 of file qgsgraduatedsymbolrendererv2.h.
|
inline |
set the method used for graduation (either size or color)
Definition at line 347 of file qgsgraduatedsymbolrendererv2.h.
|
inline |
Definition at line 310 of file qgsgraduatedsymbolrendererv2.h.
void QgsGraduatedSymbolRendererV2::setLabelFormat | ( | const QgsRendererRangeV2LabelFormat & | labelFormat, |
bool | updateRanges = false |
||
) |
Set the label format used to generate default classification labels.
labelFormat | The string appended to classification labels |
updateRanges | If true then ranges ending with the old unit string are updated to the new. |
Definition at line 1579 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Sets the symbol to be used for a legend symbol item.
key | rule key for legend symbol |
symbol | new symbol for legend item. Ownership is transferred to renderer. |
Reimplemented from QgsFeatureRendererV2.
Definition at line 1501 of file qgsgraduatedsymbolrendererv2.cpp.
|
inline |
Definition at line 225 of file qgsgraduatedsymbolrendererv2.h.
|
overridevirtual |
sets rotation field of renderer (if supported by the renderer)
Reimplemented from QgsFeatureRendererV2.
Definition at line 1436 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::setScaleMethod | ( | QgsSymbolV2::ScaleMethod | scaleMethod | ) |
Definition at line 1468 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::setSizeScaleField | ( | const QString & | fieldOrExpression | ) |
Definition at line 1458 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::setSourceColorRamp | ( | QgsVectorColorRampV2 * | ramp | ) |
Sets the source color ramp.
ramp | color ramp. Ownership is transferred to the renderer |
Definition at line 1327 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::setSourceSymbol | ( | QgsSymbolV2 * | sym | ) |
Sets the source symbol for the renderer, which is the base symbol used for the each classes' symbol before applying the classes' color.
sym | source symbol, ownership is transferred to the renderer |
Definition at line 1317 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::setSymbolSizes | ( | double | minSize, |
double | maxSize | ||
) |
set varying symbol size for classes
Definition at line 1362 of file qgsgraduatedsymbolrendererv2.cpp.
QString QgsGraduatedSymbolRendererV2::sizeScaleField | ( | ) | const |
Definition at line 1463 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::sortByLabel | ( | Qt::SortOrder | order = Qt::AscendingOrder | ) |
Definition at line 1710 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::sortByValue | ( | Qt::SortOrder | order = Qt::AscendingOrder | ) |
Definition at line 1638 of file qgsgraduatedsymbolrendererv2.cpp.
QgsVectorColorRampV2 * QgsGraduatedSymbolRendererV2::sourceColorRamp | ( | ) |
Returns the source color ramp, from which each classes' color is derived.
Definition at line 1322 of file qgsgraduatedsymbolrendererv2.cpp.
QgsSymbolV2 * QgsGraduatedSymbolRendererV2::sourceSymbol | ( | ) |
Returns the renderer's source symbol, which is the base symbol used for the each classes' symbol before applying the classes' color.
Definition at line 1313 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Needs to be called when a new render cycle is started.
context | Additional information passed to the renderer about the job which will be rendered |
fields | The fields available for rendering |
Implements QgsFeatureRendererV2.
Definition at line 408 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Needs to be called when a render cycle has finished to clean up.
Implements QgsFeatureRendererV2.
Definition at line 440 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Reimplemented from QgsFeatureRendererV2.
Definition at line 348 of file qgsgraduatedsymbolrendererv2.cpp.
|
protected |
Definition at line 314 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Reimplemented from QgsFeatureRendererV2.
Definition at line 587 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Writes the SLD element following the SLD v1.1 specs.
Reimplemented from QgsFeatureRendererV2.
Definition at line 562 of file qgsgraduatedsymbolrendererv2.cpp.
|
overridevirtual |
Writes the SLD element following the SLD v1.1 specs.
Reimplemented from QgsFeatureRendererV2.
Definition at line 567 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::updateClasses | ( | QgsVectorLayer * | vlayer, |
Mode | mode, | ||
int | nclasses | ||
) |
Recalculate classes for a layer.
vlayer | The layer being rendered (from which data values are calculated) |
mode | The calculation mode |
nclasses | The number of classes to calculate (approximate for some modes) |
Definition at line 872 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::updateColorRamp | ( | QgsVectorColorRampV2 * | ramp = nullptr , |
bool | inverted = false |
||
) |
Update the color ramp used.
Also updates all symbols colors. Doesn't alter current breaks.
ramp | color ramp. Ownership is transferred to the renderer |
inverted | set to true to invert ramp colors |
Definition at line 1378 of file qgsgraduatedsymbolrendererv2.cpp.
bool QgsGraduatedSymbolRendererV2::updateRangeLabel | ( | int | rangeIndex, |
const QString & | label | ||
) |
Definition at line 497 of file qgsgraduatedsymbolrendererv2.cpp.
bool QgsGraduatedSymbolRendererV2::updateRangeLowerValue | ( | int | rangeIndex, |
double | value | ||
) |
Definition at line 516 of file qgsgraduatedsymbolrendererv2.cpp.
bool QgsGraduatedSymbolRendererV2::updateRangeRenderState | ( | int | rangeIndex, |
bool | render | ||
) |
Definition at line 527 of file qgsgraduatedsymbolrendererv2.cpp.
bool QgsGraduatedSymbolRendererV2::updateRangeSymbol | ( | int | rangeIndex, |
QgsSymbolV2 * | symbol | ||
) |
Definition at line 489 of file qgsgraduatedsymbolrendererv2.cpp.
bool QgsGraduatedSymbolRendererV2::updateRangeUpperValue | ( | int | rangeIndex, |
double | value | ||
) |
Definition at line 505 of file qgsgraduatedsymbolrendererv2.cpp.
void QgsGraduatedSymbolRendererV2::updateSymbols | ( | QgsSymbolV2 * | sym | ) |
Update all the symbols but leave breaks and colors.
This method also sets the source symbol for the renderer.
sym | source symbol to use for classes. Ownership is not transferred. |
Definition at line 1408 of file qgsgraduatedsymbolrendererv2.cpp.
Returns a set of attributes required for this renderer.
TODO QGIS3: Change QList to QSet
Implements QgsFeatureRendererV2.
Definition at line 460 of file qgsgraduatedsymbolrendererv2.cpp.
|
protected |
Definition at line 382 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
attribute index (derived from attribute name in startRender)
Definition at line 396 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 397 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 393 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 394 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 387 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 388 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 384 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 383 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 390 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 392 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 391 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 386 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
Definition at line 385 of file qgsgraduatedsymbolrendererv2.h.
|
protected |
temporary symbols, used for data-defined rotation and scaling
Definition at line 400 of file qgsgraduatedsymbolrendererv2.h.