QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #ifndef QgsLayoutItemMapOVERVIEW_H
19 #define QgsLayoutItemMapOVERVIEW_H
21 #include "qgis_core.h"
68 void removeOverview(
const QString &overviewId );
76 void moveOverviewUp(
const QString &overviewId );
84 void moveOverviewDown(
const QString &overviewId );
105 QList< QgsLayoutItemMapOverview * >
asList()
const;
114 QList< QgsMapLayer * > modifyMapLayerList(
const QList< QgsMapLayer * > &layers );
140 void draw( QPainter *painter )
override;
182 QPainter::CompositionMode
blendMode()
const {
return mBlendMode; }
188 void setBlendMode( QPainter::CompositionMode mode );
202 void setInverted(
bool inverted );
214 void setCentered(
bool centered );
220 void connectSignals();
242 void overviewExtentChanged();
248 QString mFrameMapUuid;
249 QPointer< QgsLayoutItemMap > mFrameMap;
252 std::unique_ptr< QgsFillSymbol > mFrameSymbol;
255 QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
258 bool mInverted =
false;
261 bool mCentered =
false;
263 std::unique_ptr< QgsVectorLayer > mExtentLayer;
266 void createDefaultFrameSymbol();
270 #endif // QgsLayoutItemMapOVERVIEW_H
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 'Layo...
The class is used as a container of context for various read/write operations on other objects.
virtual void draw(QPainter *painter)=0
Draws the item on to a destination painter.
An item which is drawn inside a QgsLayoutItemMap, e.g., a grid or map overview.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
A collection of map items which are drawn above the map content in a QgsLayoutItemMap....
bool inverted() const
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the exte...
QgsLayoutItemMapItem & operator[](int index)
Returns a reference to an item at the specified index within the stack.
bool centered() const
Returns whether the extent of the map is forced to center on the overview.
virtual void finalizeRestoreFromXml()
Called after all pending items have been restored from XML.
virtual bool readXml(const QDomElement &element, const QDomDocument &doc, const QgsReadWriteContext &context)
Sets the map item state from a DOM document, where element is the DOM node corresponding to a 'Layout...
virtual QgsMapLayer * mapLayer()
Returns the internal map layer used by this item, if available.
virtual bool usesAdvancedEffects() const
Returns true if the item is drawn using advanced effects, such as blend modes.
A collection of overviews which are drawn above the map content in a QgsLayoutItemMap....
QList< QgsLayoutItemMapItem * > asList() const
Returns a list of QgsLayoutItemMapItems contained by the stack.
An individual overview which is drawn above the map content in a QgsLayoutItemMap,...
Layout graphical items for displaying a map.
Represents a vector layer which manages a vector based data sets.
Base class for all map layer types. This is the base class for all map layer types (vector,...
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const
Stores map item state in a DOM element, where element is the DOM element corresponding to a 'LayoutMa...
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
QPainter::CompositionMode blendMode() const
Retrieves the blending mode used for drawing the overview.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified style entity visitor, causing it to visit all style entities associated with th...