16
16
#ifndef QGSCOMPOSITIONCONVERTER_H
17
17
#define QGSCOMPOSITIONCONVERTER_H
18
18
19
+
19
20
#include < QDomDocument>
20
21
#include < QDomElement>
21
22
22
-
23
23
#include " qgis.h"
24
+ #include " qgis_sip.h"
25
+
26
+ #define SIP_NO_FILE
27
+
24
28
#include " qgspropertycollection.h"
25
29
26
30
class QgsLayout ;
@@ -38,6 +42,13 @@ class QgsLayoutItemMap;
38
42
class QgsLayoutItemScaleBar ;
39
43
class QgsLayoutItemLegend ;
40
44
45
+
46
+ /* *
47
+ * QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout
48
+ * \since QGIS 3.0
49
+ * \note Not available in Python bindings.
50
+ * \ingroup core
51
+ */
41
52
class CORE_EXPORT QgsCompositionConverter
42
53
{
43
54
public:
@@ -97,7 +108,7 @@ class CORE_EXPORT QgsCompositionConverter
97
108
};
98
109
99
110
/* *
100
- * The MarkerMode enum is the old 2.x arrow marker mode
111
+ * The MarkerMode enum is the old QGIS 2.x arrow marker mode
101
112
*/
102
113
enum MarkerMode
103
114
{
@@ -109,16 +120,28 @@ class CORE_EXPORT QgsCompositionConverter
109
120
110
121
/* *
111
122
* \brief createLayoutFromCompositionXml is a factory that creates layout instances from a
112
- * QGIS 2.x XML composition \a document
123
+ * QGIS 2.x XML composition \a document
113
124
* \param parentElement is the Composition element
114
- * \param document
115
- * \param context
125
+ * \param project the QGIS project
116
126
* \return a QgsLayout instance
127
+ * \since QGIS 3.0
128
+ * \note Not available in Python bindings.
117
129
*/
118
130
static QgsLayout *createLayoutFromCompositionXml ( const QDomElement &parentElement,
119
131
QgsProject *project ) SIP_FACTORY;
120
132
121
133
134
+ /* *
135
+ * addItemsFromCompositionXml parse a QGIS 2.x composition XML in the \a parentElement,
136
+ * converts the 2.x items to the new layout elements and add them to the \a layout
137
+ * \param layout the lay
138
+ * \param parentElement
139
+ * \param position for pasting
140
+ * \param pasteInPlace if true element position is translated to \a position
141
+ * \return a list of layout items
142
+ * \since QGIS 3.0
143
+ * \note Not available in Python bindings.
144
+ */
122
145
static QList<QgsLayoutItem *> addItemsFromCompositionXml ( QgsLayout *layout,
123
146
const QDomElement &parentElement,
124
147
QPointF *position = nullptr ,
0 commit comments