18 #ifndef QGSVECTORFIELDSYMBOLLAYER_H 19 #define QGSVECTORFIELDSYMBOLLAYER_H 21 #include "qgis_core.h" 40 ClockwiseFromNorth = 0,
41 CounterclockwiseFromEast
55 QString
layerType()
const override {
return QStringLiteral(
"VectorField" ); }
60 void setColor(
const QColor &color )
override;
61 QColor
color()
const override;
70 void toSld( QDomDocument &doc, QDomElement &element,
const QgsStringMap &props )
const override;
77 void setXAttribute(
const QString &attribute ) { mXAttribute = attribute; }
79 void setYAttribute(
const QString &attribute ) { mYAttribute = attribute; }
82 double scale()
const {
return mScale; }
129 std::unique_ptr< QgsLineSymbol > mLineSymbol;
136 void convertPolarToCartesian(
double length,
double angle,
double &x,
double &y )
const;
139 #endif // QGSVECTORFIELDSYMBOLLAYER_H
QgsMapUnitScale mapUnitScale() const override
void setXAttribute(const QString &attribute)
void setYAttribute(const QString &attribute)
QgsUnitTypes::RenderUnit outputUnit() const override
Returns the units to use for sizes and widths within the symbol layer.
void setAngleUnits(AngleUnits units)
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the distance.
AngleOrientation angleOrientation() const
void startRender(QgsSymbolRenderContext &context) override
QString yAttribute() const
virtual QgsStringMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
QMap< QString, QString > QgsStringMap
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
QString layerType() const override
Returns a string that represents this layer type.
virtual void setColor(const QColor &color)
The fill color.
A symbol layer class for displaying displacement arrows based on point layer attributes.
virtual bool setSubSymbol(QgsSymbol *symbol)
set layer's subsymbol. takes ownership of the passed symbol
const QgsMapUnitScale & distanceMapUnitScale() const
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
virtual void renderPoint(QPointF point, QgsSymbolRenderContext &context)=0
Renders a marker at the specified point.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QColor color() const
The fill color.
QgsSymbol::SymbolType type() const
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance.
AngleUnits angleUnits() const
QString xAttribute() 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.
Abstract base class for marker symbol layers.
Struct for storing maximum and minimum scales for measurements in map units.
virtual void stopRender(QgsSymbolRenderContext &context)=0
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setAngleOrientation(AngleOrientation orientation)
void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const override
VectorFieldType vectorFieldType() const
QRectF bounds(QPointF, QgsSymbolRenderContext &) override
Returns the approximate bounding box of the marker symbol layer, taking into account any data defined...
void setVectorFieldType(VectorFieldType type)
void setOutputUnit(QgsUnitTypes::RenderUnit unit) override
Sets the units to use for sizes and widths within the symbol layer.
RenderUnit
Rendering size units.
void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override