Skip to content

Commit 375a0aa

Browse files
committedMar 25, 2019
create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
the enum is moved out of the class this will allow forward declaration more easily since the enum is not nested in the class
1 parent 837607c commit 375a0aa

File tree

96 files changed

+323
-312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+323
-312
lines changed
 

‎python/core/auto_additions/qgsmaplayer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# The following has been generated automatically from src/core/qgsmaplayer.h
2+
# monkey patching scoped based enum
3+
.QgsMapLayerType.VectorLayer.__doc__ = ""
4+
.QgsMapLayerType.RasterLayer.__doc__ = ""
5+
.QgsMapLayerType.PluginLayer.__doc__ = ""
6+
.QgsMapLayerType.MeshLayer.__doc__ = "Added in 3.2"
7+
.QgsMapLayerType.__doc__ = 'Types of layers that can be added to a map\n\n' + '* VectorLayer: ' + .QgsMapLayerType.VectorLayer.__doc__ + '\n' + '* RasterLayer: ' + .QgsMapLayerType.RasterLayer.__doc__ + '\n' + '* PluginLayer: ' + .QgsMapLayerType.PluginLayer.__doc__ + '\n' + '* MeshLayer: ' + .QgsMapLayerType.MeshLayer.__doc__
8+
# --
29
QgsMapLayer.LayerFlag.baseClass = QgsMapLayer
310
QgsMapLayer.LayerFlags.baseClass = QgsMapLayer
411
LayerFlags = QgsMapLayer # dirty hack since SIP seems to introduce the flags in module

‎python/core/auto_generated/qgsbrowserproxymodel.sip.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Sets whether the model is filtered by map layer type.
113113
.. seealso:: :py:func:`setLayerType`
114114
%End
115115

116-
QgsMapLayer::LayerType layerType() const;
116+
QgsMapLayerType layerType() const;
117117
%Docstring
118118
Returns the layer type to filter the model by. This is only used if
119119
filterByLayerType() is ``True``.
@@ -123,7 +123,7 @@ filterByLayerType() is ``True``.
123123
.. seealso:: :py:func:`filterByLayerType`
124124
%End
125125

126-
void setLayerType( QgsMapLayer::LayerType type );
126+
void setLayerType( QgsMapLayerType type );
127127
%Docstring
128128
Sets the layer ``type`` to filter the model by. This is only used if
129129
filterByLayerType() is ``True``.

0 commit comments

Comments
 (0)
Please sign in to comment.