File: qgslabelingenginesettings.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (306 lines) | stat: -rw-r--r-- 8,087 bytes parent folder | download | duplicates (6)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/labeling/qgslabelingenginesettings.h                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/



class QgsLabelingEngineSettings
{
%Docstring(signature="appended")
Stores global configuration for labeling engine
%End

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


    enum Search /BaseType=IntEnum/
    {
      Chain,
      Popmusic_Tabu,
      Popmusic_Chain,
      Popmusic_Tabu_Chain,
      Falp
    };

    QgsLabelingEngineSettings();
    ~QgsLabelingEngineSettings();

    QgsLabelingEngineSettings( const QgsLabelingEngineSettings &other );

    void clear();
%Docstring
Returns the configuration to the defaults
%End

    void setFlags( Qgis::LabelingFlags flags );
%Docstring
Sets flags of the labeling engine
%End
    Qgis::LabelingFlags flags() const;
%Docstring
Gets flags of the labeling engine
%End
    bool testFlag( Qgis::LabelingFlag f ) const;
%Docstring
Test whether a particular flag is enabled
%End
    void setFlag( Qgis::LabelingFlag f, bool enabled = true );
%Docstring
Sets whether a particual flag is enabled
%End

    double maximumLineCandidatesPerCm() const;
%Docstring
Returns the maximum number of line label candidate positions per
centimeter.

.. seealso:: :py:func:`setMaximumLineCandidatesPerCm`

.. versionadded:: 3.12
%End

    void setMaximumLineCandidatesPerCm( double candidates );
%Docstring
Sets the maximum number of line label ``candidates`` per centimeter.

.. seealso:: :py:func:`maximumLineCandidatesPerCm`

.. versionadded:: 3.12
%End

    double maximumPolygonCandidatesPerCmSquared() const;
%Docstring
Returns the maximum number of polygon label candidate positions per
centimeter squared.

.. seealso:: :py:func:`setMaximumPolygonCandidatesPerCmSquared`

.. versionadded:: 3.12
%End

    void setMaximumPolygonCandidatesPerCmSquared( double candidates );
%Docstring
Sets the maximum number of polygon label ``candidates`` per centimeter
squared.

.. seealso:: :py:func:`maximumPolygonCandidatesPerCmSquared`

.. versionadded:: 3.12
%End

 void numCandidatePositions( int &candPoint, int &candLine, int &candPolygon ) const /Deprecated/;
%Docstring
Gets number of candidate positions that will be generated for each label
feature.

.. deprecated:: 3.12

   Use :py:func:`~QgsLabelingEngineSettings.maximumPolygonCandidatesPerCmSquared` and :py:func:`~QgsLabelingEngineSettings.maximumLineCandidatesPerCm` instead.
%End

 void setNumCandidatePositions( int candPoint, int candLine, int candPolygon ) /Deprecated/;
%Docstring
Sets the number of candidate positions that will be generated for each
label feature.

.. deprecated:: 3.12

   Use :py:func:`~QgsLabelingEngineSettings.setMaximumPolygonCandidatesPerCmSquared` and :py:func:`~QgsLabelingEngineSettings.setMaximumLineCandidatesPerCm` instead.
%End

 void setSearchMethod( Search s ) /Deprecated/;
%Docstring
Used to set which search method to use for removal collisions between
labels

.. deprecated:: 3.10

   Chain is always used.
%End

 Search searchMethod() const /Deprecated/;
%Docstring
Which search method to use for removal collisions between labels

.. deprecated:: 3.10

   Chain is always used.
%End


    void readSettingsFromProject( QgsProject *project );
%Docstring
Read configuration of the labeling engine from a project

.. note::

   Both this method and :py:func:`~QgsLabelingEngineSettings.readXml` must be called to completely restore the object's state from a project.
%End

    void writeSettingsToProject( QgsProject *project );
%Docstring
Write configuration of the labeling engine to a project.

.. note::

   Both this method and :py:func:`~QgsLabelingEngineSettings.writeXml` must be called to completely store the object's state in a project.
%End

    void writeXml( QDomDocument &doc, QDomElement &element, const QgsReadWriteContext &context ) const;
%Docstring
Writes the label engine settings to an XML ``element``.

.. note::

   Both this method and :py:func:`~QgsLabelingEngineSettings.writeSettingsToProject` must be called to completely store the object's state in a project.

.. seealso:: :py:func:`readXml`

.. seealso:: :py:func:`writeSettingsToProject`

.. versionadded:: 3.40
%End

    void readXml( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads the label engine settings from an XML ``element``.

.. note::

   Both this method and :py:func:`~QgsLabelingEngineSettings.readSettingsFromProject` must be called to completely restore the object's state from a project.

.. note::

   :py:func:`~QgsLabelingEngineSettings.resolveReferences` must be called following this method.

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

.. seealso:: :py:func:`readSettingsFromProject`

.. versionadded:: 3.40
%End

    void resolveReferences( const QgsProject *project );
%Docstring
Resolves reference to layers from stored layer ID.

Should be called following a call
:py:func:`~QgsLabelingEngineSettings.readXml`.

.. versionadded:: 3.40
%End


    Qgis::TextRenderFormat defaultTextRenderFormat() const;
%Docstring
Returns the default text rendering format for the labels.

.. seealso:: :py:func:`setDefaultTextRenderFormat`

.. versionadded:: 3.4.3
%End

    void setDefaultTextRenderFormat( Qgis::TextRenderFormat format );
%Docstring
Sets the default text rendering ``format`` for the labels.

.. seealso:: :py:func:`defaultTextRenderFormat`

.. versionadded:: 3.4.3
%End

    QColor unplacedLabelColor() const;
%Docstring
Returns the color to use when rendering unplaced labels.

.. seealso:: :py:func:`setUnplacedLabelColor`

.. versionadded:: 3.10
%End

    void setUnplacedLabelColor( const QColor &color );
%Docstring
Sets the ``color`` to use when rendering unplaced labels.

.. seealso:: :py:func:`unplacedLabelColor`

.. versionadded:: 3.10
%End

    Qgis::LabelPlacementEngineVersion placementVersion() const;
%Docstring
Returns the placement engine version, which dictates how the label
placement problem is solved.

.. seealso:: :py:func:`setPlacementVersion`

.. versionadded:: 3.10.2
%End

    void setPlacementVersion( Qgis::LabelPlacementEngineVersion version );
%Docstring
Sets the placement engine ``version``, which dictates how the label
placement problem is solved.

.. seealso:: :py:func:`placementVersion`

.. versionadded:: 3.10.2
%End

    QList< QgsAbstractLabelingEngineRule * > rules();
%Docstring
Returns a list of labeling engine rules which must be satisfied while
placing labels.

.. seealso:: :py:func:`addRule`

.. seealso:: :py:func:`setRules`

.. versionadded:: 3.40
%End


    void addRule( QgsAbstractLabelingEngineRule *rule /Transfer/ );
%Docstring
Adds a labeling engine ``rule`` which must be satisfied while placing
labels.

Ownership of the rule is transferred to the settings.

.. seealso:: :py:func:`rules`

.. seealso:: :py:func:`setRules`

.. versionadded:: 3.40
%End

    void setRules( const QList< QgsAbstractLabelingEngineRule * > &rules /Transfer/ );
%Docstring
Sets the labeling engine ``rules`` which must be satisfied while placing
labels.

Ownership of the rules are transferred to the settings.

.. seealso:: :py:func:`addRule`

.. seealso:: :py:func:`rules`

.. versionadded:: 3.40
%End

};

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