add missing doc

This commit is contained in:
Denis Rouzaud 2019-03-25 11:00:17 -05:00
parent 50f87c196d
commit e232817e5b
3 changed files with 7 additions and 2 deletions

View File

@ -9,7 +9,7 @@ QgsMapLayer.PluginLayer = QgsMapLayerType.PluginLayer
QgsMapLayer.PluginLayer.__doc__ = ""
QgsMapLayer.MeshLayer = QgsMapLayerType.MeshLayer
QgsMapLayer.MeshLayer.__doc__ = "Added in 3.2"
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__
QgsMapLayerType.__doc__ = 'Types of layers that can be added to a map\n\n.. versionadded:: 3.8\n\n' + '* VectorLayer: ' + QgsMapLayerType.VectorLayer.__doc__ + '\n' + '* RasterLayer: ' + QgsMapLayerType.RasterLayer.__doc__ + '\n' + '* PluginLayer: ' + QgsMapLayerType.PluginLayer.__doc__ + '\n' + '* MeshLayer: ' + QgsMapLayerType.MeshLayer.__doc__
# --
QgsMapLayer.LayerFlag.baseClass = QgsMapLayer
QgsMapLayer.LayerFlags.baseClass = QgsMapLayer

View File

@ -1010,6 +1010,7 @@ while ($LINE_IDX < $LINE_COUNT){
}
write_output("ENU4", "$LINE\n");
if ($is_scope_based eq "1") {
$COMMENT =~ s/\n/\\n/g;
if ( $ACTUAL_CLASS ne "" ){
push @OUTPUT_PYTHON, "$ACTUAL_CLASS.$enum_qualname.__doc__ = '$COMMENT\\n\\n' + " . join(" + '\\n' + ", @enum_members_doc) . "\n# --\n";
} else {

View File

@ -57,7 +57,11 @@ class QPainter;
#define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer"
//! Types of layers that can be added to a map
/**
* \ingroup core
* Types of layers that can be added to a map
* \since QGIS 3.8
*/
enum class QgsMapLayerType SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsMapLayer, LayerType ) : int
{
VectorLayer,