QGIS API Documentation
2.8.2-Wien
|
#include <qgssinglesymbolrendererv2.h>
Public Member Functions | |
QgsSingleSymbolRendererV2 (QgsSymbolV2 *symbol) | |
virtual | ~QgsSingleSymbolRendererV2 () |
virtual int | capabilities () override |
returns bitwise OR-ed capabilities of the renderer | |
virtual QgsFeatureRendererV2 * | clone () const override |
virtual QString | dump () const override |
for debugging | |
virtual QgsLegendSymbolList | legendSymbolItems (double scaleDenominator=-1, QString rule=QString()) override |
return a list of item text / symbol | |
virtual QgsLegendSymbolListV2 | legendSymbolItemsV2 () const override |
Return a list of symbology items for the legend. | |
virtual QgsLegendSymbologyList | legendSymbologyItems (QSize iconSize) override |
return a list of symbology items for the legend | |
virtual QgsSymbolV2 * | originalSymbolForFeature (QgsFeature &feature) override |
Return symbol for feature. | |
QString | rotationField () const override |
return rotation field name (or empty string if not set or not supported by renderer) | |
virtual QDomElement | save (QDomDocument &doc) override |
store renderer info to XML element | |
QgsSymbolV2::ScaleMethod | scaleMethod () const |
void | setRotationField (QString fieldOrExpression) override |
sets rotation field of renderer (if supported by the renderer) | |
void | setScaleMethod (QgsSymbolV2::ScaleMethod scaleMethod) |
void | setSizeScaleField (QString fieldOrExpression) |
void | setSymbol (QgsSymbolV2 *s) |
QString | sizeScaleField () const |
virtual void | startRender (QgsRenderContext &context, const QgsFields &fields) override |
virtual void | stopRender (QgsRenderContext &context) override |
QgsSymbolV2 * | symbol () const |
virtual QgsSymbolV2 * | symbolForFeature (QgsFeature &feature) override |
to be overridden | |
virtual QgsSymbolV2List | symbols () override |
for symbol levels | |
virtual void | toSld (QDomDocument &doc, QDomElement &element) const override |
used from subclasses to create SLD Rule elements following SLD v1.1 specs | |
virtual QList< QString > | usedAttributes () override |
Public Member Functions inherited from QgsFeatureRendererV2 | |
virtual | ~QgsFeatureRendererV2 () |
virtual void | checkLegendSymbolItem (QString key, bool state=true) |
item in symbology was checked | |
virtual QString | legendClassificationAttribute () const |
If supported by the renderer, return classification attribute for the use in legend. | |
virtual bool | legendSymbolItemChecked (QString key) |
items of symbology items in legend is checked | |
virtual bool | legendSymbolItemsCheckable () const |
items of symbology items in legend should be checkable | |
virtual void | modifyRequestExtent (QgsRectangle &extent, QgsRenderContext &context) |
Allows for a renderer to modify the extent of a feature request prior to rendering. | |
virtual QgsSymbolV2List | originalSymbolsForFeature (QgsFeature &feat) |
Equivalent of originalSymbolsForFeature() call extended to support renderers that may use more symbols per feature - similar to symbolsForFeature() | |
virtual bool | renderFeature (QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) |
void | setUsingSymbolLevels (bool usingSymbolLevels) |
void | setVertexMarkerAppearance (int type, int size) |
set type and size of editing vertex markers for subsequent rendering | |
virtual Q_DECL_DEPRECATED void | startRender (QgsRenderContext &context, const QgsVectorLayer *vlayer) |
virtual QgsSymbolV2List | symbolsForFeature (QgsFeature &feat) |
return list of symbols used for rendering the feature. | |
QString | type () const |
bool | usingSymbolLevels () const |
virtual bool | willRenderFeature (QgsFeature &feat) |
return whether the renderer will render a feature or not. | |
virtual Q_DECL_DEPRECATED QDomElement | writeSld (QDomDocument &doc, const QgsVectorLayer &layer) const |
create the SLD UserStyle element following the SLD v1.1 specs | |
virtual QDomElement | writeSld (QDomDocument &doc, const QString &styleName) const |
create the SLD UserStyle element following the SLD v1.1 specs with the given name |
Static Public Member Functions | |
static QgsSingleSymbolRendererV2 * | convertFromRenderer (const QgsFeatureRendererV2 *renderer) |
creates a QgsSingleSymbolRendererV2 from an existing renderer. | |
static QgsFeatureRendererV2 * | create (QDomElement &element) |
create renderer from XML element | |
static QgsFeatureRendererV2 * | createFromSld (QDomElement &element, QGis::GeometryType geomType) |
Static Public Member Functions inherited from QgsFeatureRendererV2 | |
static QgsFeatureRendererV2 * | defaultRenderer (QGis::GeometryType geomType) |
return a new renderer - used by default in vector layers | |
static QgsFeatureRendererV2 * | load (QDomElement &symbologyElem) |
create a renderer from XML element | |
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 |
Protected Attributes | |
double | mOrigSize |
QScopedPointer< QgsExpression > | mRotation |
QgsSymbolV2::ScaleMethod | mScaleMethod |
QScopedPointer< QgsExpression > | mSizeScale |
QScopedPointer< QgsSymbolV2 > | mSymbol |
QScopedPointer< QgsSymbolV2 > | mTempSymbol |
Protected Attributes inherited from QgsFeatureRendererV2 | |
int | mCurrentVertexMarkerSize |
The current size of editing marker. | |
int | mCurrentVertexMarkerType |
The current type of editing marker. | |
QString | mType |
bool | mUsingSymbolLevels |
Additional Inherited Members | |
Public Types inherited from QgsFeatureRendererV2 | |
enum | Capabilities { SymbolLevels = 1, RotationField = 1 << 1, MoreSymbolsPerFeature = 1 << 2, Filter = 1 << 3, ScaleDependent = 1 << 4 } |
Protected Member Functions inherited from QgsFeatureRendererV2 | |
QgsFeatureRendererV2 (QString type) | |
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 | |
void | renderVertexMarkerPolygon (QPolygonF &pts, QList< QPolygonF > *rings, QgsRenderContext &context) |
render editing vertex marker for a polygon | |
void | renderVertexMarkerPolyline (QPolygonF &pts, QgsRenderContext &context) |
render editing vertex marker for a polyline | |
void | setScaleMethodToSymbol (QgsSymbolV2 *symbol, int scaleMethod) |
Static Protected Member Functions inherited from QgsFeatureRendererV2 | |
static const unsigned char * | _getLineString (QPolygonF &pts, QgsRenderContext &context, const unsigned char *wkb) |
static const unsigned char * | _getPoint (QPointF &pt, QgsRenderContext &context, const unsigned char *wkb) |
static const unsigned char * | _getPolygon (QPolygonF &pts, QList< QPolygonF > &holes, QgsRenderContext &context, const unsigned char *wkb) |
Definition at line 24 of file qgssinglesymbolrendererv2.h.
QgsSingleSymbolRendererV2::QgsSingleSymbolRendererV2 | ( | QgsSymbolV2 * | symbol | ) |
Definition at line 32 of file qgssinglesymbolrendererv2.cpp.
|
virtual |
Definition at line 41 of file qgssinglesymbolrendererv2.cpp.
|
inlineoverridevirtual |
returns bitwise OR-ed capabilities of the renderer
Reimplemented from QgsFeatureRendererV2.
Definition at line 62 of file qgssinglesymbolrendererv2.h.
|
overridevirtual |
Implements QgsFeatureRendererV2.
Definition at line 179 of file qgssinglesymbolrendererv2.cpp.
|
static |
creates a QgsSingleSymbolRendererV2 from an existing renderer.
Definition at line 386 of file qgssinglesymbolrendererv2.cpp.
|
static |
create renderer from XML element
Definition at line 215 of file qgssinglesymbolrendererv2.cpp.
|
static |
Definition at line 246 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
for debugging
Reimplemented from QgsFeatureRendererV2.
Definition at line 174 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
return a list of item text / symbol
Reimplemented from QgsFeatureRendererV2.
Definition at line 370 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
Return a list of symbology items for the legend.
Better choice than legendSymbolItems().
Reimplemented from QgsFeatureRendererV2.
Definition at line 379 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
return a list of symbology items for the legend
Reimplemented from QgsFeatureRendererV2.
Definition at line 359 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
Return symbol for feature.
The difference compared to symbolForFeature() is that it returns original symbol which can be used as an identifier for renderer's rule - the former may return a temporary replacement of a symbol for use in rendering.
Reimplemented from QgsFeatureRendererV2.
Definition at line 73 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
return rotation field name (or empty string if not set or not supported by renderer)
Reimplemented from QgsFeatureRendererV2.
Definition at line 153 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
store renderer info to XML element
Reimplemented from QgsFeatureRendererV2.
Definition at line 334 of file qgssinglesymbolrendererv2.cpp.
|
inline |
Definition at line 52 of file qgssinglesymbolrendererv2.h.
|
overridevirtual |
sets rotation field of renderer (if supported by the renderer)
Reimplemented from QgsFeatureRendererV2.
Definition at line 148 of file qgssinglesymbolrendererv2.cpp.
void QgsSingleSymbolRendererV2::setScaleMethod | ( | QgsSymbolV2::ScaleMethod | scaleMethod | ) |
Definition at line 168 of file qgssinglesymbolrendererv2.cpp.
void QgsSingleSymbolRendererV2::setSizeScaleField | ( | QString | fieldOrExpression | ) |
Definition at line 158 of file qgssinglesymbolrendererv2.cpp.
void QgsSingleSymbolRendererV2::setSymbol | ( | QgsSymbolV2 * | s | ) |
Definition at line 142 of file qgssinglesymbolrendererv2.cpp.
QString QgsSingleSymbolRendererV2::sizeScaleField | ( | ) | const |
Definition at line 163 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
Implements QgsFeatureRendererV2.
Definition at line 79 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
Implements QgsFeatureRendererV2.
Definition at line 114 of file qgssinglesymbolrendererv2.cpp.
QgsSymbolV2 * QgsSingleSymbolRendererV2::symbol | ( | ) | const |
Definition at line 137 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
to be overridden
feature | feature |
Implements QgsFeatureRendererV2.
Definition at line 45 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
for symbol levels
Implements QgsFeatureRendererV2.
Definition at line 208 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
used from subclasses to create SLD Rule elements following SLD v1.1 specs
Reimplemented from QgsFeatureRendererV2.
Definition at line 189 of file qgssinglesymbolrendererv2.cpp.
|
overridevirtual |
Implements QgsFeatureRendererV2.
Definition at line 128 of file qgssinglesymbolrendererv2.cpp.
|
protected |
Definition at line 96 of file qgssinglesymbolrendererv2.h.
|
protected |
Definition at line 90 of file qgssinglesymbolrendererv2.h.
|
protected |
Definition at line 92 of file qgssinglesymbolrendererv2.h.
|
protected |
Definition at line 91 of file qgssinglesymbolrendererv2.h.
|
protected |
Definition at line 89 of file qgssinglesymbolrendererv2.h.
|
protected |
Definition at line 95 of file qgssinglesymbolrendererv2.h.