16 #ifndef QGSLINESYMBOLLAYERV2_H 17 #define QGSLINESYMBOLLAYERV2_H 19 #include "qgis_core.h" 28 #define DEFAULT_SIMPLELINE_COLOR QColor(35,35,35) 29 #define DEFAULT_SIMPLELINE_WIDTH DEFAULT_LINE_WIDTH 30 #define DEFAULT_SIMPLELINE_PENSTYLE Qt::SolidLine 31 #define DEFAULT_SIMPLELINE_JOINSTYLE Qt::BevelJoin 32 #define DEFAULT_SIMPLELINE_CAPSTYLE Qt::SquareCap 67 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
69 QString
ogrFeatureStyle(
double mmScaleFactor,
double mapUnitScaleFactor )
const override;
81 Qt::PenStyle
penStyle()
const {
return mPenStyle; }
149 bool mUseCustomDashPattern =
false;
156 bool mDrawInsidePolygon =
false;
160 void applyDataDefinedSymbology(
QgsSymbolRenderContext &context, QPen &pen, QPen &selPen,
double &offset );
165 #define DEFAULT_MARKERLINE_ROTATE true 166 #define DEFAULT_MARKERLINE_INTERVAL 3 213 QString layerType() const override;
221 void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
227 void toSld( QDomDocument &doc, QDomElement &element, const
QgsStringMap &props ) const override;
229 void setColor( const QColor &color ) override;
230 QColor color() const override;
235 void setWidth(
double width ) override;
236 double width() const override;
248 bool rotateMarker()
const {
return mRotateMarker; }
370 double markerAngle(
const QPolygonF &points,
bool isRing,
int vertex );
399 void renderOffsetVertexAlongLine(
const QPolygonF &points,
int vertex,
double distance,
QgsSymbolRenderContext &context );
Class for parsing and evaluation of expressions (formerly called "search strings").
Placement placement() const
The placement of the markers.
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
void setMapUnitScale(const QgsMapUnitScale &scale) override
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
Abstract base class for all rendered symbols.
void setUseCustomDashPattern(bool b)
double interval() const
Returns the interval between individual markers.
virtual double dxfOffset(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets offset.
const QgsMapUnitScale & intervalMapUnitScale() const
void setRotateMarker(bool rotate)
Shall the marker be rotated.
QgsMapUnitScale mIntervalMapUnitScale
#define DEFAULT_MARKERLINE_INTERVAL
#define DEFAULT_SIMPLELINE_JOINSTYLE
QgsUnitTypes::RenderUnit customDashPatternUnit() const
Returns the units for lengths used in the custom dash pattern.
Qt::PenStyle penStyle() const
virtual QVector< qreal > dxfCustomDashPattern(QgsUnitTypes::RenderUnit &unit) const
Gets dash pattern.
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
double dxfWidth(const QgsDxfExport &e, QgsSymbolRenderContext &context) const override
Gets line width.
QMap< QString, QString > QgsStringMap
QgsMapUnitScale mOffsetAlongLineMapUnitScale
virtual void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context)=0
void setInterval(double interval)
Sets the interval between individual markers.
void setCustomDashPatternUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for lengths used in the custom dash pattern.
std::unique_ptr< QgsMarkerSymbol > mMarker
Placement
Defines how/where the marker should be placed on the line.
void setPlacement(Placement p)
The placement of the markers.
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
QgsUnitTypes::RenderUnit mIntervalUnit
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const
Returns the unit used for calculating the offset along line for markers.
#define DEFAULT_SIMPLELINE_CAPSTYLE
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties...
const QgsMapUnitScale & customDashPatternMapUnitScale() const
const QgsMapUnitScale & offsetAlongLineMapUnitScale() const
Returns the map unit scale used for calculating the offset in map units along line for markers...
QVector< qreal > customDashVector() const
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
#define DEFAULT_SIMPLELINE_PENSTYLE
QgsUnitTypes::RenderUnit mOffsetAlongLineUnit
#define DEFAULT_SIMPLELINE_COLOR
bool useCustomDashPattern() const
A store for object properties.
void setOffsetAlongLineMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for calculating the offset in map units along line for markers...
void setIntervalMapUnitScale(const QgsMapUnitScale &scale)
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
void setPenStyle(Qt::PenStyle style)
void setOffsetAlongLineUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit used for calculating the offset along line for markers.
Qt::PenJoinStyle penJoinStyle() const
void setPenCapStyle(Qt::PenCapStyle style)
#define DEFAULT_SIMPLELINE_WIDTH
Contains information about the context of a rendering operation.
Struct for storing maximum and minimum scales for measurements in map units.
virtual void stopRender(QgsSymbolRenderContext &context)=0
void setCustomDashPatternMapUnitScale(const QgsMapUnitScale &scale)
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
void setIntervalUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the interval between markers.
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
void setDrawInsidePolygon(bool drawInsidePolygon)
Sets whether the line should only be drawn inside polygons, and any portion of the line which falls o...
QgsUnitTypes::RenderUnit intervalUnit() const
Returns the units for the interval between markers.
void setCustomDashVector(const QVector< qreal > &vector)
QVector< qreal > mCustomDashVector
Vector with an even number of entries for the.
virtual void renderPolygonStroke(const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolRenderContext &context)
QgsMapUnitScale mCustomDashPatternMapUnitScale
bool drawInsidePolygon() const
Returns true if the line should only be drawn inside polygons, and any portion of the line which fall...
void setOffsetAlongLine(double offsetAlongLine)
Sets the the offset along the line for the marker placement.
Qt::PenCapStyle penCapStyle() const
#define DEFAULT_MARKERLINE_ROTATE
QgsMapUnitScale mapUnitScale() const override
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
Property
Data definable properties.
RenderUnit
Rendering size units.
virtual void setDataDefinedProperty(Property key, const QgsProperty &property)
Sets a data defined property for the layer.
void setPenJoinStyle(Qt::PenJoinStyle style)
virtual void startRender(QgsSymbolRenderContext &context)=0
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
virtual QString layerType() const =0
Returns a string that represents this layer type.
double offsetAlongLine() const
Returns the offset along the line for the marker placement.