File: qgsabstractreportsection.sip.in

package info (click to toggle)
qgis 3.34.7%2Bdfsg-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 1,087,388 kB
  • sloc: cpp: 1,440,033; python: 234,418; xml: 23,096; perl: 3,499; sh: 3,364; ansic: 2,219; sql: 2,130; yacc: 1,063; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (409 lines) | stat: -rw-r--r-- 10,659 bytes parent folder | download | duplicates (5)
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/layout/qgsabstractreportsection.h                           *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/





class QgsReportSectionContext
{
%Docstring(signature="appended")
Current context for a report section.

.. warning::

   This is not considered stable API, and may change in future QGIS releases. It is
   exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsabstractreportsection.h"
%End
  public:

    QgsFeature feature;

    QgsVectorLayer *currentLayer;

    QVariantMap fieldFilters;
};

class QgsAbstractReportSection : QgsAbstractLayoutIterator
{
%Docstring(signature="appended")
An abstract base class for :py:class:`QgsReport` subsections.

.. warning::

   This is not considered stable API, and may change in future QGIS releases. It is
   exposed to the Python bindings for unit testing purposes only.

.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsabstractreportsection.h"
%End
%ConvertToSubClassCode
    if ( dynamic_cast< QgsReportSectionFieldGroup * >( sipCpp ) )
      sipType = sipType_QgsReportSectionFieldGroup;
    else if ( dynamic_cast< QgsReportSectionLayout * >( sipCpp ) )
      sipType = sipType_QgsReportSectionLayout;
    else
      sipType = NULL;
%End
  public:

    QgsAbstractReportSection( QgsAbstractReportSection *parentSection = 0 );
%Docstring
Constructor for QgsAbstractReportSection, attached to the specified ``parent`` section.
Note that ownership is not transferred to ``parent``.
%End

    ~QgsAbstractReportSection();



    virtual QString type() const = 0;
%Docstring
Returns the section subclass type.
%End

    virtual QString description() const = 0;
%Docstring
Returns a user-visible, translated description of the section.
%End

    virtual QIcon icon() const = 0;
%Docstring
Returns an icon representing the section.
%End

    virtual QgsAbstractReportSection *clone() const = 0 /Factory/;
%Docstring
Clones the report section. Ownership of the returned section is
transferred to the caller.

Subclasses should call :py:func:`~QgsAbstractReportSection.copyCommonProperties` in their :py:func:`~QgsAbstractReportSection.clone`
implementations.
%End

    QgsAbstractReportSection *parentSection();
%Docstring
Returns the parent report section.
%End

    QgsProject *project();
%Docstring
Returns the associated project.
%End

    virtual int count() const;

    virtual QString filePath( const QString &baseFilePath, const QString &extension );

    virtual QgsLayout *layout();

    virtual bool beginRender();

    virtual bool next();

    virtual bool endRender();


    virtual void reset();
%Docstring
Resets the section, ready for a new iteration.
%End

    virtual bool prepareHeader();
%Docstring
Called just before rendering the section's header. Should return ``True`` if the header
is to be included for this section, or ``False`` to skip the header for the current
section.

.. seealso:: :py:func:`prepareFooter`
%End

    virtual bool prepareFooter();
%Docstring
Called just before rendering the section's footer. Should return ``True`` if the footer
is to be included for this section, or ``False`` to skip the footerfor the current
section.

.. seealso:: :py:func:`prepareHeader`
%End

    virtual QgsLayout *nextBody( bool &ok /Out/ );
%Docstring
Returns the next body layout to export, or ``None`` if
no body layout is required this iteration.

``ok`` will be set to ``False`` if no bodies remain for this section.
%End

    bool headerEnabled() const;
%Docstring
Returns ``True`` if the header for the section is enabled.

.. seealso:: :py:func:`setHeaderEnabled`

.. seealso:: :py:func:`header`

.. seealso:: :py:func:`setHeader`
%End

    void setHeaderEnabled( bool enabled );
%Docstring
Sets whether the header for the section is ``enabled``.

.. seealso:: :py:func:`headerEnabled`

.. seealso:: :py:func:`header`

.. seealso:: :py:func:`setHeader`
%End

    QgsLayout *header();
%Docstring
Returns the header for the section. Note that the header is only
included if :py:func:`~QgsAbstractReportSection.headerEnabled` is ``True``.

.. seealso:: :py:func:`setHeaderEnabled`

.. seealso:: :py:func:`headerEnabled`

.. seealso:: :py:func:`setHeader`
%End

    void setHeader( QgsLayout *header /Transfer/ );
%Docstring
Sets the ``header`` for the section. Note that the header is only
included if :py:func:`~QgsAbstractReportSection.headerEnabled` is ``True``. Ownership of ``header``
is transferred to the report section.

.. seealso:: :py:func:`setHeaderEnabled`

.. seealso:: :py:func:`headerEnabled`

.. seealso:: :py:func:`header`
%End

    bool footerEnabled() const;
%Docstring
Returns ``True`` if the footer for the section is enabled.

.. seealso:: :py:func:`setFooterEnabled`

.. seealso:: :py:func:`footer`

.. seealso:: :py:func:`setFooter`
%End

    void setFooterEnabled( bool enabled );
%Docstring
Sets whether the footer for the section is ``enabled``.

.. seealso:: :py:func:`footerEnabled`

.. seealso:: :py:func:`footer`

.. seealso:: :py:func:`setFooter`
%End

    QgsLayout *footer();
%Docstring
Returns the footer for the section. Note that the footer is only
included if :py:func:`~QgsAbstractReportSection.footerEnabled` is ``True``.

.. seealso:: :py:func:`setFooterEnabled`

.. seealso:: :py:func:`footerEnabled`

.. seealso:: :py:func:`setFooter`
%End

    void setFooter( QgsLayout *footer /Transfer/ );
%Docstring
Sets the ``footer`` for the section. Note that the footer is only
included if :py:func:`~QgsAbstractReportSection.footerEnabled` is ``True``. Ownership of ``footer``
is transferred to the report section.

.. seealso:: :py:func:`setFooterEnabled`

.. seealso:: :py:func:`footerEnabled`

.. seealso:: :py:func:`footer`
%End

    int childCount() const;
%Docstring
Returns the number of child sections for this report section. The child
sections form the body of the report section.

.. seealso:: :py:func:`children`
%End

    int row() const;
%Docstring
Returns the row number of the section within it's parent section.
%End

    QList< QgsAbstractReportSection * > childSections() const;
%Docstring
Returns all child sections for this report section. The child
sections form the body of the report section.

.. seealso:: :py:func:`childCount`

.. seealso:: :py:func:`child`

.. seealso:: :py:func:`appendChild`

.. seealso:: :py:func:`insertChild`

.. seealso:: :py:func:`removeChild`
%End

    QgsAbstractReportSection *childSection( int index );
%Docstring
Returns the child section at the specified ``index``.

.. seealso:: :py:func:`children`
%End

    void appendChild( QgsAbstractReportSection *section /Transfer/ );
%Docstring
Adds a child ``section``, transferring ownership of the section to this section.

.. seealso:: :py:func:`children`

.. seealso:: :py:func:`insertChild`
%End

    void insertChild( int index, QgsAbstractReportSection *section /Transfer/ );
%Docstring
Inserts a child ``section`` at the specified ``index``, transferring ownership of the section to this section.

.. seealso:: :py:func:`children`

.. seealso:: :py:func:`appendChild`
%End

    void removeChild( QgsAbstractReportSection *section );
%Docstring
Removes a child ``section``, deleting it.

.. seealso:: :py:func:`children`
%End

    void removeChildAt( int index );
%Docstring
Removes the child section at the specified ``index``, deleting it.

.. seealso:: :py:func:`children`
%End

    void setContext( const QgsReportSectionContext &context );
%Docstring
Sets the current ``context`` for this section.

.. seealso:: :py:func:`context`
%End

    const QgsReportSectionContext &context() const;
%Docstring
Returns the current context for this section.

.. seealso:: :py:func:`setContext`
%End

    bool writeXml( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
%Docstring
Stores the section state in a DOM element.

.. seealso:: :py:func:`readXml`
%End

    bool readXml( const QDomElement &sectionElement, const QDomDocument &document, const QgsReadWriteContext &context );
%Docstring
Sets the item state from a DOM element.

.. seealso:: :py:func:`writeXml`
%End

    virtual void reloadSettings();
%Docstring
Refreshes the section when global layout related options change.
%End

    bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
%Docstring
Accepts the specified style entity ``visitor``, causing it to visit all style entities associated
with the report.

Returns ``True`` if the visitor should continue visiting other objects, or ``False`` if visiting
should be canceled.

.. versionadded:: 3.10
%End

  protected:

    enum SubSection
    {
      Header,
      Body,
      Children,
      Footer,
      End,
    };

    void copyCommonProperties( QgsAbstractReportSection *destination ) const;
%Docstring
Copies the common properties of a report section to a ``destination`` section.
This method should be called from :py:func:`~QgsAbstractReportSection.clone` implementations.
%End

    virtual void setParentSection( QgsAbstractReportSection *parent );
%Docstring
Sets the ``parent`` report section.
%End

    virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const;
%Docstring
Stores section state within an XML DOM element.

.. seealso:: :py:func:`writeXml`

.. seealso:: :py:func:`readPropertiesFromElement`
%End

    virtual bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context );
%Docstring
Sets section state from a DOM element.

.. seealso:: :py:func:`writePropertiesToElement`

.. seealso:: :py:func:`readXml`
%End

  private:
    QgsAbstractReportSection( const QgsAbstractReportSection &other );
};


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/layout/qgsabstractreportsection.h                           *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/