Class: QgsLayoutItemMapOverview¶
- class qgis.core.QgsLayoutItemMapOverview¶
Bases:
QgsLayoutItemMapItem
An individual overview which is drawn above the map content in a
QgsLayoutItemMap
, and shows the extent of anotherQgsLayoutItemMap
.See also
New in version 3.0.
QgsLayoutItemMapOverview(name: str, map:
QgsLayoutItemMap
) Constructor for QgsLayoutItemMapOverview.- Parameters:
name – friendly display name for overview
map –
QgsLayoutItemMap
the overview is attached toMethods
- param visitor:
Returns a vector layer to render as part of the
QgsLayoutItemMap
render, containing a feature representing the overview extent (and with an appropriate renderer set matching the overview'sframeSymbol()
).Retrieves the blending mode used for drawing the overview.
Returns whether the extent of the map is forced to center on the overview.
Reconnects signals for overview map, so that overview correctly follows changes to source map's extent.
- param painter:
Returns the fill symbol used for drawing the overview extent.
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map.
Returns the source map to show the overview extent of.
- rtype:
QgsMapLayer
Handles recentering of the map and redrawing of the map's overview
Sets object properties from a DOM element
- param itemElem:
Sets the blending
mode
used for drawing the overview.Sets whether the extent of the map is forced to center on the overview
Sets the fill
symbol
used for drawing the overview extent.Sets whether the overview frame is
inverted
, ie, whether the shaded area is drawn outside the extent of the overview map.Sets the
map
to show the overview extent of.- rtype:
bool
Stores object properties within an XML DOM element.
- param elem:
- accept(self, visitor: QgsStyleEntityVisitorInterface) bool ¶
- Parameters:
visitor (QgsStyleEntityVisitorInterface) –
- Return type:
bool
- asMapLayer(self) QgsVectorLayer ¶
Returns a vector layer to render as part of the
QgsLayoutItemMap
render, containing a feature representing the overview extent (and with an appropriate renderer set matching the overview’sframeSymbol()
).Ownership of the layer remain with the overview item.
New in version 3.6.
- Return type:
- blendMode(self) QPainter.CompositionMode ¶
Retrieves the blending mode used for drawing the overview.
See also
- Return type:
QPainter.CompositionMode
- centered(self) bool ¶
Returns whether the extent of the map is forced to center on the overview.
See also
- Return type:
bool
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- connectSignals(self)¶
Reconnects signals for overview map, so that overview correctly follows changes to source map’s extent.
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- draw(self, painter: QPainter)¶
- Parameters:
painter (QPainter) –
- finalizeRestoreFromXml(self)¶
- frameSymbol(self) QgsFillSymbol ¶
Returns the fill symbol used for drawing the overview extent.
See also
- Return type:
- inverted(self) bool ¶
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map.
See also
- Return type:
bool
- isSignalConnected(self, QMetaMethod) bool ¶
- linkedMap(self) QgsLayoutItemMap ¶
Returns the source map to show the overview extent of.
See also
- Return type:
- mapLayer(self) QgsMapLayer ¶
- Return type:
- overviewExtentChanged(self)¶
Handles recentering of the map and redrawing of the map’s overview
- readObjectPropertiesFromElement(self, parentElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
Sets object properties from a DOM element
- Parameters:
parentElement – is the parent DOM element for the object
document – DOM document
context – read write context
- Returns:
True
if read was successful
See also
- readXml(self, itemElem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters:
itemElem (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setBlendMode(self, mode: QPainter.CompositionMode)¶
Sets the blending
mode
used for drawing the overview.See also
- Parameters:
mode (QPainter.CompositionMode) –
- setCentered(self, centered: bool)¶
Sets whether the extent of the map is forced to center on the overview
See also
- Parameters:
centered (bool) –
- setFrameSymbol(self, symbol: QgsFillSymbol)¶
Sets the fill
symbol
used for drawing the overview extent. Ownership is transferred to the overview.See also
- Parameters:
symbol (QgsFillSymbol) –
- setInverted(self, inverted: bool)¶
Sets whether the overview frame is
inverted
, ie, whether the shaded area is drawn outside the extent of the overview map.See also
- Parameters:
inverted (bool) –
- setLinkedMap(self, map: QgsLayoutItemMap)¶
Sets the
map
to show the overview extent of.See also
- Parameters:
map (QgsLayoutItemMap) –
- timerEvent(self, QTimerEvent)¶
- usesAdvancedEffects(self) bool ¶
- Return type:
bool
- writeObjectPropertiesToElement(self, parentElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
Stores object properties within an XML DOM element.
- Parameters:
parentElement – is the parent DOM element to store the object’s properties in
document – DOM document
context – read write context
- Returns:
True
if write was successful
See also
- writeXml(self, elem: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters:
elem (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
bool