32 mRestrictToLayersList = _qgis_listRawToQPointer( layers );
37 return _qgis_listQPointerToRaw( mRestrictToLayersList );
42 if ( !mRestrictToLayers )
45 if ( mRestrictToLayersList.empty() )
48 const auto it = std::find_if( mRestrictToLayersList.begin(), mRestrictToLayersList.end(), [layer](
const QgsWeakMapLayerPointer & item ) ->
bool
52 return it != mRestrictToLayersList.end();
57 return mRestrictToLayers;
62 mRestrictToLayers = enabled;
A geometry is the spatial representation of a feature.
void setRestrictToLayers(bool enabled)
Sets whether clipping should be restricted to a subset of layers.
bool appliesToLayer(const QgsMapLayer *layer) const
Returns true if the clipping region should be applied to the specified map layer.
bool restrictToLayers() const
Returns true if clipping should be restricted to a subset of layers.
QgsGeometry geometry() const
Returns the geometry of the clipping region (in the destination map CRS).
void setGeometry(const QgsGeometry &geometry)
Sets the clipping region geometry (in the destination map CRS).
void setRestrictedLayers(const QList< QgsMapLayer * > &layers)
Sets a list of layers to restrict the clipping region effects to.
QList< QgsMapLayer * > restrictedLayers() const
Returns the list of layers to restrict the clipping region effects to.
Base class for all map layer types.
QPointer< QgsMapLayer > QgsWeakMapLayerPointer
Weak pointer for QgsMapLayer.