Class: QgsLayoutItemMapOverviewStack

class qgis.core.QgsLayoutItemMapOverviewStack(map: QgsLayoutItemMap)

Bases: 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.

Parameters

map

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()

Parameters

overview (QgsLayoutItemMapOverview) –

asList(self) → object

Returns a list of QgsLayoutItemMapOverviews contained by the stack.

Return type

object

item()
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()

Parameters

overviewId (str) –

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.

Parameters

overviewId (str) –

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.

Parameters

overviewId (str) –

Return type

QgsLayoutItemMapOverview

readXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
Return type

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()

Parameters

overviewId (str) –