Class: QgsLayoutItemMapOverviewStack

class qgis.core.QgsLayoutItemMapOverviewStack(map: QgsLayoutItemMap)

Bases: qgis._core.QgsLayoutItemMapItemStack

Constructor for QgsLayoutItemMapOverviewStack, attached to the specified map.

QgsLayoutItemMapOverviewStack(QgsLayoutItemMapOverviewStack)

A collection of overviews which are drawn above the map content in a QgsLayoutItemMap. The overview stack controls which overviews are drawn and the order they are drawn in.

New in version 3.0: Methods

addItem
addOverview Adds a new map overview to the stack and takes ownership of the overview.
asList Returns a list of QgsLayoutItemMapOverviews contained by the stack.
item
modifyMapLayerList Alters the list of map layers which will be rendered for the link map item, inserting temporary layers which represent overview extents as required.
moveItemDown
moveItemUp
moveOverviewDown Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.
moveOverviewUp Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.
overview Returns a reference to an overview with matching overviewId within the stack.
readXml
removeItem
removeItems
removeOverview Removes an overview with matching overviewId from the stack and deletes the corresponding QgsLayoutItemMapOverview

Signals

Attributes

addItem()
addOverview(self, overview: QgsLayoutItemMapOverview)

Adds a new map overview to the stack and takes ownership of the overview. The overview will be added to the end of the stack, and rendered above any existing map overviews already present in the stack.

Note

After adding a overview to the stack, update() should be called for the QgsLayoutItemMap to prevent rendering artifacts.

See also

removeOverview()

asList(self) → object

Returns a list of QgsLayoutItemMapOverviews contained by the stack.

item()
modifyMapLayerList(self, layers: Iterable[QgsMapLayer]) → List[QgsMapLayer]

Alters the list of map layers which will be rendered for the link map item, inserting temporary layers which represent overview extents as required.

New in version 3.6.

moveItemDown()
moveItemUp()
moveOverviewDown(self, overviewId: str)

Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.

Note

After moving an overview within the stack, update() should be called for the QgsLayoutItemMap to redraw the map with the new overview stack order.

See also

moveOverviewUp()

moveOverviewUp(self, overviewId: str)

Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.

Note

After moving an overview within the stack, update() should be called for the QgsLayoutItemMap to redraw the map with the new overview stack order.

overview(self, overviewId: str) → QgsLayoutItemMapOverview

Returns a reference to an overview with matching overviewId within the stack.

overview(self, index: int) -> QgsLayoutItemMapOverview Returns a reference to an overview at the specified index within the stack.

readXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) → bool
removeItem()
removeItems()
removeOverview(self, overviewId: str)

Removes an overview with matching overviewId from the stack and deletes the corresponding QgsLayoutItemMapOverview

Note

After removing an overview from the stack, update() should be called for the QgsLayoutItemMap to prevent rendering artifacts.

See also

addOverview()