16 #ifndef QGSCOMPOSITIONCONVERTER_H 17 #define QGSCOMPOSITIONCONVERTER_H 20 #include <QDomDocument> 21 #include <QDomElement> 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 );
152 static bool isCompositionTemplate(
const QDomDocument &document );
161 static QDomDocument convertCompositionTemplate(
const QDomDocument
173 const QDomElement &itemElem,
177 const QDomElement &itemElem,
181 const QDomElement &itemElem,
186 template <
class T,
class T2>
static bool readPolyXml( T *layoutItem,
187 const QDomElement &itemElem,
191 const QDomElement &itemElem,
195 const QDomElement &itemElem,
200 const QDomElement &itemElem,
205 const QDomElement &itemElem,
210 const QDomElement &itemElem,
214 const QDomElement &itemElem,
218 const QDomElement &itemElem,
221 static bool readOldComposerObjectXml(
QgsLayoutObject *layoutItem,
const QDomElement &itemElem );
223 static void readOldDataDefinedPropertyMap(
const QDomElement &itemElem,
228 static void initPropertyDefinitions();
233 static bool readXml(
QgsLayoutItem *layoutItem,
const QDomElement &itemElem );
236 static void adjustPos(
QgsPrintLayout *layout,
QgsLayoutItem *layoutItem, QPointF *position,
bool &pasteInPlace,
int zOrderOffset, QPointF &pasteShiftPos,
int &pageNumber );
239 static void restoreGeneralComposeItemProperties(
QgsLayoutItem *layoutItem,
const QDomElement &itemElem );
242 static QRectF itemPosition(
QgsLayoutItem *layoutItem,
const QDomElement &itemElem );
245 static QPointF minPointFromXml(
const QDomElement &elem );
249 #endif // QGSCOMPOSITIONCONVERTER_H The class is used as a container of context for various read/write operations on other objects...
Base class for graphical items within a QgsLayout.
A layout item subclass for text labels.
Preset paper size for composition.
A layout item subclass that displays SVG files or raster format images (jpg, png, ...
Layout item for node based polygon shapes.
QMap< QString, QString > QgsStringMap
Exclude item from exports.
Layout graphical items for displaying a map.
Layout item for node based polyline shapes.
Layout item for basic filled shapes (e.g.
Class used to render QgsLayout as an atlas, by iterating over the features from an associated vector ...
Scalebar secondary fill color.
Reads and writes project states.
A layout table subclass that displays attributes from a vector layer.
Item transparency (deprecated)
A store for object properties.
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Number of pages in composition.
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
MarkerMode
The MarkerMode enum is the old QGIS 2.x arrow marker mode.
Dummy property with no effect on item.
DataDefinedProperty
Composition data defined properties for different item types.
A layout item subclass for scale bars.
A base class for objects which belong to a layout.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
A layout item subclass for map legends.
Page number for item placement.
A layout multiframe subclass for HTML content.
Layer and style map theme.