QGIS/python/core/auto_generated/symbology/qgslinesymbollayer.sip.in

529 lines
15 KiB
Plaintext
Raw Normal View History

2017-06-07 16:07:17 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgslinesymbollayer.h *
2017-06-07 16:07:17 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-08-06 11:01:42 +02:00
class QgsSimpleLineSymbolLayer : QgsLineSymbolLayer
{
2019-03-20 07:17:54 +10:00
%Docstring
A simple line symbol layer, which renders lines using a line in a variety of styles (e.g. solid, dotted, dashed).
%End
2017-06-07 16:07:17 +02:00
%TypeHeaderCode
2017-06-07 16:07:17 +02:00
#include "qgslinesymbollayer.h"
%End
public:
2019-03-20 07:17:54 +10:00
2017-06-07 16:07:17 +02:00
QgsSimpleLineSymbolLayer( const QColor &color = DEFAULT_SIMPLELINE_COLOR,
double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );
2019-03-20 07:17:54 +10:00
%Docstring
Constructor for QgsSimpleLineSymbolLayer. Creates a simple line
symbol in the specified ``color``, ``width`` (in millimeters)
and ``penStyle``.
%End
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2019-03-20 07:17:54 +10:00
%Docstring
Creates a new QgsSimpleLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
QgsSimpleLineSymbolLayer.properties() ).
%End
2017-06-07 16:07:17 +02:00
2019-03-20 07:17:54 +10:00
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
%Docstring
Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM ``element``.
%End
2017-06-07 16:07:17 +02:00
virtual QString layerType() const;
2017-06-07 16:07:17 +02:00
virtual void startRender( QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
virtual QgsStringMap properties() const;
2014-05-27 23:22:50 +02:00
virtual QgsSimpleLineSymbolLayer *clone() const /Factory/;
2017-06-07 16:07:17 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
2014-01-27 09:22:24 +01:00
2017-06-07 16:07:17 +02:00
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
2019-03-20 07:17:54 +10:00
virtual QVector<qreal> dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const;
virtual Qt::PenStyle dxfPenStyle() const;
virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
virtual double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
Qt::PenStyle penStyle() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns the pen style used to render the line (e.g. solid, dashed, etc).
.. seealso:: :py:func:`setPenStyle`
%End
void setPenStyle( Qt::PenStyle style );
2019-03-20 07:17:54 +10:00
%Docstring
Sets the pen ``style`` used to render the line (e.g. solid, dashed, etc).
.. seealso:: :py:func:`penStyle`
%End
Qt::PenJoinStyle penJoinStyle() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns the pen join style used to render the line (e.g. miter, bevel, round, etc).
.. seealso:: :py:func:`setPenJoinStyle`
%End
void setPenJoinStyle( Qt::PenJoinStyle style );
2019-03-20 07:17:54 +10:00
%Docstring
Sets the pen join ``style`` used to render the line (e.g. miter, bevel, round, etc).
.. seealso:: :py:func:`penJoinStyle`
%End
Qt::PenCapStyle penCapStyle() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns the pen cap style used to render the line (e.g. flat, square, round, etc).
.. seealso:: :py:func:`setPenCapStyle`
%End
void setPenCapStyle( Qt::PenCapStyle style );
2019-03-20 07:17:54 +10:00
%Docstring
Sets the pen cap ``style`` used to render the line (e.g. flat, square, round, etc).
.. seealso:: :py:func:`penCapStyle`
%End
bool useCustomDashPattern() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns ``True`` if the line uses a custom dash pattern.
.. seealso:: :py:func:`setUseCustomDashPattern`
.. seealso:: :py:func:`customDashPatternUnit`
.. seealso:: :py:func:`customDashVector`
%End
void setUseCustomDashPattern( bool b );
2019-03-20 07:17:54 +10:00
%Docstring
Sets whether the line uses a custom dash pattern.
.. seealso:: :py:func:`useCustomDashPattern`
.. seealso:: :py:func:`setCustomDashPatternUnit`
.. seealso:: :py:func:`setCustomDashVector`
%End
void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit );
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Sets the ``unit`` for lengths used in the custom dash pattern.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`customDashPatternUnit`
2017-06-07 16:07:17 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit customDashPatternUnit() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units for lengths used in the custom dash pattern.
.. seealso:: :py:func:`setCustomDashPatternUnit`
2017-06-07 16:07:17 +02:00
%End
const QgsMapUnitScale &customDashPatternMapUnitScale() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns the map unit scale for lengths used in the custom dash pattern.
.. seealso:: :py:func:`setCustomDashPatternMapUnitScale`
%End
2017-06-07 16:07:17 +02:00
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale &scale );
2019-03-20 07:17:54 +10:00
%Docstring
Sets the map unit ``scale`` for lengths used in the custom dash pattern.
.. seealso:: :py:func:`customDashPatternMapUnitScale`
%End
QVector<qreal> customDashVector() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths
used while rendering a custom dash pattern.
Units for the vector are specified by customDashPatternUnit()
This setting is only used when useCustomDashPattern() returns ``True``.
.. seealso:: :py:func:`setCustomDashVector`
.. seealso:: :py:func:`customDashPatternUnit`
.. seealso:: :py:func:`useCustomDashPattern`
%End
void setCustomDashVector( const QVector<qreal> &vector );
2019-03-20 07:17:54 +10:00
%Docstring
Sets the custom dash ``vector``, which is the pattern of alternating drawn/skipped lengths
used while rendering a custom dash pattern.
Units for the vector are specified by customDashPatternUnit()
This setting is only used when useCustomDashPattern() returns ``True``.
.. seealso:: :py:func:`customDashVector`
.. seealso:: :py:func:`setCustomDashPatternUnit`
.. seealso:: :py:func:`setUseCustomDashPattern`
%End
2014-01-27 09:22:24 +01:00
bool drawInsidePolygon() const;
2018-11-06 14:15:11 +10:00
%Docstring
2019-02-26 19:54:09 +10:00
Returns ``True`` if the line should only be drawn inside polygons, and any portion
2018-11-06 14:15:11 +10:00
of the line which falls outside the polygon should be clipped away.
This setting only has an effect when the line symbol is being
used to render polygon rings.
.. seealso:: :py:func:`setDrawInsidePolygon`
%End
void setDrawInsidePolygon( bool drawInsidePolygon );
2018-11-06 14:15:11 +10:00
%Docstring
Sets whether the line should only be drawn inside polygons, and any portion
of the line which falls outside the polygon should be clipped away.
This setting only has an effect when the line symbol is being
used to render polygon rings.
.. seealso:: :py:func:`drawInsidePolygon`
%End
2014-01-27 09:22:24 +01:00
};
2017-06-07 16:07:17 +02:00
2016-08-06 11:01:42 +02:00
class QgsMarkerLineSymbolLayer : QgsLineSymbolLayer
{
2019-03-20 07:17:54 +10:00
%Docstring
Line symbol layer type which draws repeating marker symbols along a line feature.
%End
2017-06-07 16:07:17 +02:00
%TypeHeaderCode
2017-06-07 16:07:17 +02:00
#include "qgslinesymbollayer.h"
%End
public:
2019-03-20 07:17:54 +10:00
2016-08-06 11:01:42 +02:00
QgsMarkerLineSymbolLayer( bool rotateMarker = DEFAULT_MARKERLINE_ROTATE,
2017-06-07 16:07:17 +02:00
double interval = DEFAULT_MARKERLINE_INTERVAL );
2019-03-20 07:17:54 +10:00
%Docstring
Constructor for QgsMarkerLineSymbolLayer. Creates a marker line
with a default marker symbol, placed at the specified ``interval`` (in millimeters).
The ``rotateMarker`` argument specifies whether individual marker symbols
should be rotated to match the line segment alignment.
%End
enum Placement
{
Interval,
Vertex,
LastVertex,
FirstVertex,
2016-02-14 03:50:23 +01:00
CentralPoint,
2019-03-20 07:17:54 +10:00
CurvePoint,
};
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Creates a new QgsMarkerLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
QgsMarkerLineSymbolLayer.properties() ).
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Creates a new QgsMarkerLineSymbolLayer from an SLD XML DOM ``element``.
2017-06-07 16:07:17 +02:00
%End
virtual QString layerType() const;
virtual void startRender( QgsSymbolRenderContext &context );
virtual void stopRender( QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
2017-06-07 16:07:17 +02:00
virtual QgsStringMap properties() const;
2017-06-07 16:07:17 +02:00
virtual QgsMarkerLineSymbolLayer *clone() const /Factory/;
2017-06-07 16:07:17 +02:00
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
virtual void setColor( const QColor &color );
virtual QColor color() const;
2017-06-07 16:07:17 +02:00
virtual QgsSymbol *subSymbol();
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
virtual void setWidth( double width );
virtual double width() const;
virtual double width( const QgsRenderContext &context ) const;
2017-06-07 16:07:17 +02:00
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
2014-01-27 09:22:24 +01:00
bool rotateMarker() const;
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Returns ``True`` if the repeating symbols will be rotated to match their line segment orientation.
2017-12-15 10:36:55 -04:00
2019-03-20 07:17:54 +10:00
.. seealso:: :py:func:`setRotateMarker`
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
void setRotateMarker( bool rotate );
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Sets whether the repeating symbols should be rotated to match their line segment orientation.
.. seealso:: :py:func:`rotateMarker`
2017-06-07 16:07:17 +02:00
%End
double interval() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval between individual markers. Units are specified through intervalUnits().
.. seealso:: :py:func:`setInterval`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`intervalUnit`
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
void setInterval( double interval );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval between individual markers.
2017-12-15 21:36:08 -04:00
2018-05-25 09:00:58 +10:00
:param interval: interval size. Units are specified through setIntervalUnit()
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`interval`
2017-12-15 10:36:55 -04:00
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`setIntervalUnit`
2017-06-07 16:07:17 +02:00
%End
2014-01-27 09:22:24 +01:00
Placement placement() const;
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Returns the placement of the symbols.
.. seealso:: :py:func:`setPlacement`
2017-06-07 16:07:17 +02:00
%End
2016-02-14 03:50:23 +01:00
2014-01-27 09:22:24 +01:00
void setPlacement( Placement p );
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Sets the ``placement`` of the symbols.
.. seealso:: :py:func:`placement`
2017-06-07 16:07:17 +02:00
%End
double offsetAlongLine() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the offset along the line for the marker placement. For Interval placements, this is the distance
between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the
distance between the marker and the start of the line or the end of the line respectively.
This setting has no effect for Vertex or CentralPoint placements.
:return: The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLine`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`placement`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-07 16:07:17 +02:00
%End
void setOffsetAlongLine( double offsetAlongLine );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the the offset along the line for the marker placement. For Interval placements, this is the distance
between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the
distance between the marker and the start of the line or the end of the line respectively.
This setting has no effect for Vertex or CentralPoint placements.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param offsetAlongLine: Distance to offset markers along the line. The offset
unit is set via setOffsetAlongLineUnit.
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLine`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setPlacement`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.3
2017-06-07 16:07:17 +02:00
%End
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const;
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the unit used for calculating the offset along line for markers.
:return: Offset along line unit type.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLine`
2017-06-07 16:07:17 +02:00
%End
void setOffsetAlongLineUnit( QgsUnitTypes::RenderUnit unit );
2017-06-07 16:07:17 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the unit used for calculating the offset along line for markers.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: Offset along line unit type.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetAlongLineUnit`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetAlongLine`
2017-06-07 16:07:17 +02:00
%End
const QgsMapUnitScale &offsetAlongLineMapUnitScale() const;
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Returns the map unit scale used for calculating the offset in map units along line for symbols.
2017-12-15 10:36:55 -04:00
2019-03-20 07:17:54 +10:00
.. seealso:: :py:func:`setOffsetAlongLineMapUnitScale`
2017-06-07 16:07:17 +02:00
%End
2014-04-06 21:14:02 +02:00
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale &scale );
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Sets the map unit ``scale`` used for calculating the offset in map units along line for symbols.
2017-12-15 21:36:08 -04:00
2019-03-20 07:17:54 +10:00
.. seealso:: :py:func:`offsetAlongLineMapUnitScale`
2017-06-07 16:07:17 +02:00
%End
2014-01-27 09:22:24 +01:00
void setIntervalUnit( QgsUnitTypes::RenderUnit unit );
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Sets the units for the interval between symbols.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param unit: interval units
.. seealso:: :py:func:`intervalUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setInterval`
2017-06-07 16:07:17 +02:00
%End
2016-07-18 09:42:45 +10:00
QgsUnitTypes::RenderUnit intervalUnit() const;
2017-06-07 16:07:17 +02:00
%Docstring
2019-03-20 07:17:54 +10:00
Returns the units for the interval between symbols.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setIntervalUnit`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`interval`
2017-06-07 16:07:17 +02:00
%End
void setIntervalMapUnitScale( const QgsMapUnitScale &scale );
2019-03-20 07:17:54 +10:00
%Docstring
Sets the map unit ``scale`` for the interval between symbols.
.. seealso:: :py:func:`intervalMapUnitScale`
.. seealso:: :py:func:`setIntervalUnit`
.. seealso:: :py:func:`setInterval`
%End
const QgsMapUnitScale &intervalMapUnitScale() const;
2019-03-20 07:17:54 +10:00
%Docstring
Returns the map unit scale for the interval between symbols.
.. seealso:: :py:func:`setIntervalMapUnitScale`
.. seealso:: :py:func:`intervalUnit`
.. seealso:: :py:func:`interval`
%End
2017-06-07 16:07:17 +02:00
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
virtual QgsUnitTypes::RenderUnit outputUnit() const;
2017-06-07 16:07:17 +02:00
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
virtual QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
virtual bool hasDataDefinedProperties() const;
2017-06-07 16:07:17 +02:00
virtual void setDataDefinedProperty( QgsSymbolLayer::Property key, const QgsProperty &property );
protected:
void renderPolylineInterval( const QPolygonF &points, QgsSymbolRenderContext &context );
void renderPolylineVertex( const QPolygonF &points, QgsSymbolRenderContext &context, Placement placement = Vertex );
void renderPolylineCentral( const QPolygonF &points, QgsSymbolRenderContext &context );
double markerAngle( const QPolygonF &points, bool isRing, int vertex );
2017-06-07 16:07:17 +02:00
private:
QgsMarkerLineSymbolLayer( const QgsMarkerLineSymbolLayer &other );
};
2017-06-07 16:07:17 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgslinesymbollayer.h *
2017-06-07 16:07:17 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/