Skip to content

Commit

Permalink
Remove unnecessary includes of qgssymbollayerreference.h
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 24, 2021
1 parent 17af235 commit 22c2d72
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 27 deletions.
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsmaskidprovider.sip.in
Expand Up @@ -8,6 +8,7 @@




class QgsMaskIdProvider
{
%Docstring(signature="appended")
Expand Down
Expand Up @@ -72,7 +72,8 @@ Create a new QgsMaskMarkerSymbolLayer
Whether some masked symbol layers are defined
%End

virtual QgsSymbolLayerReferenceList masks() const;
virtual QList<QgsSymbolLayerReference> masks() const;

%Docstring
Returns a list of references to symbol layers that are masked by the sub symbol's shape.

Expand All @@ -81,7 +82,7 @@ Returns a list of references to symbol layers that are masked by the sub symbol'
.. seealso:: :py:func:`setMasks`
%End

void setMasks( QgsSymbolLayerReferenceList maskedLayers );
void setMasks( const QList<QgsSymbolLayerReference> &maskedLayers );
%Docstring
Sets the symbol layers that will be masked by the sub symbol's shape.

Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/symbology/qgssymbollayer.sip.in
Expand Up @@ -552,7 +552,7 @@ Returns ``True`` if the symbol layer (or any of its sub-symbols) contains data d
.. versionadded:: 3.4.5
%End

virtual QgsSymbolLayerReferenceList masks() const;
virtual QList<QgsSymbolLayerReference> masks() const;
%Docstring
Returns masks defined by this symbol layer.
This is a list of symbol layers of other layers that should be occluded.
Expand Down
Expand Up @@ -43,12 +43,12 @@ path to symbol layers of the sub symbol are given by a list of indexes:
public:
QgsSymbolLayerId();

QgsSymbolLayerId( QString key, int index );
QgsSymbolLayerId( const QString &key, int index );
%Docstring
QgsSymbolLayerId constructor with a symbol key and a unique symbol layer index
%End

QgsSymbolLayerId( QString key, const QVector<int> &indexPath );
QgsSymbolLayerId( const QString &key, const QVector<int> &indexPath );
%Docstring
QgsSymbolLayerId constructor with a symbol key and an index path
%End
Expand Down
Expand Up @@ -203,7 +203,7 @@ Write settings into a DOM element.
.. seealso:: :py:func:`readXml`
%End

QgsSymbolLayerReferenceList maskedSymbolLayers() const;
QList<QgsSymbolLayerReference> maskedSymbolLayers() const;
%Docstring
Returns a list of references to symbol layers that are masked by this buffer.

Expand All @@ -212,7 +212,7 @@ Returns a list of references to symbol layers that are masked by this buffer.
.. seealso:: :py:func:`setMaskedSymbolLayers`
%End

void setMaskedSymbolLayers( QgsSymbolLayerReferenceList maskedLayers );
void setMaskedSymbolLayers( const QList<QgsSymbolLayerReference> &maskedLayers );
%Docstring
Sets the symbol layers that will be masked by this buffer.

Expand Down
1 change: 1 addition & 0 deletions src/core/qgsmaskidprovider.cpp
Expand Up @@ -14,6 +14,7 @@
***************************************************************************/

#include "qgsmaskidprovider.h"
#include "qgssymbollayerreference.h"

int QgsMaskIdProvider::insertLabelLayer( const QString &layerId, const QString &ruleId, const QSet<QgsSymbolLayerReference> &maskedSymbolLayers )
{
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsmaskidprovider.h
Expand Up @@ -16,9 +16,10 @@
#ifndef QGSMASKIDPROVIDER_H
#define QGSMASKIDPROVIDER_H

#include "qgis_core.h"
#include "qgssymbollayerreference.h"
#include <QList>
#include <QSet>
#include "qgssymbollayerreference.h"

/**
* \ingroup core
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsrendercontext.h
Expand Up @@ -34,7 +34,6 @@
#include "qgsdistancearea.h"
#include "qgscoordinatetransformcontext.h"
#include "qgspathresolver.h"
#include "qgssymbollayerreference.h"
#include "qgstemporalrangeobject.h"

class QPainter;
Expand Down
11 changes: 11 additions & 0 deletions src/core/symbology/qgsmasksymbollayer.cpp
Expand Up @@ -20,6 +20,7 @@
#include "qgspainteffect.h"
#include "qgspainterswapper.h"
#include "qgsmarkersymbol.h"
#include "qgssymbollayerreference.h"

QgsMaskMarkerSymbolLayer::QgsMaskMarkerSymbolLayer()
{
Expand Down Expand Up @@ -123,6 +124,16 @@ void QgsMaskMarkerSymbolLayer::drawPreviewIcon( QgsSymbolRenderContext &context,
QgsMarkerSymbolLayer::drawPreviewIcon( context, size );
}

QList<QgsSymbolLayerReference> QgsMaskMarkerSymbolLayer::masks() const
{
return mMaskedSymbolLayers;
}

void QgsMaskMarkerSymbolLayer::setMasks( const QList<QgsSymbolLayerReference> &maskedLayers )
{
mMaskedSymbolLayers = maskedLayers;
}

QRectF QgsMaskMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext &context )
{
return mSymbol->bounds( point, context.renderContext() );
Expand Down
8 changes: 4 additions & 4 deletions src/core/symbology/qgsmasksymbollayer.h
Expand Up @@ -19,10 +19,10 @@
#include "qgis_core.h"
#include "qgis.h"
#include "qgssymbollayer.h"
#include "qgssymbollayerreference.h"

class QgsPaintEffect;
class QgsMarkerSymbol;
class QgsSymbolLayerReference;

/**
* \ingroup core
Expand Down Expand Up @@ -73,14 +73,14 @@ class CORE_EXPORT QgsMaskMarkerSymbolLayer : public QgsMarkerSymbolLayer
* \returns a list of references to masked symbol layers
* \see setMasks
*/
QgsSymbolLayerReferenceList masks() const override { return mMaskedSymbolLayers; }
QList<QgsSymbolLayerReference> masks() const override;

/**
* Sets the symbol layers that will be masked by the sub symbol's shape.
* \param maskedLayers list of references to symbol layers
* \see masks
*/
void setMasks( QgsSymbolLayerReferenceList maskedLayers ) { mMaskedSymbolLayers = maskedLayers; }
void setMasks( const QList<QgsSymbolLayerReference> &maskedLayers );

private:
#ifdef SIP_RUN
Expand All @@ -91,7 +91,7 @@ class CORE_EXPORT QgsMaskMarkerSymbolLayer : public QgsMarkerSymbolLayer
std::unique_ptr<QgsMarkerSymbol> mSymbol;

//! List of symbol layers that will be masked
QgsSymbolLayerReferenceList mMaskedSymbolLayers;
QList<QgsSymbolLayerReference> mMaskedSymbolLayers;

std::unique_ptr<QgsPaintEffect> mEffect;
};
Expand Down
1 change: 0 additions & 1 deletion src/core/symbology/qgsrenderer.h
Expand Up @@ -23,7 +23,6 @@
#include "qgsrendercontext.h"
#include "qgsfields.h"
#include "qgsfeaturerequest.h"
#include "qgssymbollayerreference.h"

#include <QList>
#include <QString>
Expand Down
3 changes: 2 additions & 1 deletion src/core/symbology/qgssymbollayer.cpp
Expand Up @@ -32,6 +32,7 @@
#include "qgsstyle.h"
#include "qgsexpressioncontextutils.h"
#include "qgssymbol.h"
#include "qgssymbollayerreference.h"

#include <QSize>
#include <QPainter>
Expand Down Expand Up @@ -847,7 +848,7 @@ void QgsMarkerSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, const
writeSldMarker( doc, symbolizerElem, props );
}

QgsSymbolLayerReferenceList QgsSymbolLayer::masks() const
QList<QgsSymbolLayerReference> QgsSymbolLayer::masks() const
{
return {};
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology/qgssymbollayer.h
Expand Up @@ -31,7 +31,6 @@
#include "qgsfields.h"
#include "qgspropertycollection.h"
#include "qgssymbolrendercontext.h"
#include "qgssymbollayerreference.h"

class QPainter;
class QSize;
Expand All @@ -41,6 +40,7 @@ class QgsDxfExport;
class QgsExpression;
class QgsRenderContext;
class QgsPaintEffect;
class QgsSymbolLayerReference;

#ifndef SIP_RUN
typedef QMap<QString, QString> QgsStringMap;
Expand Down Expand Up @@ -548,7 +548,7 @@ class CORE_EXPORT QgsSymbolLayer
* This is a list of symbol layers of other layers that should be occluded.
* \since QGIS 3.12
*/
virtual QgsSymbolLayerReferenceList masks() const;
virtual QList<QgsSymbolLayerReference> masks() const;

protected:

Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology/qgssymbollayerreference.h
Expand Up @@ -58,14 +58,14 @@ class CORE_EXPORT QgsSymbolLayerId
/**
* QgsSymbolLayerId constructor with a symbol key and a unique symbol layer index
*/
QgsSymbolLayerId( QString key, int index )
QgsSymbolLayerId( const QString &key, int index )
: mSymbolKey( key ), mIndexPath( { index } )
{}

/**
* QgsSymbolLayerId constructor with a symbol key and an index path
*/
QgsSymbolLayerId( QString key, const QVector<int> &indexPath )
QgsSymbolLayerId( const QString &key, const QVector<int> &indexPath )
: mSymbolKey( key ), mIndexPath( { indexPath } )
{}

Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgssymbollayerutils.cpp
Expand Up @@ -41,6 +41,7 @@
#include "qgslinesymbol.h"
#include "qgsmarkersymbol.h"
#include "qgsfillsymbol.h"
#include "qgssymbollayerreference.h"

#include <QColor>
#include <QFont>
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology/qgssymbollayerutils.h
Expand Up @@ -48,6 +48,7 @@ class QPointF;
class QSize;
class QMimeData;
class QgsFeatureRenderer;
class QgsSymbolLayerId;

/**
* \ingroup core
Expand Down
4 changes: 2 additions & 2 deletions src/core/textrenderer/qgstextmasksettings.cpp
Expand Up @@ -228,12 +228,12 @@ QDomElement QgsTextMaskSettings::writeXml( QDomDocument &doc ) const
return textMaskElem;
}

QgsSymbolLayerReferenceList QgsTextMaskSettings::maskedSymbolLayers() const
QList<QgsSymbolLayerReference> QgsTextMaskSettings::maskedSymbolLayers() const
{
return d->maskedSymbolLayers;
}

void QgsTextMaskSettings::setMaskedSymbolLayers( QgsSymbolLayerReferenceList maskedSymbols )
void QgsTextMaskSettings::setMaskedSymbolLayers( const QList<QgsSymbolLayerReference> &maskedSymbols )
{
d->maskedSymbolLayers = maskedSymbols;
}
6 changes: 3 additions & 3 deletions src/core/textrenderer/qgstextmasksettings.h
Expand Up @@ -18,7 +18,6 @@

#include "qgis_sip.h"
#include "qgis_core.h"
#include "qgssymbollayerreference.h"
#include "qgsunittypes.h"
#include "qgsmapunitscale.h"

Expand All @@ -28,6 +27,7 @@
class QgsTextMaskSettingsPrivate;
class QgsPaintEffect;
class QgsPropertyCollection;
class QgsSymbolLayerReference;

/**
* \class QgsTextMaskSettings
Expand Down Expand Up @@ -198,14 +198,14 @@ class CORE_EXPORT QgsTextMaskSettings
* \returns a list of references to masked symbol layers
* \see setMaskedSymbolLayers
*/
QgsSymbolLayerReferenceList maskedSymbolLayers() const;
QList<QgsSymbolLayerReference> maskedSymbolLayers() const;

/**
* Sets the symbol layers that will be masked by this buffer.
* \param maskedLayers list of references to symbol layers
* \see setMaskedSymbolLayers
*/
void setMaskedSymbolLayers( QgsSymbolLayerReferenceList maskedLayers );
void setMaskedSymbolLayers( const QList<QgsSymbolLayerReference> &maskedLayers );

/**
* Updates the format by evaluating current values of data defined properties.
Expand Down
2 changes: 1 addition & 1 deletion src/core/vector/qgsvectorlayerutils.cpp
Expand Up @@ -41,7 +41,7 @@
#include "qgsstyleentityvisitor.h"
#include "qgsstyle.h"
#include "qgsauxiliarystorage.h"

#include "qgssymbollayerreference.h"

QgsFeatureIterator QgsVectorLayerUtils::getValuesIterator( const QgsVectorLayer *layer, const QString &fieldOrExpression, bool &ok, bool selectedOnly )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/vector/qgsvectorlayerutils.h
Expand Up @@ -19,11 +19,11 @@
#include "qgis_core.h"
#include "qgsgeometry.h"
#include "qgsvectorlayerfeatureiterator.h"
#include "qgssymbollayerreference.h"
#include "qgsfeaturesink.h"

class QgsFeatureRenderer;
class QgsSymbolLayer;
class QgsSymbolLayerId;

/**
* \ingroup core
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgstextformatwidget.cpp
Expand Up @@ -38,6 +38,7 @@
#include "qgsmarkersymbol.h"
#include "qgsfillsymbol.h"
#include "qgsiconutils.h"
#include "qgssymbollayerreference.h"

#include <QButtonGroup>
#include <QMessageBox>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgstextformatwidget.h
Expand Up @@ -192,7 +192,7 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, public QgsExpressionConte
//! Associated vector layer
QgsVectorLayer *mLayer = nullptr;

QgsSymbolLayerReferenceList mMaskedSymbolLayers;
QList<QgsSymbolLayerReference> mMaskedSymbolLayers;

//! Geometry type for layer, if known
QgsWkbTypes::GeometryType mGeomType = QgsWkbTypes::UnknownGeometry;
Expand Down

0 comments on commit 22c2d72

Please sign in to comment.