Class: 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.
See also
Class Hierarchy¶
Base classes¶
A collection of map items which are drawn above the map content in a |
Methods
Adds a new map overview to the stack and takes ownership of the overview. |
|
Returns a list of |
|
Alters the list of map layers which will be rendered for the link map item, inserting temporary layers which represent overview extents as required. |
|
Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews. |
|
Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews. |
|
Returns a reference to an overview with matching overviewId within the stack. |
|
Removes an overview with matching overviewId from the stack and deletes the corresponding |
- class qgis.core.QgsLayoutItemMapOverviewStack[source]¶
Bases:
QgsLayoutItemMapItemStack
- __init__(map: QgsLayoutItemMap | None)
Constructor for QgsLayoutItemMapOverviewStack, attached to the specified
map
.- Parameters:
map (Optional[QgsLayoutItemMap])
- __init__(a0: QgsLayoutItemMapOverviewStack)
- Parameters:
- addOverview(self, overview: QgsLayoutItemMapOverview | None)[source]¶
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 theQgsLayoutItemMap
to prevent rendering artifacts.See also
- Parameters:
overview (Optional[QgsLayoutItemMapOverview])
- asList(self) List[QgsLayoutItemMapOverview] ¶
Returns a list of
QgsLayoutItemMapOverviews
contained by the stack.- Return type:
List[QgsLayoutItemMapOverview]
- 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.Added in version 3.6.
- Parameters:
layers (Iterable[QgsMapLayer])
- Return type:
List[QgsMapLayer]
- moveOverviewDown(self, overviewId: str | None)[source]¶
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 theQgsLayoutItemMap
to redraw the map with the new overview stack order.See also
- Parameters:
overviewId (Optional[str])
- moveOverviewUp(self, overviewId: str | None)[source]¶
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 theQgsLayoutItemMap
to redraw the map with the new overview stack order.See also
- Parameters:
overviewId (Optional[str])
- overview(self, overviewId: str | None) QgsLayoutItemMapOverview | None [source]¶
Returns a reference to an overview with matching overviewId within the stack.
- Parameters:
overviewId (Optional[str])
- Return type:
Optional[QgsLayoutItemMapOverview]
- overview(self, index: int) QgsLayoutItemMapOverview | None [source]
Returns a reference to an overview at the specified
index
within the stack.- Parameters:
index (int)
- Return type:
Optional[QgsLayoutItemMapOverview]
- removeOverview(self, overviewId: str | None)[source]¶
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 theQgsLayoutItemMap
to prevent rendering artifacts.See also
- Parameters:
overviewId (Optional[str])