2017-06-06 11:03:05 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/core/symbology/qgsarrowsymbollayer.h *
|
2017-06-06 11:03:05 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
2016-06-14 12:54:49 +10:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsArrowSymbolLayer : QgsLineSymbolLayer
|
2016-01-20 09:11:48 +01:00
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Line symbol layer used for representing lines as arrows.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
|
|
|
|
2016-01-20 09:11:48 +01:00
|
|
|
%TypeHeaderCode
|
2017-06-06 11:03:05 +02:00
|
|
|
#include "qgsarrowsymbollayer.h"
|
2016-01-20 09:11:48 +01:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsArrowSymbolLayer();
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Simple constructor
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Create a new QgsArrowSymbolLayer
|
|
|
|
|
|
|
|
:param properties: A property map to deserialize saved information from properties()
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:return: A new QgsArrowSymbolLayer
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual QgsArrowSymbolLayer *clone() const /Factory/;
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual QgsSymbol *subSymbol();
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2016-01-20 09:11:48 +01:00
|
|
|
double arrowWidth() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get current arrow width
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
void setArrowWidth( double width );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the arrow width
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit arrowWidthUnit() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the unit for the arrow width
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
void setArrowWidthUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the unit for the arrow width
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
QgsMapUnitScale arrowWidthUnitScale() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the scale for the arrow width
|
|
|
|
%End
|
2017-05-01 18:13:15 +02:00
|
|
|
void setArrowWidthUnitScale( const QgsMapUnitScale &scale );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the scale for the arrow width
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
|
|
|
|
double arrowStartWidth() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
2017-12-12 23:24:01 +01:00
|
|
|
Get current arrow start width. Only meaningful for single headed arrows
|
2017-06-06 11:03:05 +02:00
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
void setArrowStartWidth( double width );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the arrow start width
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit arrowStartWidthUnit() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the unit for the arrow start width
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
void setArrowStartWidthUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the unit for the arrow start width
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
QgsMapUnitScale arrowStartWidthUnitScale() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the scale for the arrow start width
|
|
|
|
%End
|
2017-05-01 18:13:15 +02:00
|
|
|
void setArrowStartWidthUnitScale( const QgsMapUnitScale &scale );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the scale for the arrow start width
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
|
|
|
|
double headLength() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the current arrow head length
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
void setHeadLength( double length );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the arrow head length
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit headLengthUnit() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the unit for the head length
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
void setHeadLengthUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the unit for the head length
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
QgsMapUnitScale headLengthUnitScale() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the scale for the head length
|
|
|
|
%End
|
2017-05-01 18:13:15 +02:00
|
|
|
void setHeadLengthUnitScale( const QgsMapUnitScale &scale );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the scale for the head length
|
|
|
|
%End
|
2016-06-01 15:07:22 +02:00
|
|
|
|
2016-06-14 12:54:49 +10:00
|
|
|
double headThickness() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the current arrow head height
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
void setHeadThickness( double thickness );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the arrow head height
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit headThicknessUnit() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the unit for the head height
|
|
|
|
%End
|
2016-07-17 22:11:17 +10:00
|
|
|
void setHeadThicknessUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the unit for the head height
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
QgsMapUnitScale headThicknessUnitScale() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the scale for the head height
|
|
|
|
%End
|
2017-05-01 18:13:15 +02:00
|
|
|
void setHeadThicknessUnitScale( const QgsMapUnitScale &scale );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the scale for the head height
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
|
|
|
|
bool isCurved() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Return whether it is a curved arrow or a straight one
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
void setIsCurved( bool isCurved );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set whether it is a curved arrow or a straight one
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2016-06-01 16:19:50 +02:00
|
|
|
bool isRepeated() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Return whether the arrow is repeated along the line or not
|
|
|
|
%End
|
2016-06-01 16:19:50 +02:00
|
|
|
void setIsRepeated( bool isRepeated );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set whether the arrow is repeated along the line
|
|
|
|
%End
|
2016-06-01 16:19:50 +02:00
|
|
|
|
2016-01-20 09:11:48 +01:00
|
|
|
enum HeadType
|
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
HeadSingle,
|
|
|
|
HeadReversed,
|
|
|
|
HeadDouble
|
2016-01-20 09:11:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
HeadType headType() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the current head type
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
void setHeadType( HeadType type );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the head type
|
|
|
|
%End
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2016-06-01 15:07:22 +02:00
|
|
|
enum ArrowType
|
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
ArrowPlain,
|
|
|
|
ArrowLeftHalf,
|
|
|
|
ArrowRightHalf
|
2016-06-01 15:07:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
ArrowType arrowType() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Get the current arrow type
|
|
|
|
%End
|
2016-06-14 12:54:49 +10:00
|
|
|
void setArrowType( ArrowType type );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set the arrow type
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QgsStringMap properties() const;
|
2016-06-01 15:07:22 +02:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual QString layerType() const;
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual void startRender( QgsSymbolRenderContext &context );
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual void stopRender( QgsSymbolRenderContext &context );
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
|
2016-01-20 09:11:48 +01:00
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
virtual void setColor( const QColor &c );
|
2016-05-05 16:56:20 +10:00
|
|
|
|
2016-05-07 21:52:05 +10:00
|
|
|
virtual QColor color() const;
|
2016-05-05 16:56:20 +10:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2016-05-05 16:56:20 +10:00
|
|
|
private:
|
2017-06-06 11:03:05 +02:00
|
|
|
QgsArrowSymbolLayer( const QgsArrowSymbolLayer & );
|
2016-01-20 09:11:48 +01:00
|
|
|
};
|
2017-06-06 11:03:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/core/symbology/qgsarrowsymbollayer.h *
|
2017-06-06 11:03:05 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|