16#ifndef QGSCOMPOSITIONCONVERTER_H
17#define QGSCOMPOSITIONCONVERTER_H
20#include <QDomDocument>
98 PictureSvgBackgroundColor,
99 PictureSvgStrokeColor,
100 PictureSvgStrokeWidth,
129 static std::unique_ptr<QgsPrintLayout> createLayoutFromCompositionXml(
const QDomElement &composerElement,
142 static QList<QgsLayoutObject *> addItemsFromCompositionXml(
QgsPrintLayout *layout,
143 const QDomElement &parentElement,
144 QPointF *position =
nullptr,
145 bool pasteInPlace =
false );
151 static bool isCompositionTemplate(
const QDomDocument &document );
159 static QDomDocument convertCompositionTemplate(
const QDomDocument
171 const QDomElement &itemElem,
175 const QDomElement &itemElem,
179 const QDomElement &itemElem,
184 template <
class T,
class T2>
static bool readPolyXml( T *layoutItem,
185 const QDomElement &itemElem,
189 const QDomElement &itemElem,
193 const QDomElement &itemElem,
198 const QDomElement &itemElem,
203 const QDomElement &itemElem,
208 const QDomElement &itemElem,
212 const QDomElement &itemElem,
216 const QDomElement &itemElem,
220 const QDomElement &itemElem,
222 const QList<QgsLayoutObject *> &items );
224 static bool readOldComposerObjectXml(
QgsLayoutObject *layoutItem,
const QDomElement &itemElem );
226 static void readOldDataDefinedPropertyMap(
const QDomElement &itemElem,
229 static QgsProperty readOldDataDefinedProperty( DataDefinedProperty property,
const QDomElement &ddElem );
231 static void initPropertyDefinitions();
236 static bool readXml(
QgsLayoutItem *layoutItem,
const QDomElement &itemElem );
239 static void adjustPos(
QgsPrintLayout *layout,
QgsLayoutItem *layoutItem, QPointF *position,
bool &pasteInPlace,
int zOrderOffset, QPointF &pasteShiftPos,
int &pageNumber );
242 static void restoreGeneralComposeItemProperties(
QgsLayoutItem *layoutItem,
const QDomElement &itemElem );
245 static QRectF itemPosition(
QgsLayoutItem *layoutItem,
const QDomElement &itemElem );
248 static QPointF minPointFromXml(
const QDomElement &elem );
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
DataDefinedProperty
Composition data defined properties for different item types.
MarkerMode
The MarkerMode enum is the old QGIS 2.x arrow marker mode.
Class used to render QgsLayout as an atlas, by iterating over the features from an associated vector ...
A layout table subclass that displays attributes from a vector layer.
A container for grouping several QgsLayoutItems.
A layout multiframe subclass for HTML content.
A layout item subclass for text labels.
A layout item subclass for map legends.
Layout graphical items for displaying a map.
A layout item subclass that displays SVG files or raster format images (jpg, png, ....
Layout item for node based polygon shapes.
Layout item for node based polyline shapes.
A layout item subclass for scale bars.
Layout item for basic filled shapes (e.g.
Base class for graphical items within a QgsLayout.
A base class for objects which belong to a layout.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
A store for object properties.
The class is used as a container of context for various read/write operations on other objects.
QMap< QString, QString > QgsStringMap
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.