18 #ifndef QGSPOINTDISPLACEMENTRENDERER_H
19 #define QGSPOINTDISPLACEMENTRENDERER_H
39 virtual void toSld( QDomDocument& doc, QDomElement &element )
const;
55 QDomElement
save( QDomDocument& doc );
71 Q_DECL_DEPRECATED
void setDisplacementGroups(
const QList<QMap<QgsFeatureId, QgsFeature> >& list ) { Q_UNUSED( list ); }
142 void printInfoDisplacementGroups();
148 void renderPoint(
const QPointF& point,
QgsSymbolV2RenderContext& context,
const QList<QgsMarkerSymbolV2*>& symbols,
149 const QStringList& labels );
152 void calculateSymbolAndLabelPositions(
const QPointF& centerPoint,
int nPosition,
double radius,
double symbolDiagonal, QList<QPointF>& symbolPositions, QList<QPointF>& labelShifts )
const;
154 void drawCircle(
double radiusPainterUnits,
QgsSymbolV2RenderContext& context,
const QPointF& centerPoint,
int nSymbols );
155 void drawSymbols(
const QgsFeature& f,
QgsRenderContext& context,
const QList<QgsMarkerSymbolV2*>& symbolList,
const QList<QPointF>& symbolPositions,
bool selected =
false );
156 void drawLabels(
const QPointF& centerPoint,
QgsSymbolV2RenderContext& context,
const QList<QPointF>& labelShifts,
const QStringList& labelList );
161 #endif // QGSPOINTDISPLACEMENTRENDERER_H
A rectangle specified with double values.
QgsMarkerSymbolV2 * mCenterSymbol
Center symbol for a displacement group.
QList< QgsSymbolV2 * > QgsSymbolV2List
double maxLabelScaleDenominator() const
void setLabelAttributeName(const QString &name)
void setLabelFont(const QFont &f)
virtual QDomElement save(QDomDocument &doc)
store renderer info to XML element
virtual QgsLegendSymbolList legendSymbolItems(double scaleDenominator=-1, QString rule="")
return a list of item text / symbol
void setMaxLabelScaleDenominator(double d)
Container of fields for a vector layer.
virtual QList< QString > usedAttributes()=0
QColor mCircleColor
Color to draw the circle.
double circleWidth() const
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
double mCircleWidth
Line width for the circle.
virtual QgsLegendSymbologyList legendSymbologyItems(QSize iconSize)
return a list of symbology items for the legend
int mLabelIndex
Label attribute index (or -1 if none).
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)=0
virtual void stopRender(QgsRenderContext &context)=0
virtual QgsSymbolV2List symbols()=0
for symbol levels
virtual bool renderFeature(QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false)
QFont mLabelFont
Font that is passed to the renderer.
virtual QgsFeatureRendererV2 * clone()=0
QgsFeatureRendererV2 * embeddedRenderer()
QString labelAttributeName() const
QSet< QgsFeatureId > mSelectedFeatures
keeps trask which features are selected
double mMaxLabelScaleDenominator
Maximum scale denominator for label display.
bool mDrawLabels
Is set internally from startRender() depending on scale denominator.
void setLabelColor(const QColor &c)
double mTolerance
Tolerance.
QString mLabelAttributeName
Attribute name for labeling.
A class to represent a point geometry.
QList< QPair< QString, QPixmap > > QgsLegendSymbologyList
void setCircleRadiusAddition(double d)
QColor circleColor() const
virtual void toSld(QDomDocument &doc, QDomElement &element) const
used from subclasses to create SLD Rule elements following SLD v1.1 specs
A renderer that automatically displaces points with the same position.
QMap< QgsFeatureId, QgsFeature > DisplacementGroup
QgsSpatialIndex * mSpatialIndex
Spatial index for fast lookup of close points.
void setCircleWidth(double w)
Contains information about the context of a rendering operation.
double mCircleRadiusAddition
Addition to the default circle radius.
QgsFeatureRendererV2 * mRenderer
Embedded renderer.
Q_DECL_DEPRECATED void setDisplacementGroups(const QList< QMap< QgsFeatureId, QgsFeature > > &list)
not available in python bindings
void setCircleColor(const QColor &c)
QMap< QgsFeatureId, int > mGroupIndex
Mapping from feature ID to its group index.
QList< DisplacementGroup > mDisplacementGroups
Groups of features that have the same position.
QgsMarkerSymbolV2 * centerSymbol()
Returns the symbol for the center of a displacement group (but not ownership of the symbol) ...
QList< QPair< QString, QgsSymbolV2 * > > QgsLegendSymbolList
virtual QgsSymbolV2 * symbolForFeature(QgsFeature &feature)=0
to be overridden
QColor labelColor() const
void setTolerance(double t)
double circleRadiusAddition() const