/
qgslayoutcontext.sip
260 lines (188 loc) · 6.75 KB
/
qgslayoutcontext.sip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutcontext.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutContext : QObject
{
%Docstring
Stores information relating to the current context and rendering settings for a layout.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutcontext.h"
%End
public:
enum Flag
{
FlagDebug,
FlagOutlineOnly,
FlagAntialiasing,
FlagUseAdvancedEffects,
FlagForceVectorOutput,
};
typedef QFlags<QgsLayoutContext::Flag> Flags;
QgsLayoutContext( QgsLayout *layout /TransferThis/ );
%Docstring
Constructor for QgsLayoutContext.
%End
void setFlags( const QgsLayoutContext::Flags flags );
%Docstring
Sets the combination of ``flags`` that will be used for rendering the layout.
.. seealso:: :py:func:`setFlag()`
.. seealso:: :py:func:`flags()`
.. seealso:: :py:func:`testFlag()`
%End
void setFlag( const QgsLayoutContext::Flag flag, const bool on = true );
%Docstring
Enables or disables a particular rendering ``flag`` for the layout. Other existing
flags are not affected.
.. seealso:: :py:func:`setFlags()`
.. seealso:: :py:func:`flags()`
.. seealso:: :py:func:`testFlag()`
%End
QgsLayoutContext::Flags flags() const;
%Docstring
Returns the current combination of flags used for rendering the layout.
.. seealso:: :py:func:`setFlags()`
.. seealso:: :py:func:`setFlag()`
.. seealso:: :py:func:`testFlag()`
%End
bool testFlag( const Flag flag ) const;
%Docstring
Check whether a particular rendering ``flag`` is enabled for the layout.
.. seealso:: :py:func:`setFlags()`
.. seealso:: :py:func:`setFlag()`
.. seealso:: :py:func:`flags()`
%End
QgsRenderContext::Flags renderContextFlags() const;
%Docstring
Returns the combination of render context flags matched to the layout context's settings.
%End
void setFeature( const QgsFeature &feature );
%Docstring
Sets the current ``feature`` for evaluating the layout. This feature may
be used for altering an item's content and appearance for a report
or atlas layout.
Emits the changed() signal.
.. seealso:: :py:func:`feature()`
%End
QgsFeature feature() const;
%Docstring
Returns the current feature for evaluating the layout. This feature may
be used for altering an item's content and appearance for a report
or atlas layout.
.. seealso:: :py:func:`setFeature()`
%End
QgsVectorLayer *layer() const;
%Docstring
Returns the vector layer associated with the layout's context.
.. seealso:: :py:func:`setLayer()`
%End
void setLayer( QgsVectorLayer *layer );
%Docstring
Sets the vector ``layer`` associated with the layout's context.
Emits the changed() signal.
.. seealso:: :py:func:`layer()`
%End
void setDpi( double dpi );
%Docstring
Sets the ``dpi`` for outputting the layout. This also sets the
corresponding DPI for the context's measurementConverter().
.. seealso:: :py:func:`dpi()`
%End
double dpi() const;
%Docstring
Returns the ``dpi`` for outputting the layout.
.. seealso:: :py:func:`setDpi()`
%End
QgsLayoutMeasurementConverter &measurementConverter();
%Docstring
Returns the layout measurement converter to be used in the layout. This converter is used
for translating between other measurement units and the layout's native unit.
%End
bool isPreviewRender() const;
%Docstring
Returns true if the render current being conducted is a preview render,
i.e. it is being rendered inside a QGraphicsView widget as opposed to a destination
device (such as an image).
%End
bool gridVisible() const;
%Docstring
Returns true if the page grid should be drawn.
.. seealso:: :py:func:`setGridVisible()`
%End
void setGridVisible( bool visible );
%Docstring
Sets whether the page grid should be ``visible``.
.. seealso:: :py:func:`gridVisible()`
%End
bool boundingBoxesVisible() const;
%Docstring
Returns true if the item bounding boxes should be drawn.
.. seealso:: :py:func:`setBoundingBoxesVisible()`
%End
void setBoundingBoxesVisible( bool visible );
%Docstring
Sets whether the item bounding boxes should be ``visible``.
.. seealso:: :py:func:`boundingBoxesVisible()`
%End
void setPagesVisible( bool visible );
%Docstring
Sets whether the page items should be ``visible`` in the layout. Removing
them will prevent both display of the page boundaries in layout views and
will also prevent them from being rendered in layout exports.
.. seealso:: :py:func:`pagesVisible()`
%End
bool pagesVisible() const;
%Docstring
Returns whether the page items are be visible in the layout. This setting
effects both display of the page boundaries in layout views and
whether they will be rendered in layout exports.
.. seealso:: :py:func:`setPagesVisible()`
%End
void setCurrentExportLayer( int layer = -1 );
%Docstring
Sets the current item ``layer`` to draw while exporting. QgsLayoutItem subclasses
which support multi-layer SVG exports must check the currentExportLayer()
and customise their rendering based on the layer.
If ``layer`` is -1, all item layers will be rendered.
.. seealso:: :py:func:`currentExportLayer()`
%End
int currentExportLayer() const;
%Docstring
Returns the current item layer to draw while exporting. QgsLayoutItem subclasses
which support multi-layer SVG exports must check this
and customise their rendering based on the layer.
If ``layer`` is -1, all item layers should be rendered.
.. seealso:: :py:func:`setCurrentExportLayer()`
%End
signals:
void flagsChanged( QgsLayoutContext::Flags flags );
%Docstring
Emitted whenever the context's ``flags`` change.
.. seealso:: :py:func:`setFlags()`
%End
void layerChanged( QgsVectorLayer *layer );
%Docstring
Emitted when the context's ``layer`` is changed.
%End
void changed();
%Docstring
Emitted certain settings in the context is changed, e.g. by setting a new feature or vector layer
for the context.
%End
void dpiChanged();
%Docstring
Emitted when the context's DPI is changed.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutcontext.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/