Class: QgsLayoutItemMapAtlasClippingSettings

class qgis.core.QgsLayoutItemMapAtlasClippingSettings

Bases: PyQt5.QtCore.QObject

Contains settings relating to clipping a layout map by the current atlas feature.

New in version 3.16.

QgsLayoutItemMapAtlasClippingSettings(map: QgsLayoutItemMap = None) Constructor for QgsLayoutItemMapAtlasClippingSettings, with the specified map parent.

Methods

childEvent

connectNotify

customEvent

disconnectNotify

enabled

Returns True if the map content should be clipped to the current atlas feature.

featureClippingType

Returns the feature clipping type to apply when clipping to the current atlas feature.

forceLabelsInsideFeature

Returns True if labels should only be placed inside the atlas feature geometry.

isSignalConnected

layersToClip

Returns the list of map layers to clip to the atlas feature.

readXml

Sets the setting’s state from a DOM document, where element is the DOM node corresponding to a ‘LayoutMap’ tag.

receivers

restrictToLayers

Returns True if clipping should be restricted to a subset of layers.

sender

senderSignalIndex

setEnabled

Sets whether the map content should be clipped to the current atlas feature.

setFeatureClippingType

Sets the feature clipping type to apply when clipping to the current atlas feature.

setForceLabelsInsideFeature

Sets whether labels should only be placed inside the atlas feature geometry.

setLayersToClip

Sets the list of map layers to clip to the atlas feature.

setRestrictToLayers

Sets whether clipping should be restricted to a subset of layers.

timerEvent

writeXml

Stores settings in a DOM element, where element is the DOM element corresponding to a ‘LayoutMap’ tag.

Signals

changed

Emitted when the atlas clipping settings are changed.

changed

Emitted when the atlas clipping settings are changed. [signal]

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
enabled(self) bool

Returns True if the map content should be clipped to the current atlas feature.

See also

setEnabled()

Return type

bool

featureClippingType(self) QgsMapClippingRegion.FeatureClippingType

Returns the feature clipping type to apply when clipping to the current atlas feature.

Return type

QgsMapClippingRegion.FeatureClippingType

forceLabelsInsideFeature(self) bool

Returns True if labels should only be placed inside the atlas feature geometry.

Return type

bool

isSignalConnected(self, QMetaMethod) bool
layersToClip(self) List[QgsMapLayer]

Returns the list of map layers to clip to the atlas feature.

Note

This setting is only used if restrictToLayers() is True.

Return type

List[QgsMapLayer]

readXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) bool

Sets the setting’s state from a DOM document, where element is the DOM node corresponding to a ‘LayoutMap’ tag.

See also

writeXml()

Parameters
Return type

bool

receivers(self, PYQT_SIGNAL) int
restrictToLayers(self) bool

Returns True if clipping should be restricted to a subset of layers.

See also

layersToClip()

Return type

bool

sender(self) QObject
senderSignalIndex(self) int
setEnabled(self, enabled: bool)

Sets whether the map content should be clipped to the current atlas feature.

See also

enabled()

Parameters

enabled (bool) –

setFeatureClippingType(self, type: QgsMapClippingRegion.FeatureClippingType)

Sets the feature clipping type to apply when clipping to the current atlas feature.

Parameters

type (QgsMapClippingRegion.FeatureClippingType) –

setForceLabelsInsideFeature(self, forceInside: bool)

Sets whether labels should only be placed inside the atlas feature geometry.

Parameters

forceInside (bool) –

setLayersToClip(self, layers: Iterable[QgsMapLayer])

Sets the list of map layers to clip to the atlas feature.

Note

This setting is only used if restrictToLayers() is True.

See also

layersToClip()

Parameters

layers (Iterable[QgsMapLayer]) –

setRestrictToLayers(self, enabled: bool)

Sets whether clipping should be restricted to a subset of layers.

Parameters

enabled (bool) –

timerEvent(self, QTimerEvent)
writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool

Stores settings in a DOM element, where element is the DOM element corresponding to a ‘LayoutMap’ tag.

See also

readXml()

Parameters
Return type

bool