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; }
132 bool mUseCustomDashPattern =
false;
139 bool mDrawInsidePolygon =
false;
143 void applyDataDefinedSymbology(
QgsSymbolRenderContext &context, QPen &pen, QPen &selPen,
double &offset );
148 #define DEFAULT_MARKERLINE_ROTATE true 149 #define DEFAULT_MARKERLINE_INTERVAL 3 196 QString layerType() const override;
204 void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings,
QgsSymbolRenderContext &context ) override;
210 void toSld( QDomDocument &doc, QDomElement &element, const
QgsStringMap &props ) const override;
212 void setColor( const QColor &color ) override;
213 QColor color() const override;
218 void setWidth(
double width ) override;
219 double width() const override;
230 bool rotateMarker()
const {
return mRotateMarker; }
351 double markerAngle(
const QPolygonF &points,
bool isRing,
int vertex );
380 void renderOffsetVertexAlongLine(
const QPolygonF &points,
int vertex,
double distance,
QgsSymbolRenderContext &context );
const QgsMapUnitScale & intervalMapUnitScale() const
Class for parsing and evaluation of expressions (formerly called "search strings").
virtual QVector< qreal > dxfCustomDashPattern(QgsUnitTypes::RenderUnit &unit) const
Gets dash pattern.
double interval() const
Returns the interval between individual markers.
QgsUnitTypes::RenderUnit customDashPatternUnit() const
Returns the units for lengths used in the custom dash pattern.
void setMapUnitScale(const QgsMapUnitScale &scale) override
virtual QString ogrFeatureStyle(double mmScaleFactor, double mapUnitScaleFactor) const
void setUseCustomDashPattern(bool b)
virtual double dxfOffset(const QgsDxfExport &e, QgsSymbolRenderContext &context) const
Gets offset.
void setRotateMarker(bool rotate)
Shall the marker be rotated.
QgsMapUnitScale mIntervalMapUnitScale
#define DEFAULT_MARKERLINE_INTERVAL
#define DEFAULT_SIMPLELINE_JOINSTYLE
const QgsMapUnitScale & offsetAlongLineMapUnitScale() const
Returns the map unit scale used for calculating the offset in map units along line for markers...
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
double offsetAlongLine() const
Returns the offset along the line for the marker placement.
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
QVector< qreal > customDashVector() const
#define DEFAULT_SIMPLELINE_CAPSTYLE
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
Qt::PenJoinStyle penJoinStyle() const
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)
void setPenStyle(Qt::PenStyle style)
virtual double estimateMaxBleed(const QgsRenderContext &context) const
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when ...
void setOffsetAlongLineUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit used for calculating the offset along line for markers.
void setPenCapStyle(Qt::PenCapStyle style)
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const
Returns the unit used for calculating the offset along line for markers.
virtual Qt::PenStyle dxfPenStyle() const
Gets pen style.
#define DEFAULT_SIMPLELINE_WIDTH
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
Contains information about the context of a rendering operation.
bool drawInsidePolygon() const
Struct for storing maximum and minimum scales for measurements in map units.
virtual void stopRender(QgsSymbolRenderContext &context)=0
void setCustomDashPatternMapUnitScale(const QgsMapUnitScale &scale)
virtual QColor dxfColor(QgsSymbolRenderContext &context) const
Gets color.
Qt::PenStyle penStyle() const
void setIntervalUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the interval between markers.
void setDrawInsidePolygon(bool drawInsidePolygon)
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)
const QgsMapUnitScale & customDashPatternMapUnitScale() const
QgsMapUnitScale mCustomDashPatternMapUnitScale
void setOffsetAlongLine(double offsetAlongLine)
Sets the the offset along the line for the marker placement.
Placement placement() const
The placement of the markers.
Qt::PenCapStyle penCapStyle() const
QgsUnitTypes::RenderUnit intervalUnit() const
Returns the units for the interval between markers.
#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 QString layerType() const =0
Returns a string that represents this layer type.