File: qgsmaplayerelevationproperties.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 (353 lines) | stat: -rw-r--r-- 10,026 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
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsmaplayerelevationproperties.h                            *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/








class QgsMapLayerElevationProperties : QObject
{
%Docstring(signature="appended")
Base class for storage of map layer elevation properties.

:py:class:`QgsMapLayerElevationProperties` exposes user-configurable
settings for controlling how an individual :py:class:`QgsMapLayer`
behaves with relation to z values or elevations.

.. versionadded:: 3.18
%End

%TypeHeaderCode
#include "qgsmaplayerelevationproperties.h"
#include "qgspointcloudlayerelevationproperties.h"
#include "qgsrasterlayerelevationproperties.h"
#include "qgsvectorlayerelevationproperties.h"
#include "qgsmeshlayerelevationproperties.h"
#include "qgstiledscenelayerelevationproperties.h"
%End
%ConvertToSubClassCode
    if ( qobject_cast<QgsPointCloudLayerElevationProperties *>( sipCpp ) )
    {
      sipType = sipType_QgsPointCloudLayerElevationProperties;
    }
    else if ( qobject_cast<QgsVectorLayerElevationProperties *>( sipCpp ) )
    {
      sipType = sipType_QgsVectorLayerElevationProperties;
    }
    else if ( qobject_cast<QgsRasterLayerElevationProperties *>( sipCpp ) )
    {
      sipType = sipType_QgsRasterLayerElevationProperties;
    }
    else if ( qobject_cast<QgsMeshLayerElevationProperties *>( sipCpp ) )
    {
      sipType = sipType_QgsMeshLayerElevationProperties;
    }
    else if ( qobject_cast<QgsTiledSceneLayerElevationProperties *>( sipCpp ) )
    {
      sipType = sipType_QgsTiledSceneLayerElevationProperties;
    }
    else
    {
      sipType = 0;
    }
%End
  public:


    enum class Property /BaseType=IntEnum/
      {
      ZOffset,
      ExtrusionHeight,
      RasterPerBandLowerElevation,
      RasterPerBandUpperElevation,
    };

    enum Flag /BaseType=IntEnum/
    {
      FlagDontInvalidateCachedRendersWhenRangeChanges
    };
    typedef QFlags<QgsMapLayerElevationProperties::Flag> Flags;


    QgsMapLayerElevationProperties( QObject *parent /TransferThis/ );
%Docstring
Constructor for QgsMapLayerElevationProperties, with the specified
``parent`` object.
%End

    virtual bool hasElevation() const;
%Docstring
Returns ``True`` if the layer has an elevation or z component.
%End

    virtual QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) = 0;
%Docstring
Writes the properties to a DOM ``element``, to be used later with
:py:func:`~QgsMapLayerElevationProperties.readXml`.

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

    virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) = 0;
%Docstring
Reads the elevation properties from a DOM ``element`` previously written
by :py:func:`~QgsMapLayerElevationProperties.writeXml`.

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

    virtual void setDefaultsFromLayer( QgsMapLayer *layer );
%Docstring
Sets default properties based on sensible choices for the given map
``layer``.

.. versionadded:: 3.26
%End

    virtual QString htmlSummary() const;
%Docstring
Returns a HTML formatted summary of the properties.

.. versionadded:: 3.26
%End

    virtual QgsMapLayerElevationProperties *clone() const = 0 /Factory/;
%Docstring
Creates a clone of the properties.

.. versionadded:: 3.26
%End

    virtual bool isVisibleInZRange( const QgsDoubleRange &range, QgsMapLayer *layer = 0 ) const;
%Docstring
Returns ``True`` if the layer should be visible and rendered for the
specified z ``range``.

Since QGIS 3.38 the ``layer`` argument can be used to specify the target
layer.
%End

    virtual QgsMapLayerElevationProperties::Flags flags() const;
%Docstring
Returns flags associated to the elevation properties.
%End

    virtual QgsDoubleRange calculateZRange( QgsMapLayer *layer ) const;
%Docstring
Attempts to calculate the overall elevation or z range for the specified
``layer``, using the settings defined by this elevation properties
object.

May return an infinite range if the extent could not be calculated.
%End

    virtual QList< double > significantZValues( QgsMapLayer *layer ) const;
%Docstring
Returns a list of significant elevation/z-values for the specified
``layer``, using the settings defined by this elevation properties
object.

These values will be highlighted in elevation related widgets for the
layer.

.. versionadded:: 3.38
%End

    virtual bool showByDefaultInElevationProfilePlots() const;
%Docstring
Returns ``True`` if the layer should be visible by default in newly
created elevation profile plots.

Subclasses should override this with logic which determines whether the
layer is likely desirable to be initially checked in these plots.

.. versionadded:: 3.26
%End

    double zOffset() const;
%Docstring
Returns the z offset, which is a fixed offset amount which should be
added to z values from the layer.

.. note::

   Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`

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

    void setZOffset( double offset );
%Docstring
Sets the z ``offset``, which is a fixed offset amount which will be
added to z values from the layer.

.. note::

   Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`

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

    double zScale() const;
%Docstring
Returns the z scale, which is a scaling factor which should be applied
to z values from the layer.

This can be used to correct or manually adjust for incorrect elevation
values in a layer, such as conversion of elevation values in feet to
meters.

.. note::

   Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`

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

    void setZScale( double scale );
%Docstring
Sets the z ``scale``, which is a scaling factor which will be applied to
z values from the layer.

This can be used to correct or manually adjust for incorrect elevation
values in a layer, such as conversion of elevation values in feet to
meters.

.. note::

   Any scaling specified via :py:func:`~QgsMapLayerElevationProperties.zScale` is applied before any offset value specified via :py:func:`~QgsMapLayerElevationProperties.zOffset`

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

    QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the object's property collection, used for data
defined overrides.

.. seealso:: :py:func:`setDataDefinedProperties`

.. versionadded:: 3.26
%End


    void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the object's property ``collection``, used for data defined
overrides.

Any existing properties will be discarded.

.. seealso:: :py:func:`dataDefinedProperties`

.. seealso:: Property

.. versionadded:: 3.26
%End

    static QgsPropertiesDefinition propertyDefinitions();
%Docstring
Returns the definitions for data defined properties available for use in
elevation properties.

.. versionadded:: 3.26
%End

  signals:

    void changed();
%Docstring
Emitted when any of the elevation properties have changed.

See :py:func:`~QgsMapLayerElevationProperties.renderingPropertyChanged`
and
:py:func:`~QgsMapLayerElevationProperties.profileGenerationPropertyChanged`
for more fine-grained signals.
%End

    void zOffsetChanged();
%Docstring
Emitted when the z offset changes.

.. versionadded:: 3.26
%End

    void zScaleChanged();
%Docstring
Emitted when the z scale changes.

.. versionadded:: 3.26
%End

    void profileRenderingPropertyChanged();
%Docstring
Emitted when any of the elevation properties which relate solely to
presentation of elevation results have changed.

.. seealso:: :py:func:`changed`

.. seealso:: :py:func:`profileGenerationPropertyChanged`

.. versionadded:: 3.26
%End

    void profileGenerationPropertyChanged();
%Docstring
Emitted when any of the elevation properties which relate solely to
generation of elevation profiles have changed.

.. seealso:: :py:func:`changed`

.. seealso:: :py:func:`profileRenderingPropertyChanged`

.. versionadded:: 3.26
%End

  protected:



    void writeCommonProperties( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context );
%Docstring
Writes common class properties to a DOM ``element``, to be used later
with :py:func:`~QgsMapLayerElevationProperties.readXml`.

.. seealso:: :py:func:`readCommonProperties`

.. versionadded:: 3.26
%End

    void readCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads common class properties from a DOM ``element`` previously written
by :py:func:`~QgsMapLayerElevationProperties.writeXml`.

.. seealso:: :py:func:`writeCommonProperties`

.. versionadded:: 3.26
%End

    void copyCommonProperties( const QgsMapLayerElevationProperties *other );
%Docstring
Copies common properties from another object.

.. versionadded:: 3.26
%End

};

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