Subgroup: Layout
Class: QgsLayoutItemMapOverviewStack¶
-
class
qgis.core.
QgsLayoutItemMapOverviewStack
¶ Bases:
qgis._core.QgsLayoutItemMapItemStack
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.
See also
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. containsAdvancedEffects
Returns whether any items within the stack contain advanced effects, such as blending modes. drawItems
Draws the items from the stack on a specified painter
.item
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
size
Returns the number of items in the stack. writeXml
Stores the state of the item stack in a DOM node, where element
is the DOM element corresponding to a ‘LayoutMap’ tag.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
-
asList
(self) → object¶ Returns a list of QgsLayoutItemMapOverviews contained by the stack.
-
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
(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.
See also
-
overview
(self, overviewId: str) → QgsLayoutItemMapOverview¶ Returns a reference to an overview with matching overviewId within the stack.
See also
constOverview()
overview(self, index: int) -> QgsLayoutItemMapOverview Returns a reference to an overview at the specified
index
within the stack.See also
constOverview()
-
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
-