19 #include "qgis_core.h" 33 #include <QDomDocument> 34 #include <QDomElement> 50 #define RENDERER_TAG_NAME "renderer-v2" 97 const QString type = sipCpp->type();
99 if ( type == QStringLiteral(
"singleSymbol" ) )
100 sipType = sipType_QgsSingleSymbolRenderer;
101 else if ( type == QStringLiteral(
"categorizedSymbol" ) )
102 sipType = sipType_QgsCategorizedSymbolRenderer;
103 else if ( type == QStringLiteral(
"graduatedSymbol" ) )
104 sipType = sipType_QgsGraduatedSymbolRenderer;
105 else if ( type == QStringLiteral(
"RuleRenderer" ) )
106 sipType = sipType_QgsRuleBasedRenderer;
107 else if ( type == QStringLiteral(
"heatmapRenderer" ) )
108 sipType = sipType_QgsHeatmapRenderer;
109 else if ( type == QStringLiteral(
"invertedPolygonRenderer" ) )
110 sipType = sipType_QgsInvertedPolygonRenderer;
111 else if ( type == QStringLiteral(
"pointCluster" ) )
112 sipType = sipType_QgsPointClusterRenderer;
113 else if ( type == QStringLiteral(
"pointDisplacement" ) )
114 sipType = sipType_QgsPointDisplacementRenderer;
115 else if ( type == QStringLiteral(
"25dRenderer" ) )
116 sipType = sipType_Qgs25DRenderer;
117 else if ( type == QStringLiteral(
"nullSymbol" ) )
118 sipType = sipType_QgsNullSymbolRenderer;
130 QString
type()
const {
return mType; }
202 virtual QSet<QString> usedAttributes(
const QgsRenderContext &context )
const = 0;
207 virtual bool filterNeedsGeometry()
const;
235 virtual QString dump()
const;
244 MoreSymbolsPerFeature = 1 << 2,
246 ScaleDependent = 1 << 4
285 virtual QDomElement writeSld( QDomDocument &doc,
const QString &styleName,
const QgsStringMap &props =
QgsStringMap() )
const;
303 element.appendChild( doc.createComment( QStringLiteral(
"FeatureRenderer %1 not implemented yet" ).arg( type() ) ) );
311 virtual bool legendSymbolItemsCheckable()
const;
317 virtual bool legendSymbolItemChecked(
const QString &key );
323 virtual void checkLegendSymbolItem(
const QString &key,
bool state =
true );
346 void setVertexMarkerAppearance(
int type,
double size );
435 bool orderByEnabled()
const;
444 void setOrderByEnabled(
bool enabled );
488 void renderVertexMarkerPolyline( QPolygonF &pts,
QgsRenderContext &context );
490 void renderVertexMarkerPolygon( QPolygonF &pts, QList<QPolygonF> *rings,
QgsRenderContext &context );
531 static void convertSymbolRotation(
QgsSymbol *symbol,
const QString &field );
544 QThread *mThread =
nullptr;
551 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureRenderer::Capabilities )
557 #endif // QGSRENDERER_H The class is used as a container of context for various read/write operations on other objects...
QMap< QString, QString > QgsStringMap
A rectangle specified with double values.
QList< QgsLegendSymbolItem > QgsLegendSymbolList
QgsFeatureRequest::OrderBy mOrderBy
virtual QString legendClassificationAttribute() const
If supported by the renderer, return classification attribute for the use in legend.
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
virtual QString filter(const QgsFields &fields=QgsFields())
If a renderer does not require all the features this method may be overridden and return an expressio...
bool forceRasterRender() const
Returns whether the renderer must render as a raster.
Base class for visual effects which can be applied to QPicture drawings.
Container of fields for a vector layer.
void setUsingSymbolLevels(bool usingSymbolLevels)
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.
QMap< QString, QString > QgsStringMap
QList< QgsSymbolLevel > QgsSymbolLevelOrder
QList< QgsSymbol * > QgsSymbolList
void setForceRasterRender(bool forceRaster)
Sets whether the renderer should be rendered to a raster destination.
QgsSymbolLevelItem(QgsSymbol *symbol, int layer)
Capability
Used to specify details about a renderer.
Point geometry type, with support for z-dimension and m-values.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Contains information about the context of a rendering operation.
bool usingSymbolLevels() const
QList< QgsSymbolLevelItem > QgsSymbolLevel
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
QMap< QString, QgsSymbol *> QgsSymbolMap
Custom exception class for Coordinate Reference System related exceptions.
int mCurrentVertexMarkerType
The current type of editing marker.
Represents a vector layer which manages a vector based data sets.
double mCurrentVertexMarkerSize
The current size of editing marker.
Represents a list of OrderByClauses, with the most important first and the least important last...