QgsLayoutItemMapOverviewStack class
A collection of overviews which are drawn above the map content in a QgsLayoutItemMap.
Contents
The overview stack controls which overviews are drawn and the order they are drawn in.
Base classes
- class QgsLayoutItemMapItemStack
- A collection of map items which are drawn above the map content in a QgsLayoutItemMap.
Constructors, destructors, conversion operators
- QgsLayoutItemMapOverviewStack(QgsLayoutItemMap* map)
- Constructor for QgsLayoutItemMapOverviewStack, attached to the specified map.
Public functions
- void addOverview(QgsLayoutItemMapOverview* overview)
- Adds a new map overview to the stack and takes ownership of the overview.
- auto asList() const -> QList<QgsLayoutItemMapOverview*>
- Returns a list of QgsLayoutItemMapOverviews contained by the stack.
- auto modifyMapLayerList(const QList<QgsMapLayer*>& layers) -> QList<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.
- void moveOverviewDown(const QString& overviewId)
- Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.
- void moveOverviewUp(const QString& overviewId)
- Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.
- auto operator[](int index) -> QgsLayoutItemMapOverview&
- Returns a reference to an overview at the specified index within the stack.
- auto overview(const QString& overviewId) const -> QgsLayoutItemMapOverview*
- Returns a reference to an overview with matching overviewId within the stack.
- auto overview(int index) const -> QgsLayoutItemMapOverview*
- Returns a reference to an overview at the specified index within the stack.
- auto readXml(const QDomElement& element, const QDomDocument& doc, const QgsReadWriteContext& context) -> bool override
- Sets the item stack's state from a DOM document, where element is a DOM node corresponding to a 'LayoutMap' tag.
- void removeOverview(const QString& overviewId)
- Removes an overview with matching overviewId from the stack and deletes the corresponding QgsLayoutItemMapOverview.
Function documentation
void QgsLayoutItemMapOverviewStack:: addOverview(QgsLayoutItemMapOverview* overview)
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.
QList<QgsMapLayer*> QgsLayoutItemMapOverviewStack:: modifyMapLayerList(const QList<QgsMapLayer*>& layers)
Alters the list of map layers which will be rendered for the link map item, inserting temporary layers which represent overview extents as required.
void QgsLayoutItemMapOverviewStack:: moveOverviewDown(const QString& overviewId)
Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.
void QgsLayoutItemMapOverviewStack:: moveOverviewUp(const QString& overviewId)
Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.
QgsLayoutItemMapOverview& QgsLayoutItemMapOverviewStack:: operator[](int index)
Returns a reference to an overview at the specified index within the stack.
bool QgsLayoutItemMapOverviewStack:: readXml(const QDomElement& element,
const QDomDocument& doc,
const QgsReadWriteContext& context) override
Sets the item stack's state from a DOM document, where element is a DOM node corresponding to a 'LayoutMap' tag.
Returns true if read was successful.
void QgsLayoutItemMapOverviewStack:: removeOverview(const QString& overviewId)
Removes an overview with matching overviewId from the stack and deletes the corresponding QgsLayoutItemMapOverview.