QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout. More...
#include <qgscompositionconverter.h>
Public Types | |
enum | DataDefinedProperty { NoProperty = 0, AllProperties, TestProperty, PresetPaperSize, PaperWidth, PaperHeight, NumPages, PaperOrientation, PageNumber, PositionX, PositionY, ItemWidth, ItemHeight, ItemRotation, Transparency, Opacity, BlendMode, ExcludeFromExports, FrameColor, BackgroundColor, MapRotation, MapScale, MapXMin, MapYMin, MapXMax, MapYMax, MapAtlasMargin, MapLayers, MapStylePreset, PictureSource, PictureSvgBackgroundColor, PictureSvgStrokeColor, PictureSvgStrokeWidth, SourceUrl, LegendTitle, LegendColumnCount, ScalebarFillColor, ScalebarFillColor2, ScalebarLineColor, ScalebarLineWidth } |
Composition data defined properties for different item types. More... | |
enum | MarkerMode { DefaultMarker, NoMarker, SVGMarker } |
The MarkerMode enum is the old QGIS 2.x arrow marker mode. More... | |
Static Public Member Functions | |
static QList< QgsLayoutObject * > | addItemsFromCompositionXml (QgsPrintLayout *layout, const QDomElement &parentElement, QPointF *position=nullptr, bool pasteInPlace=false) |
addItemsFromCompositionXml parse a QGIS 2.x composition XML in the parentElement, converts the 2.x items to the new layout elements and add them to the layout More... | |
static QDomDocument | convertCompositionTemplate (const QDomDocument &document, QgsProject *project) |
Convert a composition template document to a layout template. More... | |
static std::unique_ptr< QgsPrintLayout > | createLayoutFromCompositionXml (const QDomElement &composerElement, QgsProject *project) |
createLayoutFromCompositionXml is a factory that creates layout instances from a QGIS 2.x XML composition parentElement and a QGIS project More... | |
static bool | isCompositionTemplate (const QDomDocument &document) |
Check if the given document is a composition template. More... | |
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
Definition at line 54 of file qgscompositionconverter.h.
Composition data defined properties for different item types.
Definition at line 61 of file qgscompositionconverter.h.
The MarkerMode enum is the old QGIS 2.x arrow marker mode.
Enumerator | |
---|---|
DefaultMarker | |
NoMarker | |
SVGMarker |
Definition at line 115 of file qgscompositionconverter.h.
|
static |
addItemsFromCompositionXml parse a QGIS 2.x composition XML in the parentElement, converts the 2.x items to the new layout elements and add them to the layout
layout | where the items will be added |
parentElement | parent DOM element |
position | for pasting |
pasteInPlace | if true element position is translated to position |
Definition at line 304 of file qgscompositionconverter.cpp.
|
static |
Convert a composition template document to a layout template.
document | containing a composition |
project |
Definition at line 463 of file qgscompositionconverter.cpp.
|
static |
createLayoutFromCompositionXml is a factory that creates layout instances from a QGIS 2.x XML composition parentElement and a QGIS project
Definition at line 120 of file qgscompositionconverter.cpp.
|
static |
Check if the given document is a composition template.
true
if the document is a composition template Definition at line 458 of file qgscompositionconverter.cpp.