QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
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 56 of file qgscompositionconverter.h.
Composition data defined properties for different item types.
Definition at line 63 of file qgscompositionconverter.h.
The MarkerMode enum is the old QGIS 2.x arrow marker mode.
Enumerator | |
---|---|
DefaultMarker | |
NoMarker | |
SVGMarker |
Definition at line 117 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 313 of file qgscompositionconverter.cpp.
|
static |
Convert a composition template document to a layout template.
document | containing a composition |
project |
Definition at line 482 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 126 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 477 of file qgscompositionconverter.cpp.