18 #ifndef QgsLayoutItemMapOVERVIEW_H 19 #define QgsLayoutItemMapOVERVIEW_H 21 #include "qgis_core.h" 69 void removeOverview(
const QString &overviewId );
77 void moveOverviewUp(
const QString &overviewId );
85 void moveOverviewDown(
const QString &overviewId );
109 QList< QgsLayoutItemMapOverview * >
asList()
const;
135 void draw( QPainter *painter )
override;
177 QPainter::CompositionMode
blendMode()
const {
return mBlendMode; }
183 void setBlendMode(
const QPainter::CompositionMode mode );
197 void setInverted(
const bool inverted );
209 void setCentered(
const bool centered );
215 void connectSignals();
222 void overviewExtentChanged();
228 QString mFrameMapUuid;
229 QPointer< QgsLayoutItemMap > mFrameMap;
232 std::unique_ptr< QgsFillSymbol > mFrameSymbol;
235 QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_SourceOver;
238 bool mInverted =
false;
241 bool mCentered =
false;
244 void createDefaultFrameSymbol();
248 #endif // QgsLayoutItemMapOVERVIEW_H
The class is used as a container of context for various read/write operations on other objects...
An individual overview which is drawn above the map content in a QgsLayoutItemMap, and shows the extent of another QgsLayoutItemMap.
An item which is drawn inside a QgsLayoutItemMap, e.g., a grid or map overview.
virtual void finalizeRestoreFromXml()
Called after all pending items have been restored from XML.
A collection of map items which are drawn above the map content in a QgsLayoutItemMap.
A collection of overviews which are drawn above the map content in a QgsLayoutItemMap.
virtual bool usesAdvancedEffects() const
Returns true if the item is drawn using advanced effects, such as blend modes.
bool inverted() const
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the exte...
Layout graphical items for displaying a map.
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...
QPainter::CompositionMode blendMode() const
Retrieves the blending mode used for drawing the overview.
virtual void draw(QPainter *painter)=0
Draws the item on to a destination painter.
QgsLayoutItemMapItem & operator[](int index)
Returns a reference to an item at the specified index within the stack.
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...
QList< QgsLayoutItemMapItem *> asList() const
Returns a list of QgsLayoutItemMapItems contained by the stack.
bool centered() const
Returns whether the extent of the map is forced to center on the overview.
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...