Class: QgsLayoutItemMapAtlasClippingSettings

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

Added in version 3.16.

Class Hierarchy

Inheritance diagram of qgis.core.QgsLayoutItemMapAtlasClippingSettings

Base classes

QObject

class qgis.core.QgsLayoutItemMapAtlasClippingSettings[source]

Bases: QObject

__init__(map: QgsLayoutItemMap | None = None)

Constructor for QgsLayoutItemMapAtlasClippingSettings, with the specified map parent.

Parameters:

map (Optional[QgsLayoutItemMap] = None)

signal changed[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

clipItemShape(self) bool[source]

Returns True if the map item shape will be clipped to the atlas feature geometry.

Added in version 4.0.

Return type:

bool

enabled(self) bool[source]

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

See also

setEnabled()

Return type:

bool

featureClippingType(self) QgsMapClippingRegion.FeatureClippingType[source]

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

Return type:

QgsMapClippingRegion.FeatureClippingType

forceLabelsInsideFeature(self) bool[source]

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

Return type:

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[source]

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

restrictToLayers(self) bool[source]

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

See also

layersToClip()

Return type:

bool

setClipItemShape(self, clipItemShape: bool)[source]

Sets whether the map item shape will be clipped to the atlas feature geometry.

See also

clipItemShape()

Added in version 4.0.

Parameters:

clipItemShape (bool)

setEnabled(self, enabled: bool)[source]

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

See also

enabled()

Parameters:

enabled (bool)

setFeatureClippingType(self, type: QgsMapClippingRegion.FeatureClippingType)[source]

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

Parameters:

type (QgsMapClippingRegion.FeatureClippingType)

setForceLabelsInsideFeature(self, forceInside: bool)[source]

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

Parameters:

forceInside (bool)

setLayersToClip(self, layers: Iterable[QgsMapLayer])[source]

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)[source]

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

Parameters:

enabled (bool)

writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool[source]

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

See also

readXml()

Parameters:
Return type:

bool