QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
A collection of overviews which are drawn above the map content in a QgsLayoutItemMap. More...
#include <qgslayoutitemmapoverview.h>
Public Member Functions | |
QgsLayoutItemMapOverviewStack (QgsLayoutItemMap *map) | |
Constructor for QgsLayoutItemMapOverviewStack, attached to the specified map. More... | |
void | addOverview (QgsLayoutItemMapOverview *overview) |
Adds a new map overview to the stack and takes ownership of the overview. More... | |
QList< QgsLayoutItemMapOverview * > | asList () const |
Returns a list of QgsLayoutItemMapOverviews contained by the stack. More... | |
QList< QgsMapLayer * > | 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. More... | |
void | moveOverviewDown (const QString &overviewId) |
Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews. More... | |
void | moveOverviewUp (const QString &overviewId) |
Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews. More... | |
QgsLayoutItemMapOverview & | operator[] (int index) |
Returns a reference to an overview at the specified index within the stack. More... | |
QgsLayoutItemMapOverview * | overview (const QString &overviewId) const |
Returns a reference to an overview with matching overviewId within the stack. More... | |
QgsLayoutItemMapOverview * | overview (int index) const |
Returns a reference to an overview at the specified index within the stack. More... | |
bool | readXml (const QDomElement &elem, 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. More... | |
void | removeOverview (const QString &overviewId) |
Removes an overview with matching overviewId from the stack and deletes the corresponding QgsLayoutItemMapOverview. More... | |
Public Member Functions inherited from QgsLayoutItemMapItemStack | |
QgsLayoutItemMapItemStack (QgsLayoutItemMap *map) | |
Constructor for QgsLayoutItemMapItemStack, attached to the specified map. More... | |
virtual | ~QgsLayoutItemMapItemStack () |
bool | containsAdvancedEffects () const |
Returns whether any items within the stack contain advanced effects, such as blending modes. More... | |
void | drawItems (QPainter *painter, bool ignoreStacking=true) |
Draws the items from the stack on a specified painter. More... | |
virtual void | finalizeRestoreFromXml () |
Called after all pending items have been restored from XML. More... | |
bool | hasEnabledItems () const |
Returns true if the stack has any currently enabled items. More... | |
QgsLayoutItemMapItem * | item (int index) const |
Returns a reference to the item at the specified index within the stack. More... | |
virtual bool | readXml (const QDomElement &element, const QDomDocument &doc, const QgsReadWriteContext &context)=0 |
Sets the item stack's state from a DOM document, where element is a DOM node corresponding to a 'LayoutMap' tag. More... | |
int | size () const |
Returns the number of items in the stack. More... | |
virtual bool | writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context) const |
Stores the state of the item stack in a DOM node, where element is the DOM element corresponding to a 'LayoutMap' tag. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QgsLayoutItemMapItemStack | |
void | addItem (QgsLayoutItemMapItem *item) |
Adds a new map item to the stack and takes ownership of the item. More... | |
QList< QgsLayoutItemMapItem * > | asList () const |
Returns a list of QgsLayoutItemMapItems contained by the stack. More... | |
QgsLayoutItemMapItem * | item (const QString &itemId) const |
Returns a reference to an item which matching itemId within the stack. More... | |
void | moveItemDown (const QString &itemId) |
Moves an item which matching itemId up the stack, causing it to be rendered above other items. More... | |
void | moveItemUp (const QString &itemId) |
Moves an item which matching itemId up the stack, causing it to be rendered above other items. More... | |
QgsLayoutItemMapItem & | operator[] (int index) |
Returns a reference to an item at the specified index within the stack. More... | |
void | removeItem (const QString &itemId) |
Removes an item which matching itemId from the stack and deletes the corresponding QgsLayoutItemMapItem. More... | |
void | removeItems () |
Clears the item stack and deletes all QgsLayoutItemMapItems contained by the stack. More... | |
Protected Attributes inherited from QgsLayoutItemMapItemStack | |
QList< QgsLayoutItemMapItem * > | mItems |
QgsLayoutItemMap * | mMap = nullptr |
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.
Definition at line 42 of file qgslayoutitemmapoverview.h.
QgsLayoutItemMapOverviewStack::QgsLayoutItemMapOverviewStack | ( | QgsLayoutItemMap * | map | ) |
Constructor for QgsLayoutItemMapOverviewStack, attached to the specified map.
Definition at line 391 of file qgslayoutitemmapoverview.cpp.
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.
Definition at line 397 of file qgslayoutitemmapoverview.cpp.
QList< QgsLayoutItemMapOverview * > QgsLayoutItemMapOverviewStack::asList | ( | ) | const |
Returns a list of QgsLayoutItemMapOverviews contained by the stack.
Definition at line 436 of file qgslayoutitemmapoverview.cpp.
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.
Definition at line 468 of file qgslayoutitemmapoverview.cpp.
void QgsLayoutItemMapOverviewStack::moveOverviewDown | ( | const QString & | overviewId | ) |
Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.
Definition at line 412 of file qgslayoutitemmapoverview.cpp.
void QgsLayoutItemMapOverviewStack::moveOverviewUp | ( | const QString & | overviewId | ) |
Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.
Definition at line 407 of file qgslayoutitemmapoverview.cpp.
QgsLayoutItemMapOverview & QgsLayoutItemMapOverviewStack::operator[] | ( | int | index | ) |
Returns a reference to an overview at the specified index within the stack.
Definition at line 429 of file qgslayoutitemmapoverview.cpp.
QgsLayoutItemMapOverview * QgsLayoutItemMapOverviewStack::overview | ( | const QString & | overviewId | ) | const |
Returns a reference to an overview with matching overviewId within the stack.
Definition at line 417 of file qgslayoutitemmapoverview.cpp.
QgsLayoutItemMapOverview * QgsLayoutItemMapOverviewStack::overview | ( | int | index | ) | const |
Returns a reference to an overview at the specified index within the stack.
Definition at line 423 of file qgslayoutitemmapoverview.cpp.
|
overridevirtual |
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.
Implements QgsLayoutItemMapItemStack.
Definition at line 451 of file qgslayoutitemmapoverview.cpp.
void QgsLayoutItemMapOverviewStack::removeOverview | ( | const QString & | overviewId | ) |
Removes an overview with matching overviewId from the stack and deletes the corresponding QgsLayoutItemMapOverview.
Definition at line 402 of file qgslayoutitemmapoverview.cpp.