Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix compilation on vcpkg
  • Loading branch information
nirvn committed May 21, 2021
1 parent bf79830 commit 59a6217
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 5 deletions.
Expand Up @@ -27,6 +27,7 @@ Line symbol layer used for representing lines as arrows.
%Docstring
Simple constructor
%End
~QgsArrowSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down
Expand Up @@ -49,6 +49,7 @@ Returns ``True`` if a ``shape`` has a fill.
%End

QgsEllipseSymbolLayer();
~QgsEllipseSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down
11 changes: 11 additions & 0 deletions python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in
Expand Up @@ -27,6 +27,8 @@ class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
);

~QgsSimpleFillSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down Expand Up @@ -764,6 +766,8 @@ Base class for polygon renderers generating texture images
public:

QgsImageFillSymbolLayer();
~QgsImageFillSymbolLayer();

virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


Expand Down Expand Up @@ -876,6 +880,8 @@ Constructor for QgsRasterFillSymbolLayer, using a raster fill from the
specified ``imageFilePath``.
%End

~QgsRasterFillSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsRasterFillSymbolLayer from a ``properties`` map. The caller takes
Expand Down Expand Up @@ -1154,6 +1160,8 @@ Constructor for QgsSVGFillSymbolLayer, using the SVG picture at the specified ab
Constructor for QgsSVGFillSymbolLayer, using the specified SVG picture data.
%End

~QgsSVGFillSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsSVGFillSymbolLayer from a ``properties`` map. The caller takes
Expand Down Expand Up @@ -2051,6 +2059,8 @@ Optionally a specific random number ``seed`` can be used when generating points.
a truly random sequence will be used on every rendering, causing points to appear in different locations with every map refresh.
%End

~QgsRandomMarkerFillSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsRandomMarkerFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsRandomMarkerFillSymbolLayer.properties`).
Expand Down Expand Up @@ -2235,6 +2245,7 @@ class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer
%End
public:
QgsCentroidFillSymbolLayer();
~QgsCentroidFillSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
Expand Down
Expand Up @@ -31,6 +31,8 @@ symbol in the specified ``color``, ``width`` (in millimeters)
and ``penStyle``.
%End

~QgsSimpleLineSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down Expand Up @@ -607,6 +609,8 @@ The ``rotateSymbol`` argument specifies whether individual symbols
should be rotated to match the line segment alignment.
%End

~QgsTemplatedLineSymbolLayerBase();

bool rotateSymbols() const;
%Docstring
Returns ``True`` if the repeating symbols be rotated to match their line segment orientation.
Expand Down Expand Up @@ -926,6 +930,8 @@ The ``rotateMarker`` argument specifies whether individual marker symbols
should be rotated to match the line segment alignment.
%End

~QgsMarkerLineSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down Expand Up @@ -1039,6 +1045,8 @@ The ``rotateSymbol`` argument specifies whether individual hash symbols
should be rotated to match the line segment alignment.
%End

~QgsHashedLineSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsHashedLineSymbolLayer, using the settings
Expand Down
12 changes: 12 additions & 0 deletions python/core/auto_generated/symbology/qgsmarkersymbollayer.sip.in
Expand Up @@ -85,6 +85,8 @@ Constructor for QgsSimpleMarkerSymbolLayerBase.
:param scaleMethod: scaling method for data defined scaling
%End

~QgsSimpleMarkerSymbolLayerBase();

QgsSimpleMarkerSymbolLayerBase::Shape shape() const;
%Docstring
Returns the shape for the rendered marker symbol.
Expand Down Expand Up @@ -223,6 +225,8 @@ Constructor for QgsSimpleMarkerSymbolLayer.
:param penJoinStyle: join style for stroke pen
%End

~QgsSimpleMarkerSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down Expand Up @@ -522,6 +526,8 @@ Constructor for QgsFilledMarkerSymbolLayer.
:param scaleMethod: size scaling method
%End

~QgsFilledMarkerSymbolLayer();

static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsFilledMarkerSymbolLayer.
Expand Down Expand Up @@ -581,6 +587,8 @@ class QgsSvgMarkerSymbolLayer : QgsMarkerSymbolLayer
Constructs SVG marker symbol layer with picture from given absolute path to a SVG file
%End

~QgsSvgMarkerSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down Expand Up @@ -791,6 +799,8 @@ Raster marker symbol layer class.
Constructs raster marker symbol layer with picture from given absolute path to a raster image file
%End

~QgsRasterMarkerSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down Expand Up @@ -951,6 +961,8 @@ class QgsFontMarkerSymbolLayer : QgsMarkerSymbolLayer
Constructs a font marker symbol layer.
%End

~QgsFontMarkerSymbolLayer();


static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology/qgsarrowsymbollayer.cpp
Expand Up @@ -27,6 +27,8 @@ QgsArrowSymbolLayer::QgsArrowSymbolLayer()
mSymbol.reset( static_cast<QgsFillSymbol *>( QgsFillSymbol::createSimple( QVariantMap() ) ) );
}

QgsArrowSymbolLayer::~QgsArrowSymbolLayer() = default;

bool QgsArrowSymbolLayer::setSubSymbol( QgsSymbol *symbol )
{
if ( symbol && symbol->type() == Qgis::SymbolType::Fill )
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgsarrowsymbollayer.h
Expand Up @@ -35,6 +35,7 @@ class CORE_EXPORT QgsArrowSymbolLayer : public QgsLineSymbolLayer
public:
//! Simple constructor
QgsArrowSymbolLayer();
~QgsArrowSymbolLayer() override;

/**
* Create a new QgsArrowSymbolLayer
Expand Down
2 changes: 2 additions & 0 deletions src/core/symbology/qgsellipsesymbollayer.cpp
Expand Up @@ -42,6 +42,8 @@ QgsEllipseSymbolLayer::QgsEllipseSymbolLayer()
mAngle = 0;
}

QgsEllipseSymbolLayer::~QgsEllipseSymbolLayer() = default;

QgsSymbolLayer *QgsEllipseSymbolLayer::create( const QVariantMap &properties )
{
QgsEllipseSymbolLayer *layer = new QgsEllipseSymbolLayer();
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgsellipsesymbollayer.h
Expand Up @@ -58,6 +58,7 @@ class CORE_EXPORT QgsEllipseSymbolLayer: public QgsMarkerSymbolLayer
static bool shapeIsFilled( const QgsEllipseSymbolLayer::Shape &shape );

QgsEllipseSymbolLayer();
~QgsEllipseSymbolLayer() override;

//! Creates the symbol layer
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) SIP_FACTORY;
Expand Down
22 changes: 17 additions & 5 deletions src/core/symbology/qgsfillsymbollayer.cpp
Expand Up @@ -60,6 +60,8 @@ QgsSimpleFillSymbolLayer::QgsSimpleFillSymbolLayer( const QColor &color, Qt::Bru
mColor = color;
}

QgsSimpleFillSymbolLayer::~QgsSimpleFillSymbolLayer() = default;

void QgsSimpleFillSymbolLayer::setOutputUnit( QgsUnitTypes::RenderUnit unit )
{
mStrokeWidthUnit = unit;
Expand Down Expand Up @@ -1675,6 +1677,8 @@ QgsImageFillSymbolLayer::QgsImageFillSymbolLayer()
setSubSymbol( new QgsLineSymbol() );
}

QgsImageFillSymbolLayer::~QgsImageFillSymbolLayer() = default;

void QgsImageFillSymbolLayer::renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context )
{
QPainter *p = context.renderContext().painter();
Expand Down Expand Up @@ -1871,6 +1875,8 @@ QgsSVGFillSymbolLayer::QgsSVGFillSymbolLayer( const QByteArray &svgData, double
setDefaultSvgParams();
}

QgsSVGFillSymbolLayer::~QgsSVGFillSymbolLayer() = default;

void QgsSVGFillSymbolLayer::setOutputUnit( QgsUnitTypes::RenderUnit unit )
{
QgsImageFillSymbolLayer::setOutputUnit( unit );
Expand Down Expand Up @@ -2431,6 +2437,11 @@ QgsLinePatternFillSymbolLayer::QgsLinePatternFillSymbolLayer()
QgsImageFillSymbolLayer::setSubSymbol( nullptr ); //no stroke
}

QgsLinePatternFillSymbolLayer::~QgsLinePatternFillSymbolLayer()
{
delete mFillLineSymbol;
}

void QgsLinePatternFillSymbolLayer::setLineWidth( double w )
{
mFillLineSymbol->setWidth( w );
Expand All @@ -2448,11 +2459,6 @@ QColor QgsLinePatternFillSymbolLayer::color() const
return mFillLineSymbol ? mFillLineSymbol->color() : mColor;
}

QgsLinePatternFillSymbolLayer::~QgsLinePatternFillSymbolLayer()
{
delete mFillLineSymbol;
}

bool QgsLinePatternFillSymbolLayer::setSubSymbol( QgsSymbol *symbol )
{
if ( !symbol )
Expand Down Expand Up @@ -3794,6 +3800,8 @@ QgsCentroidFillSymbolLayer::QgsCentroidFillSymbolLayer()
setSubSymbol( new QgsMarkerSymbol() );
}

QgsCentroidFillSymbolLayer::~QgsCentroidFillSymbolLayer() = default;

QgsSymbolLayer *QgsCentroidFillSymbolLayer::create( const QVariantMap &properties )
{
std::unique_ptr< QgsCentroidFillSymbolLayer > sl = std::make_unique< QgsCentroidFillSymbolLayer >();
Expand Down Expand Up @@ -4113,6 +4121,8 @@ QgsRasterFillSymbolLayer::QgsRasterFillSymbolLayer( const QString &imageFilePath
QgsImageFillSymbolLayer::setSubSymbol( nullptr ); //disable sub symbol
}

QgsRasterFillSymbolLayer::~QgsRasterFillSymbolLayer() = default;

QgsSymbolLayer *QgsRasterFillSymbolLayer::create( const QVariantMap &properties )
{
FillCoordinateMode mode = QgsRasterFillSymbolLayer::Feature;
Expand Down Expand Up @@ -4407,6 +4417,8 @@ QgsRandomMarkerFillSymbolLayer::QgsRandomMarkerFillSymbolLayer( int pointCount,
setSubSymbol( new QgsMarkerSymbol() );
}

QgsRandomMarkerFillSymbolLayer::~QgsRandomMarkerFillSymbolLayer() = default;

QgsSymbolLayer *QgsRandomMarkerFillSymbolLayer::create( const QVariantMap &properties )
{
const CountMethod countMethod = static_cast< CountMethod >( properties.value( QStringLiteral( "count_method" ), QStringLiteral( "0" ) ).toInt() );
Expand Down
11 changes: 11 additions & 0 deletions src/core/symbology/qgsfillsymbollayer.h
Expand Up @@ -51,6 +51,8 @@ class CORE_EXPORT QgsSimpleFillSymbolLayer : public QgsFillSymbolLayer
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
);

~QgsSimpleFillSymbolLayer() override;

// static stuff

/**
Expand Down Expand Up @@ -712,6 +714,8 @@ class CORE_EXPORT QgsImageFillSymbolLayer: public QgsFillSymbolLayer
public:

QgsImageFillSymbolLayer();
~QgsImageFillSymbolLayer() override;

void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context ) override;

QgsSymbol *subSymbol() override;
Expand Down Expand Up @@ -810,6 +814,8 @@ class CORE_EXPORT QgsRasterFillSymbolLayer: public QgsImageFillSymbolLayer
*/
QgsRasterFillSymbolLayer( const QString &imageFilePath = QString() );

~QgsRasterFillSymbolLayer() override;

/**
* Creates a new QgsRasterFillSymbolLayer from a \a properties map. The caller takes
* ownership of the returned object.
Expand Down Expand Up @@ -1033,6 +1039,8 @@ class CORE_EXPORT QgsSVGFillSymbolLayer: public QgsImageFillSymbolLayer
*/
QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );

~QgsSVGFillSymbolLayer() override;

/**
* Creates a new QgsSVGFillSymbolLayer from a \a properties map. The caller takes
* ownership of the returned object.
Expand Down Expand Up @@ -1841,6 +1849,8 @@ class CORE_EXPORT QgsRandomMarkerFillSymbolLayer : public QgsFillSymbolLayer
*/
QgsRandomMarkerFillSymbolLayer( int pointCount = 10, CountMethod method = AbsoluteCount, double densityArea = 250.0, unsigned long seed = 0 );

~QgsRandomMarkerFillSymbolLayer() override;

/**
* Creates a new QgsRandomMarkerFillSymbolLayer using the specified \a properties map containing symbol properties (see properties()).
*
Expand Down Expand Up @@ -2018,6 +2028,7 @@ class CORE_EXPORT QgsCentroidFillSymbolLayer : public QgsFillSymbolLayer
{
public:
QgsCentroidFillSymbolLayer();
~QgsCentroidFillSymbolLayer() override;

// static stuff

Expand Down
8 changes: 8 additions & 0 deletions src/core/symbology/qgslinesymbollayer.cpp
Expand Up @@ -44,6 +44,8 @@ QgsSimpleLineSymbolLayer::QgsSimpleLineSymbolLayer( const QColor &color, double
mCustomDashVector << 5 << 2;
}

QgsSimpleLineSymbolLayer::~QgsSimpleLineSymbolLayer() = default;

void QgsSimpleLineSymbolLayer::setOutputUnit( QgsUnitTypes::RenderUnit unit )
{
QgsLineSymbolLayer::setOutputUnit( unit );
Expand Down Expand Up @@ -1206,6 +1208,8 @@ QgsTemplatedLineSymbolLayerBase::QgsTemplatedLineSymbolLayerBase( bool rotateSym

}

QgsTemplatedLineSymbolLayerBase::~QgsTemplatedLineSymbolLayerBase() = default;

void QgsTemplatedLineSymbolLayerBase::renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context )
{
double offset = mOffset;
Expand Down Expand Up @@ -2238,6 +2242,8 @@ QgsMarkerLineSymbolLayer::QgsMarkerLineSymbolLayer( bool rotateMarker, double in
setSubSymbol( new QgsMarkerSymbol() );
}

QgsMarkerLineSymbolLayer::~QgsMarkerLineSymbolLayer() = default;

QgsSymbolLayer *QgsMarkerLineSymbolLayer::create( const QVariantMap &props )
{
bool rotate = DEFAULT_MARKERLINE_ROTATE;
Expand Down Expand Up @@ -2560,6 +2566,8 @@ QgsHashedLineSymbolLayer::QgsHashedLineSymbolLayer( bool rotateSymbol, double in
setSubSymbol( new QgsLineSymbol() );
}

QgsHashedLineSymbolLayer::~QgsHashedLineSymbolLayer() = default;

QgsSymbolLayer *QgsHashedLineSymbolLayer::create( const QVariantMap &props )
{
bool rotate = DEFAULT_MARKERLINE_ROTATE;
Expand Down
8 changes: 8 additions & 0 deletions src/core/symbology/qgslinesymbollayer.h
Expand Up @@ -51,6 +51,8 @@ class CORE_EXPORT QgsSimpleLineSymbolLayer : public QgsLineSymbolLayer
double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );

~QgsSimpleLineSymbolLayer() override;

// static stuff

/**
Expand Down Expand Up @@ -573,6 +575,8 @@ class CORE_EXPORT QgsTemplatedLineSymbolLayerBase : public QgsLineSymbolLayer
QgsTemplatedLineSymbolLayerBase( bool rotateSymbol = true,
double interval = 3 );

~QgsTemplatedLineSymbolLayerBase() override;

/**
* Returns TRUE if the repeating symbols be rotated to match their line segment orientation.
* \see setRotateSymbols()
Expand Down Expand Up @@ -873,6 +877,8 @@ class CORE_EXPORT QgsMarkerLineSymbolLayer : public QgsTemplatedLineSymbolLayerB
QgsMarkerLineSymbolLayer( bool rotateMarker = DEFAULT_MARKERLINE_ROTATE,
double interval = DEFAULT_MARKERLINE_INTERVAL );

~QgsMarkerLineSymbolLayer() override;

// static stuff

/**
Expand Down Expand Up @@ -965,6 +971,8 @@ class CORE_EXPORT QgsHashedLineSymbolLayer : public QgsTemplatedLineSymbolLayerB
QgsHashedLineSymbolLayer( bool rotateSymbol = true,
double interval = 3 );

~QgsHashedLineSymbolLayer() override;

/**
* Creates a new QgsHashedLineSymbolLayer, using the settings
* serialized in the \a properties map (corresponding to the output from
Expand Down

0 comments on commit 59a6217

Please sign in to comment.