Skip to content
Permalink
Browse files

Merge branch 'master' into point-clouds-3d-gui

  • Loading branch information
NEDJIMAbelgacem committed Nov 17, 2020
2 parents 8faa5ee + a5bd9cb commit 43446920d24b84fde4fde039c788f189d3aaf004
Showing with 5,173 additions and 500 deletions.
  1. +1 −0 images/images.qrc
  2. +1 −0 python/3d/3d_auto.sip
  3. +5 −1 python/3d/auto_additions/qgsabstractmaterialsettings.py
  4. +6 −0 python/3d/auto_generated/materials/qgsabstractmaterialsettings.sip.in
  5. +65 −0 python/3d/auto_generated/materials/qgsnullmaterialsettings.sip.in
  6. +13 −2 python/core/additions/metaenum.py
  7. +53 −0 python/core/auto_generated/pointcloud/qgspointcloudrenderer.sip.in
  8. +74 −0 python/core/auto_generated/pointcloud/qgspointcloudrgbrenderer.sip.in
  9. +23 −1 python/core/auto_generated/qgsdataitem.sip.in
  10. +3 −3 python/core/auto_generated/raster/qgscontrastenhancement.sip.in
  11. +57 −3 python/core/auto_generated/raster/qgsmultibandcolorrenderer.sip.in
  12. +53 −0 python/gui/auto_generated/pointcloud/qgspointcloudrendererpropertieswidget.sip.in
  13. +69 −0 python/gui/auto_generated/pointcloud/qgspointcloudrendererwidget.sip.in
  14. +7 −0 python/gui/auto_generated/qgsgui.sip.in
  15. +11 −0 python/gui/auto_generated/qgsproviderguimetadata.sip.in
  16. +11 −0 python/gui/auto_generated/qgsproviderguiregistry.sip.in
  17. +34 −4 python/gui/auto_generated/qgsquerybuilder.sip.in
  18. +46 −0 python/gui/auto_generated/qgssubsetstringeditorinterface.sip.in
  19. +72 −0 python/gui/auto_generated/qgssubsetstringeditorprovider.sip.in
  20. +83 −0 python/gui/auto_generated/qgssubsetstringeditorproviderregistry.sip.in
  21. +5 −0 python/gui/gui_auto.sip
  22. +1 −1 python/plugins/db_manager/db_plugins/postgis/plugin.py
  23. +25 −11 python/plugins/processing/gui/AlgorithmLocatorFilter.py
  24. +1 −1 resources/function_help/json/get_feature_by_id
  25. +8 −3 resources/function_help/json/is_selected
  26. +3 −3 resources/function_help/json/overlay_disjoint
  27. +2 −0 src/3d/CMakeLists.txt
  28. +6 −0 src/3d/materials/qgsabstractmaterialsettings.h
  29. +4 −1 src/3d/materials/qgsgoochmaterialsettings.cpp
  30. +8 −1 src/3d/materials/qgsmaterialregistry.cpp
  31. +2 −0 src/3d/materials/qgsmaterialregistry.h
  32. +66 −0 src/3d/materials/qgsnullmaterialsettings.cpp
  33. +68 −0 src/3d/materials/qgsnullmaterialsettings.h
  34. +4 −0 src/3d/materials/qgsphongmaterialsettings.cpp
  35. +4 −0 src/3d/materials/qgsphongtexturedmaterialsettings.cpp
  36. +4 −0 src/3d/materials/qgssimplelinematerialsettings.cpp
  37. +3 −0 src/3d/qgs3d.cpp
  38. +2 −0 src/3d/qgs3dmapscene.cpp
  39. +3 −1 src/3d/symbols/qgspoint3dsymbol_p.cpp
  40. +4 −1 src/3d/symbols/qgspolygon3dsymbol_p.cpp
  41. +8 −3 src/analysis/processing/qgsalgorithmcellstatistics.cpp
  42. +38 −0 src/analysis/processing/qgsalgorithmimportphotos.cpp
  43. +1 −0 src/analysis/processing/qgsalgorithmimportphotos.h
  44. +2 −0 src/app/3d/qgs3dapputils.cpp
  45. +37 −10 src/app/3d/qgsgoochmaterialwidget.cpp
  46. +1 −0 src/app/3d/qgsgoochmaterialwidget.h
  47. +6 −0 src/app/3d/qgsmaterialwidget.cpp
  48. +2 −0 src/app/3d/qgsmaterialwidget.h
  49. +39 −0 src/app/3d/qgsnullmaterialwidget.cpp
  50. +39 −0 src/app/3d/qgsnullmaterialwidget.h
  51. +23 −12 src/app/3d/qgsphongmaterialwidget.cpp
  52. +4 −0 src/app/3d/qgsphongtexturedmaterialwidget.cpp
  53. +20 −25 src/app/3d/qgspoint3dsymbolwidget.cpp
  54. +0 −1 src/app/3d/qgspoint3dsymbolwidget.h
  55. +1 −1 src/app/3d/qgspolygon3dsymbolwidget.cpp
  56. +2 −0 src/app/CMakeLists.txt
  57. +1 −13 src/app/browser/qgsinbuiltdataitemproviders.cpp
  58. +12 −4 src/app/pointcloud/qgspointcloudlayerproperties.cpp
  59. +4 −1 src/app/pointcloud/qgspointcloudlayerproperties.h
  60. +53 −0 src/app/pointcloud/qgspointcloudlayerstylewidget.cpp
  61. +37 −0 src/app/pointcloud/qgspointcloudlayerstylewidget.h
  62. +16 −4 src/app/qgisapp.cpp
  63. +0 −2 src/app/qgslayerstylingwidget.cpp
  64. +20 −9 src/app/vertextool/qgsvertexeditor.cpp
  65. +6 −1 src/app/vertextool/qgsvertexeditor.h
  66. +11 −25 src/auth/oauth2/qgsauthoauth2method.cpp
  67. +89 −0 src/auth/oauth2/qgso2.cpp
  68. +15 −0 src/auth/oauth2/qgso2.h
  69. +40 −2 src/core/geometry/qgsgeos.cpp
  70. +1 −1 src/core/layertree/qgslayertreeregistrybridge.cpp
  71. +2 −2 src/core/pal/pointset.cpp
  72. +1 −2 src/core/pointcloud/qgspointcloudlayerrenderer.cpp
  73. +21 −1 src/core/pointcloud/qgspointcloudrenderer.cpp
  74. +59 −1 src/core/pointcloud/qgspointcloudrenderer.h
  75. +129 −1 src/core/pointcloud/qgspointcloudrgbrenderer.cpp
  76. +68 −0 src/core/pointcloud/qgspointcloudrgbrenderer.h
  77. +1 −1 src/core/processing/qgsprocessingfeedback.cpp
  78. +25 −0 src/core/qgscoordinateutils.cpp
  79. +9 −0 src/core/qgscoordinateutils.h
  80. +25 −1 src/core/qgsdataitem.h
  81. +2 −2 src/core/qgsmaplayerproxymodel.cpp
  82. +5 −1 src/core/qgsmaprendererjob.cpp
  83. +5 −5 src/core/raster/qgscontrastenhancement.h
  84. +51 −3 src/core/raster/qgsmultibandcolorrenderer.h
  85. +14 −0 src/gui/CMakeLists.txt
  86. +218 −0 src/gui/pointcloud/qgspointcloudrendererpropertieswidget.cpp
  87. +81 −0 src/gui/pointcloud/qgspointcloudrendererpropertieswidget.h
  88. +32 −0 src/gui/pointcloud/qgspointcloudrendererwidget.cpp
  89. +82 −0 src/gui/pointcloud/qgspointcloudrendererwidget.h
  90. +274 −0 src/gui/pointcloud/qgspointcloudrgbrendererwidget.cpp
  91. +71 −0 src/gui/pointcloud/qgspointcloudrgbrendererwidget.h
  92. +1 −1 src/gui/qgscolorwidgets.cpp
  93. +9 −1 src/gui/qgsgui.cpp
  94. +8 −0 src/gui/qgsgui.h
  95. +5 −0 src/gui/qgsmaterialsettingswidget.h
  96. +5 −0 src/gui/qgsproviderguimetadata.cpp
  97. +8 −0 src/gui/qgsproviderguimetadata.h
  98. +8 −0 src/gui/qgsproviderguiregistry.cpp
  99. +8 −0 src/gui/qgsproviderguiregistry.h
  100. +62 −54 src/gui/qgsquerybuilder.cpp
  101. +43 −4 src/gui/qgsquerybuilder.h
  102. +25 −25 src/gui/qgssearchquerybuilder.cpp
  103. +11 −1 src/gui/qgssqlcomposerdialog.cpp
  104. +17 −1 src/gui/qgssqlcomposerdialog.h
  105. +22 −0 src/gui/qgssubsetstringeditorinterface.cpp
  106. +49 −0 src/gui/qgssubsetstringeditorinterface.h
  107. +19 −0 src/gui/qgssubsetstringeditorprovider.cpp
  108. +78 −0 src/gui/qgssubsetstringeditorprovider.h
  109. +120 −0 src/gui/qgssubsetstringeditorproviderregistry.cpp
  110. +91 −0 src/gui/qgssubsetstringeditorproviderregistry.h
  111. +1 −0 src/gui/raster/qgscolorrampshaderwidget.cpp
  112. +8 −6 src/gui/vector/qgsvectorlayerproperties.cpp
  113. +42 −2 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
  114. +3 −1 src/providers/postgres/qgspostgresconn.cpp
  115. +9 −0 src/providers/spatialite/qgsspatialiteprovider.cpp
  116. +1 −0 src/providers/wfs/CMakeLists.txt
  117. +2 −0 src/providers/wfs/qgswfsprovider.h
  118. +31 −1 src/providers/wfs/qgswfsprovidergui.cpp
  119. +2 −0 src/providers/wfs/qgswfsshareddata.h
  120. +4 −167 src/providers/wfs/qgswfssourceselect.cpp
  121. +2 −34 src/providers/wfs/qgswfssourceselect.h
  122. +202 −0 src/providers/wfs/qgswfssubsetstringeditor.cpp
  123. +67 −0 src/providers/wfs/qgswfssubsetstringeditor.h
  124. +28 −0 src/ui/3d/nullmaterialwidget.ui
  125. +26 −19 src/ui/3d/point3dsymbolwidget.ui
  126. +231 −0 src/ui/pointcloud/qgspointcloudrendererpropsdialogbase.ui
  127. +266 −0 src/ui/pointcloud/qgspointcloudrgbrendererwidgetbase.ui
  128. +1 −1 src/ui/qgsquerybuilderbase.ui
  129. +16 −0 tests/src/analysis/testqgsprocessingalgs.cpp
  130. +4 −1 tests/src/python/CMakeLists.txt
  131. +3 −3 tests/src/python/test_core_additions.py
  132. +11 −3 tests/src/python/test_provider_spatialite.py
  133. +2 −2 tests/src/python/test_provider_wfs_gui.py
  134. +81 −0 tests/src/python/test_qgsdataitem.py
  135. +5 −1 tests/src/python/test_qgsdelimitedtextprovider.py
  136. +11 −0 tests/src/python/test_qgsgeometry.py
  137. +240 −0 tests/src/python/test_qgspointcloudrgbrenderer.py
  138. +132 −0 tests/src/python/test_qgssubsetstringeditorproviderregistry.py
  139. +15 −1 tests/src/python/utilities.py
  140. BIN ...stdata/control_images/expected_cellStatistics/cellstatistics_median_result_fourLayers_float32.tif
  141. BIN tests/testdata/control_images/pointcloudrenderer/expected_blendmode/expected_blendmode.png
  142. BIN tests/testdata/control_images/pointcloudrenderer/expected_opacity/expected_opacity.png
  143. BIN tests/testdata/control_images/pointcloudrenderer/expected_rgb_contrast/expected_rgb_contrast.png
  144. BIN ...s/testdata/control_images/pointcloudrenderer/expected_rgb_contrast/expected_rgb_contrast_mask.png
  145. BIN tests/testdata/control_images/pointcloudrenderer/expected_rgb_render/expected_rgb_render.png
  146. BIN tests/testdata/control_images/pointcloudrenderer/expected_rgb_render/expected_rgb_render_mask.png
  147. +6 −0 tests/testdata/point_clouds/ept/rgb/ept-build.json
  148. BIN tests/testdata/point_clouds/ept/rgb/ept-data/0-0-0-0.bin
  149. +3 −0 tests/testdata/point_clouds/ept/rgb/ept-hierarchy/0-0-0-0.json
  150. +282 −0 tests/testdata/point_clouds/ept/rgb/ept-sources/file-cropped.json
  151. +16 −0 tests/testdata/point_clouds/ept/rgb/ept-sources/manifest.json
  152. +218 −0 tests/testdata/point_clouds/ept/rgb/ept.json
@@ -32,6 +32,7 @@
<file>flags/pt_PT.svg</file>
<file>flags/ro.svg</file>
<file>flags/ru.svg</file>
<file>flags/sc.svg</file>
<file>flags/sk.svg</file>
<file>flags/sv.svg</file>
<file>flags/sw.svg</file>
@@ -14,6 +14,7 @@
%Include auto_generated/materials/qgsabstractmaterialsettings.sip
%Include auto_generated/materials/qgsgoochmaterialsettings.sip
%Include auto_generated/materials/qgsmaterialregistry.sip
%Include auto_generated/materials/qgsnullmaterialsettings.sip
%Include auto_generated/materials/qgsphongmaterialsettings.sip
%Include auto_generated/materials/qgsphongtexturedmaterialsettings.sip
%Include auto_generated/materials/qgssimplelinematerialsettings.sip
@@ -11,5 +11,9 @@
QgsAbstractMaterialSettings.Points.__doc__ = "Point based rendering, requires point data"
QgsAbstractMaterialSettings.TrianglesWithFixedTexture = QgsMaterialSettingsRenderingTechnique.TrianglesWithFixedTexture
QgsAbstractMaterialSettings.TrianglesWithFixedTexture.__doc__ = "Triangle based rendering, using a fixed, non-user-configurable texture (e.g. for terrain rendering)"
QgsMaterialSettingsRenderingTechnique.__doc__ = 'Material rendering techniques\n\n.. versionadded:: 3.16\n\n' + '* ``Triangles``: ' + QgsMaterialSettingsRenderingTechnique.Triangles.__doc__ + '\n' + '* ``Lines``: ' + QgsMaterialSettingsRenderingTechnique.Lines.__doc__ + '\n' + '* ``InstancedPoints``: ' + QgsMaterialSettingsRenderingTechnique.InstancedPoints.__doc__ + '\n' + '* ``Points``: ' + QgsMaterialSettingsRenderingTechnique.Points.__doc__ + '\n' + '* ``TrianglesWithFixedTexture``: ' + QgsMaterialSettingsRenderingTechnique.TrianglesWithFixedTexture.__doc__
QgsAbstractMaterialSettings.TrianglesFromModel = QgsMaterialSettingsRenderingTechnique.TrianglesFromModel
QgsAbstractMaterialSettings.TrianglesFromModel.__doc__ = "Triangle based rendering, using a model object source"
QgsAbstractMaterialSettings.TrianglesDataDefined = QgsMaterialSettingsRenderingTechnique.TrianglesDataDefined
QgsAbstractMaterialSettings.TrianglesDataDefined.__doc__ = "Triangle based rendering with possibility of datadefined color \since QGIS 3.18"
QgsMaterialSettingsRenderingTechnique.__doc__ = 'Material rendering techniques\n\n.. versionadded:: 3.16\n\n' + '* ``Triangles``: ' + QgsMaterialSettingsRenderingTechnique.Triangles.__doc__ + '\n' + '* ``Lines``: ' + QgsMaterialSettingsRenderingTechnique.Lines.__doc__ + '\n' + '* ``InstancedPoints``: ' + QgsMaterialSettingsRenderingTechnique.InstancedPoints.__doc__ + '\n' + '* ``Points``: ' + QgsMaterialSettingsRenderingTechnique.Points.__doc__ + '\n' + '* ``TrianglesWithFixedTexture``: ' + QgsMaterialSettingsRenderingTechnique.TrianglesWithFixedTexture.__doc__ + '\n' + '* ``TrianglesFromModel``: ' + QgsMaterialSettingsRenderingTechnique.TrianglesFromModel.__doc__ + '\n' + '* ``TrianglesDataDefined``: ' + QgsMaterialSettingsRenderingTechnique.TrianglesDataDefined.__doc__
# --
@@ -18,6 +18,8 @@ enum class QgsMaterialSettingsRenderingTechnique
InstancedPoints,
Points,
TrianglesWithFixedTexture,
TrianglesFromModel,
TrianglesDataDefined,
};


@@ -103,6 +105,10 @@ Abstract base class for material settings.
{
sipType = sipType_QgsSimpleLineMaterialSettings;
}
else if ( sipCpp->type() == "null" )
{
sipType = sipType_QgsNullMaterialSettings;
}
else
{
sipType = 0;
@@ -0,0 +1,65 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/materials/qgsnullmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsNullMaterialSettings : QgsAbstractMaterialSettings
{
%Docstring
Null shading material used for rendering models and scenes with native textures.

.. warning::

This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings as a tech preview only.

.. versionadded:: 3.16.2
%End

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

QgsNullMaterialSettings();
%Docstring
Constructor for QgsNullMaterialSettings.
%End

virtual QString type() const;


static bool supportsTechnique( QgsMaterialSettingsRenderingTechnique technique );
%Docstring
Returns ``True`` if the specified ``technique`` is supported by the material.
%End

static QgsAbstractMaterialSettings *create() /Factory/;
%Docstring
Returns a new instance of QgsNullMaterialSettings.
%End

virtual QgsNullMaterialSettings *clone() const /Factory/;


virtual QMap<QString, QString> toExportParameters() const;


};


/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/materials/qgsnullmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -17,6 +17,9 @@
***************************************************************************
"""

META_OBJECT_BY_ENUM_CLASS = {}
META_ENUM_BY_ENUM_CLASS = {}


def metaEnumFromValue(enumValue, baseClass=None, raiseException=True):
"""
@@ -39,6 +42,11 @@ def metaEnumFromType(enumClass, baseClass=None, raiseException=True):
:param raiseException: if False, no exception will be raised and None will be return in case of failure
:return: the QMetaEnum if it succeeds, None otherwise
"""
global META_OBJECT_BY_ENUM_CLASS
global META_ENUM_BY_ENUM_CLASS
if enumClass in META_ENUM_BY_ENUM_CLASS:
return META_ENUM_BY_ENUM_CLASS[enumClass]

if enumClass == int:
if raiseException:
raise TypeError("enumClass is an int, while it should be an enum")
@@ -54,8 +62,11 @@ def metaEnumFromType(enumClass, baseClass=None, raiseException=True):
raise ValueError("Enum type does not implement baseClass method. Provide the base class as argument.")

try:
idx = baseClass.staticMetaObject.indexOfEnumerator(enumClass.__name__)
meta_enum = baseClass.staticMetaObject.enumerator(idx)
meta_object = baseClass.staticMetaObject
META_OBJECT_BY_ENUM_CLASS[enumClass] = meta_object
idx = meta_object.indexOfEnumerator(enumClass.__name__)
meta_enum = meta_object.enumerator(idx)
META_ENUM_BY_ENUM_CLASS[enumClass] = meta_enum
except AttributeError:
if raiseException:
raise TypeError("could not get the metaEnum for {}".format(enumClass.__name__))
@@ -126,6 +126,11 @@ Abstract base class for 2d point cloud renderers.
%End
public:

QgsPointCloudRenderer();
%Docstring
Constructor for QgsPointCloudRenderer.
%End

virtual ~QgsPointCloudRenderer();

virtual QString type() const = 0;
@@ -139,6 +144,8 @@ Create a deep copy of this renderer. Should be implemented by all subclasses
and generate a proper subclass.
%End



virtual void renderBlock( const QgsPointCloudBlock *block, QgsPointCloudRenderContext &context ) = 0;
%Docstring
Renders a ``block`` of point cloud data using the specified render ``context``.
@@ -196,6 +203,50 @@ Calls to :py:func:`~QgsPointCloudRenderer.stopRender` must always be preceded by
the renderer should instead be cloned and :py:func:`~QgsPointCloudRenderer.startRender`/:py:func:`~QgsPointCloudRenderer.stopRender` called on the clone.

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

double maximumScreenError() const;
%Docstring
Returns the maximum screen error allowed when rendering the point cloud.

Larger values result in a faster render with less points rendered.

Units are retrieved via :py:func:`~QgsPointCloudRenderer.maximumScreenErrorUnit`.

.. seealso:: :py:func:`setMaximumScreenError`

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

void setMaximumScreenError( double error );
%Docstring
Sets the maximum screen ``error`` allowed when rendering the point cloud.

Larger values result in a faster render with less points rendered.

Units are set via :py:func:`~QgsPointCloudRenderer.setMaximumScreenErrorUnit`.

.. seealso:: :py:func:`maximumScreenError`

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

QgsUnitTypes::RenderUnit maximumScreenErrorUnit() const;
%Docstring
Returns the unit for the maximum screen error allowed when rendering the point cloud.

.. seealso:: :py:func:`maximumScreenError`

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

void setMaximumScreenErrorUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Sets the ``unit`` for the maximum screen error allowed when rendering the point cloud.

.. seealso:: :py:func:`setMaximumScreenError`

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

protected:
@@ -205,6 +256,8 @@ Calls to :py:func:`~QgsPointCloudRenderer.stopRender` must always be preceded by
Retrieves the x and y coordinate for the point at index ``i``.
%End

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

/************************************************************************
@@ -9,6 +9,7 @@




class QgsPointCloudRgbRenderer : QgsPointCloudRenderer
{
%Docstring
@@ -26,6 +27,7 @@ An RGB renderer for 2d visualisation of point clouds using embedded red, green a
%Docstring
Constructor for QgsPointCloudRgbRenderer.
%End

virtual QString type() const;

virtual QgsPointCloudRenderer *clone() const;
@@ -120,6 +122,78 @@ Sets the ``attribute`` to use for the blue channel.
.. seealso:: :py:func:`setGreenAttribute`

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

const QgsContrastEnhancement *redContrastEnhancement() const;
%Docstring
Returns the contrast enhancement to use for the red channel.

.. seealso:: :py:func:`setRedContrastEnhancement`

.. seealso:: :py:func:`greenContrastEnhancement`

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

void setRedContrastEnhancement( QgsContrastEnhancement *enhancement /Transfer/ );
%Docstring
Sets the contrast ``enhancement`` to use for the red channel.

Ownership of ``enhancement`` is transferred.

.. seealso:: :py:func:`redContrastEnhancement`

.. seealso:: :py:func:`setGreenContrastEnhancement`

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

const QgsContrastEnhancement *greenContrastEnhancement() const;
%Docstring
Returns the contrast enhancement to use for the green channel.

.. seealso:: :py:func:`setGreenContrastEnhancement`

.. seealso:: :py:func:`redContrastEnhancement`

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

void setGreenContrastEnhancement( QgsContrastEnhancement *enhancement /Transfer/ );
%Docstring
Sets the contrast ``enhancement`` to use for the green channel.

Ownership of ``enhancement`` is transferred.

.. seealso:: :py:func:`greenContrastEnhancement`

.. seealso:: :py:func:`setRedContrastEnhancement`

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

const QgsContrastEnhancement *blueContrastEnhancement() const;
%Docstring
Returns the contrast enhancement to use for the blue channel.

.. seealso:: :py:func:`setBlueContrastEnhancement`

.. seealso:: :py:func:`redContrastEnhancement`

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

void setBlueContrastEnhancement( QgsContrastEnhancement *enhancement /Transfer/ );
%Docstring
Sets the contrast ``enhancement`` to use for the blue channel.

Ownership of ``enhancement`` is transferred.

.. seealso:: :py:func:`blueContrastEnhancement`

.. seealso:: :py:func:`setRedContrastEnhancement`

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

};
@@ -81,14 +81,36 @@ The default implementation returns ``False``, subclasses must implement this met

int rowCount();

virtual QVector<QgsDataItem *> createChildren() /Factory/;
virtual QVector<QgsDataItem *> createChildren() /TransferBack/;
%Docstring
Create children. Children are not expected to have parent set.

.. warning::

This method MUST BE THREAD SAFE.
%End
%VirtualCatcherCode
PyObject *sipResObj = sipCallMethod( 0, sipMethod, "" );
// H = Convert a Python object to a mapped type instance.
// 5 = 1 (disallows the conversion of Py_None to NULL) + 4 (returns a copy of the C/C++ instance)
sipIsErr = !sipResObj || sipParseResult( 0, sipMethod, sipResObj, "H5", sipType_QVector_0101QgsDataItem, &sipRes ) < 0;
if ( !sipIsErr )
{
for ( QgsDataItem *item : sipRes )
{
PyObject *pyItem = sipGetPyObject( item, sipType_QgsDataItem );
if ( pyItem != NULL )
{
// pyItem is given an extra reference which is removed when the C++ instance’s destructor is called.
sipTransferTo( pyItem, Py_None );
}
}
}
if ( sipResObj != NULL )
{
Py_DECREF( sipResObj );
}
%End

enum State
{
@@ -14,7 +14,7 @@
class QgsContrastEnhancement
{
%Docstring
Manipulates raster pixel values so that they enhanceContrast or clip into a
Manipulates raster or point cloud pixel values so that they enhanceContrast or clip into a
specified numerical range according to the specified
ContrastEnhancementAlgorithm.
%End
@@ -40,12 +40,12 @@ ContrastEnhancementAlgorithm.

static double maximumValuePossible( Qgis::DataType dataType );
%Docstring
Helper function that returns the maximum possible value for a GDAL data type.
Helper function that returns the maximum possible value for a data type.
%End

static double minimumValuePossible( Qgis::DataType dataType );
%Docstring
Helper function that returns the minimum possible value for a GDAL data type.
Helper function that returns the minimum possible value for a data type.
%End

static QString contrastEnhancementAlgorithmString( ContrastEnhancementAlgorithm algorithm );

0 comments on commit 4344692

Please sign in to comment.
You can’t perform that action at this time.