18 #ifndef QGSPOINTDISPLACEMENTRENDERER_H
19 #define QGSPOINTDISPLACEMENTRENDERER_H
39 virtual void toSld( QDomDocument& doc, QDomElement &element )
const;
55 QDomElement
save( QDomDocument& doc );
70 void setDisplacementGroups(
const QList<QMap<QgsFeatureId, QgsFeature> >& list );
138 void printInfoDisplacementGroups();
144 void renderPoint(
const QPointF& point,
QgsSymbolV2RenderContext& context,
const QList<QgsMarkerSymbolV2*>& symbols,
145 const QStringList& labels );
148 void calculateSymbolAndLabelPositions(
const QPointF& centerPoint,
int nPosition,
double radius,
double symbolDiagonal, QList<QPointF>& symbolPositions, QList<QPointF>& labelShifts )
const;
149 void drawCircle(
double radiusPainterUnits,
QgsSymbolV2RenderContext& context,
const QPointF& centerPoint,
int nSymbols );
150 void drawSymbols(
QgsFeature& f,
QgsRenderContext& context,
const QList<QgsMarkerSymbolV2*>& symbolList,
const QList<QPointF>& symbolPositions,
bool selected =
false );
151 void drawLabels(
const QPointF& centerPoint,
QgsSymbolV2RenderContext& context,
const QList<QPointF>& labelShifts,
const QStringList& labelList );
156 #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
QList< QMap< QgsFeatureId, QgsFeature > > mDisplacementGroups
Groups of features that have the same position.
virtual QgsLegendSymbolList legendSymbolItems(double scaleDenominator=-1, QString rule="")
return a list of item text / symbol
void setMaxLabelScaleDenominator(double d)
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 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
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.
QSet< QgsFeatureId > mDisplacementIds
Set that contains all the ids the display groups (for quicker lookup)
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.
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.
void setCircleColor(const QColor &c)
virtual void startRender(QgsRenderContext &context, const QgsVectorLayer *vlayer)=0
QgsMarkerSymbolV2 * centerSymbol()
Returns the symbol for the center of a displacement group (but not ownership of the symbol) ...
Represents a vector layer which manages a vector based data sets.
QList< QPair< QString, QgsSymbolV2 * > > QgsLegendSymbolList
virtual QgsSymbolV2 * symbolForFeature(QgsFeature &feature)=0
to be overridden
QColor labelColor() const
void setTolerance(double t)
double circleRadiusAddition() const